Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/LessThanNode.java @ 8240:33e08aca06ff
Codegen API change. Simplified definition of guards.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 01 Mar 2013 18:04:23 +0100 |
parents | 31da1716950f |
children | aa9ffb3a715e |
comparison
equal
deleted
inserted
replaced
8239:8fa2eed07f81 | 8240:33e08aca06ff |
---|---|
44 @Specialization | 44 @Specialization |
45 public boolean doBigInteger(BigInteger left, BigInteger right) { | 45 public boolean doBigInteger(BigInteger left, BigInteger right) { |
46 return left.compareTo(right) < 0; | 46 return left.compareTo(right) < 0; |
47 } | 47 } |
48 | 48 |
49 @Specialization | 49 @Specialization(guards = "isString") |
50 @SpecializationGuard(methodName = "isString") | |
51 public boolean doString(Object left, Object right) { | 50 public boolean doString(Object left, Object right) { |
52 return left.toString().compareTo(right.toString()) < 0; | 51 return left.toString().compareTo(right.toString()) < 0; |
53 } | 52 } |
54 | 53 |
55 @Generic | 54 @Generic |