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: b7658e03cb72
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2cdb4af7a2f5
Choose a head ref
  • 2 commits
  • 9 files changed
  • 1 contributor

Commits on Oct 1, 2015

  1. Copy the full SHA
    d370f33 View commit details
  2. Copy the full SHA
    2cdb4af View commit details
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ public abstract static class BacktraceNode extends CoreMethodArrayArgumentsNode

public BacktraceNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
readCustomBacktrace = ReadHeadObjectFieldNodeGen.create(context, sourceSection, "@custom_backtrace", null, null);
readCustomBacktrace = ReadHeadObjectFieldNodeGen.create("@custom_backtrace", null);
}

@Specialization
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ public double id2RefFloat(DynamicObject id) {
}

protected ReadHeadObjectFieldNode createReadObjectIDNode() {
return ReadHeadObjectFieldNodeGen.create(getContext(), getSourceSection(), Layouts.OBJECT_ID_IDENTIFIER, 0L, null);
return ReadHeadObjectFieldNodeGen.create(Layouts.OBJECT_ID_IDENTIFIER, 0L);
}

protected boolean isLargeFixnumID(DynamicObject id) {
Original file line number Diff line number Diff line change
@@ -77,6 +77,6 @@ protected boolean isFrozen(DynamicObject object,
}

protected ReadHeadObjectFieldNode createReadFrozenNode() {
return ReadHeadObjectFieldNodeGen.create(getContext(), getSourceSection(), Layouts.FROZEN_IDENTIFIER, false, null);
return ReadHeadObjectFieldNodeGen.create(Layouts.FROZEN_IDENTIFIER, false);
}
}
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ protected boolean isTainted(DynamicObject object,
}

protected ReadHeadObjectFieldNode createReadTaintedNode() {
return ReadHeadObjectFieldNodeGen.create(getContext(), getSourceSection(), Layouts.TAINTED_IDENTIFIER, false, null);
return ReadHeadObjectFieldNodeGen.create(Layouts.TAINTED_IDENTIFIER, false);
}

}
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ public class ReadInstanceVariableNode extends RubyNode implements ReadNode {
public ReadInstanceVariableNode(RubyContext context, SourceSection sourceSection, String name, RubyNode receiver, boolean isGlobal) {
super(context, sourceSection);
this.receiver = receiver;
readNode = ReadHeadObjectFieldNodeGen.create(context, sourceSection, name, nil(), null);
readNode = ReadHeadObjectFieldNodeGen.create(name, nil());
this.isGlobal = isGlobal;
}

Original file line number Diff line number Diff line change
@@ -11,23 +11,18 @@

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.Cached;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.api.object.*;
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.runtime.Options;
import org.jruby.truffle.runtime.RubyContext;

@NodeChild("receiver")
public abstract class ReadHeadObjectFieldNode extends RubyNode {
public abstract class ReadHeadObjectFieldNode extends Node {
private final Object defaultValue;
protected final Object name;

public ReadHeadObjectFieldNode(RubyContext context, SourceSection sourceSection, Object name, Object defaultValue) {
super(context, sourceSection);
public ReadHeadObjectFieldNode(Object name, Object defaultValue) {
this.name = name;
this.defaultValue = defaultValue;
}
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ public long objectID(DynamicObject object,
}

protected ReadHeadObjectFieldNode createReadObjectIDNode() {
return ReadHeadObjectFieldNodeGen.create(getContext(), getSourceSection(), Layouts.OBJECT_ID_IDENTIFIER, 0L, null);
return ReadHeadObjectFieldNodeGen.create(Layouts.OBJECT_ID_IDENTIFIER, 0L);
}

protected WriteHeadObjectFieldNode createWriteObjectIDNode() {
Original file line number Diff line number Diff line change
@@ -251,7 +251,7 @@ public static abstract class StatReadPrimitiveNode extends RubiniusPrimitiveNode

public StatReadPrimitiveNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
readStatNode = ReadHeadObjectFieldNodeGen.create(getContext(), getSourceSection(), STAT_IDENTIFIER, null, null);
readStatNode = ReadHeadObjectFieldNodeGen.create(STAT_IDENTIFIER, null);
}

public FileStat getStat(DynamicObject rubyStat) {
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ public boolean needsCallerFrame() {
}

public SharedMethodInfo withName(String newName) {
return new SharedMethodInfo(sourceSection, lexicalScope, arity, newName, isBlock, argumentDescriptors, alwaysClone, false, false);
return new SharedMethodInfo(sourceSection, lexicalScope, arity, newName, isBlock, argumentDescriptors, alwaysClone, alwaysInline, needsCallerFrame);
}

@Override