Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TernaryNode.java @ 7848:698cd036a1ca
Added a ternary operator to simple language to test short circuit specialization.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 19 Feb 2013 17:27:02 +0100 |
parents | 0110e781b6fa |
children | aa9ffb3a715e |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TernaryNode.java Tue Feb 19 17:20:45 2013 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TernaryNode.java Tue Feb 19 17:27:02 2013 +0100 @@ -56,14 +56,7 @@ return !hasIfPart; } - @GuardCheck - public boolean demoIntegerGuard(boolean condition, boolean hasIfPart, int ifPart, boolean hasElsePart, int elsePart) { - return true; - } - @Specialization - @SpecializationGuard(methodName = "demoIntegerGuard") - @SpecializationThrows(javaClass = RuntimeException.class, transitionTo = "doBigInteger") public int doInteger(boolean condition, boolean hasIfPart, int ifPart, boolean hasElsePart, int elsePart) { return hasIfPart ? ifPart : elsePart; }