Skip to content

Commit

Permalink
[Truffle] Comment why we aren't using negate exact yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Oct 13, 2016
1 parent 3b2f4ff commit 410ce6a
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 410ce6a

Please sign in to comment.