Skip to content

Commit

Permalink
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/rational/abs_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -352,7 +352,12 @@ public double div(long a, double b) {

@Specialization(guards = "isRubyBignum(b)")
public int div(long a, DynamicObject b) {
return 0;
if (a == Long.MIN_VALUE) {

This comment has been minimized.

Copy link
@nirvdrum

nirvdrum Apr 22, 2016

Contributor

This might be better as its own specialization. You should be able to add it to the guards. Barring that, it should be behind a profile.

This comment has been minimized.

Copy link
@bjfish

bjfish Apr 22, 2016

Author Contributor

Thanks, I've added the specializations we discussed here: abffb3f

// -Long.MIN_VALUE is a BigNum so a special case is needed
return BigInteger.valueOf(a).divide(Layouts.BIGNUM.getValue(b)).intValue();
} else {
return 0;
}
}

@Specialization(guards = "!isRubyBignum(b)")

0 comments on commit 656488f

Please sign in to comment.