Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -51,6 +51,7 @@ public abstract static class NegNode extends CoreMethodArrayArgumentsNode {

@Specialization(rewriteOn = ArithmeticException.class)
public int neg(int value) {
// TODO CS 13-Oct-16, use negateExact, but this isn't intrinsified by Graal yet
return Math.subtractExact(0, value);
}

@@ -1004,6 +1005,7 @@ public abstract static class AbsNode extends CoreMethodArrayArgumentsNode {

@Specialization(rewriteOn = ArithmeticException.class)
public int absIntInBounds(int n) {
// TODO CS 13-Oct-16, use negateExact, but this isn't intrinsified by Graal yet
return (n < 0) ? Math.subtractExact(0, n) : n;
}

0 comments on commit 410ce6a

Please sign in to comment.