Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/ArithmeticNode.java @ 8243:d81ff782fa1a
Removed @SpecializationThrows from codegen API. Replaced it by a simplier version in @Specialization.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 04 Mar 2013 17:20:26 +0100 |
parents | 33e08aca06ff |
children | 5b08b0f4d338 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/ArithmeticNode.java Mon Mar 04 15:14:11 2013 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/ArithmeticNode.java Mon Mar 04 17:20:26 2013 +0100 @@ -52,8 +52,7 @@ super(node); } - @Specialization - @SpecializationThrows(javaClass = ArithmeticException.class, transitionTo = "doBigInteger") + @Specialization(rewriteOn = ArithmeticException.class) int doInteger(int left, int right) { return ExactMath.addExact(left, right); } @@ -84,8 +83,7 @@ super(node); } - @Specialization - @SpecializationThrows(javaClass = ArithmeticException.class, transitionTo = "doBigInteger") + @Specialization(rewriteOn = ArithmeticException.class) int doInteger(int left, int right) { return ExactMath.subtractExact(left, right); } @@ -106,8 +104,7 @@ super(node); } - @Specialization - @SpecializationThrows(javaClass = ArithmeticException.class, transitionTo = "doBigInteger") + @Specialization(rewriteOn = ArithmeticException.class) int doInteger(int left, int right) { return left / right; } @@ -128,8 +125,7 @@ super(node); } - @Specialization - @SpecializationThrows(javaClass = ArithmeticException.class, transitionTo = "doBigInteger") + @Specialization(rewriteOn = ArithmeticException.class) int doInteger(int left, int right) { return ExactMath.multiplyExact(left, right); }