Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 24cb902db125
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4c8ad0178982
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on May 23, 2016

  1. Copy the full SHA
    0feef5c View commit details
  2. Copy the full SHA
    4aeec42 View commit details
  3. [Truffle] Missing final.

    eregon committed May 23, 2016
    Copy the full SHA
    4c8ad01 View commit details
Original file line number Diff line number Diff line change
@@ -154,7 +154,7 @@ private static void addMethod(RubyContext context, DynamicObject module, RubyRoo
private static RubyRootNode makeGenericMethod(RubyContext context, MethodDetails methodDetails) {
final CoreMethod method = methodDetails.getMethodAnnotation();

final SourceSection sourceSection = SourceSection.createUnavailable(null, String.format("%s#%s", methodDetails.getClassAnnotation().value(), method.names()[0]));
final SourceSection sourceSection = SourceSection.createUnavailable("core", String.format("%s#%s", methodDetails.getClassAnnotation().value(), method.names()[0]));

final int required = method.required();
final int optional = method.optional();
Original file line number Diff line number Diff line change
@@ -139,6 +139,7 @@ public Object mul(
@CoreMethod(names = {"/", "__slash__"}, required = 1)
public abstract static class DivNode extends BignumCoreMethodNode {

@TruffleBoundary
@Specialization
public Object div(DynamicObject a, long b) {
final BigInteger bBigInt = BigInteger.valueOf(b);
@@ -151,11 +152,13 @@ public Object div(DynamicObject a, long b) {
}
}

@TruffleBoundary
@Specialization
public double div(DynamicObject a, double b) {
return Layouts.BIGNUM.getValue(a).doubleValue() / b;
}

@TruffleBoundary
@Specialization(guards = "isRubyBignum(b)")
public Object div(DynamicObject a, DynamicObject b) {
final BigInteger aBigInt = Layouts.BIGNUM.getValue(a);
@@ -173,6 +176,7 @@ public Object div(DynamicObject a, DynamicObject b) {
@CoreMethod(names = {"%", "modulo"}, required = 1)
public abstract static class ModNode extends BignumCoreMethodNode {

@TruffleBoundary
@Specialization
public Object mod(DynamicObject a, long b) {
if (b == 0) {
@@ -185,6 +189,7 @@ public Object mod(DynamicObject a, long b) {
return fixnumOrBignum(Layouts.BIGNUM.getValue(a).mod(BigInteger.valueOf(b)));
}

@TruffleBoundary
@Specialization(guards = "isRubyBignum(b)")
public Object mod(DynamicObject a, DynamicObject b) {
final BigInteger bigint = Layouts.BIGNUM.getValue(b);
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ protected int ensureSuccessful(int result) {
}
}

private static int STDOUT = 1;
private static final int STDOUT = 1;

@Primitive(name = "io_allocate", unsafe = UnsafeGroup.IO)
public static abstract class IOAllocatePrimitiveNode extends IOPrimitiveArrayArgumentsNode {