Skip to content

Commit

Permalink
Showing 20 changed files with 8 additions and 441 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
import java.util.List;

@NodeChild(value="method", type = RubyNode.class)
public abstract class ExecuteMethodNode extends AbstractExecuteMethodNode {
public abstract class ExecuteMethodNode extends RubyNode {
@Child private IndirectCallNode callNode;
public ExecuteMethodNode(RubyContext context,
SourceSection sourceSection) {
@@ -74,10 +74,6 @@ protected Object doCall(VirtualFrame frame, DynamicObject method) {
return callNode.call(frame, internalMethod.getCallTarget(), RubyArguments.pack(null, null, internalMethod, DeclarationContext.METHOD, null, Layouts.METHOD.getReceiver(method), null, args));
}

protected InternalMethod getMethodFromProc(DynamicObject proc) {
return Layouts.PROC.getMethod(proc);
}

protected CallTarget getCallTarget(DynamicObject proc) {
return Layouts.PROC.getCallTargetForType(proc);
}
@@ -86,4 +82,5 @@ protected InternalMethod getMethod(DynamicObject method) {
return Layouts.METHOD.getMethod(method);
}

public abstract Object executeWithTarget(VirtualFrame frame, Object method);
}
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.AcceptMessage;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.Node.Child;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.RubyLanguage;
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
import com.oracle.truffle.api.interop.AcceptMessage;
import com.oracle.truffle.api.interop.ForeignAccess;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.Node.Child;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.RubyLanguage;
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.AcceptMessage;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.Node.Child;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.RubyLanguage;
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.AcceptMessage;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.Node.Child;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.RubyLanguage;
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.AcceptMessage;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.Node.Child;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.RubyLanguage;
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.AcceptMessage;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.Node.Child;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.RubyLanguage;

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions truffle/src/main/java/org/jruby/truffle/interop/InteropIsNull.java

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@
public class ResolvedInteropExecuteAfterReadNode extends RubyNode {

@Child private DispatchHeadNode head;
@Child private InteropArgumentsNode arguments;
private final String name;
private final int labelIndex;
private final int receiverIndex;
@@ -33,16 +32,13 @@ public ResolvedInteropExecuteAfterReadNode(RubyContext context, SourceSection so
super(context, sourceSection);
this.name = name;
this.head = new DispatchHeadNode(context, true, MissingBehavior.CALL_METHOD_MISSING, DispatchAction.CALL_METHOD);
this.arguments = new InteropArgumentsNode(context, sourceSection, arity); // [0] is receiver, [1] is the label
this.labelIndex = 1;
this.receiverIndex = 0;
}

@Override
public Object execute(VirtualFrame frame) {
if (name.equals(frame.getArguments()[labelIndex])) {
//Object[] args = new Object[arguments.getCount(frame)];
//arguments.executeFillObjectArray(frame, args);
final List<Object> arguments = ForeignAccess.getArguments(frame);
return head.dispatch(frame, frame.getArguments()[receiverIndex], frame.getArguments()[labelIndex], null, arguments.subList(1, arguments.size()).toArray());
} else {

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@
import com.oracle.truffle.api.object.ObjectType;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.interop.RubyForeignAccessFactory;
import org.jruby.truffle.core.rope.RopeOperations;
import org.jruby.truffle.core.string.StringOperations;

0 comments on commit a63f1cf

Please sign in to comment.