Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TernaryNode.java @ 7845:0110e781b6fa
Fixed generated generic does not need an else block.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 19 Feb 2013 11:31:23 +0100 |
parents | b891ec348f8a |
children | 698cd036a1ca |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TernaryNode.java Mon Feb 18 20:35:54 2013 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/TernaryNode.java Tue Feb 19 11:31:23 2013 +0100 @@ -56,7 +56,14 @@ 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; }