org.jruby.truffle.interop.ForeignExecuteNodeSub Maven / Gradle / Ivy
The newest version!
package org.jruby.truffle.interop;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.nodes.RootNode;
import com.oracle.truffle.api.TruffleLanguage;
import com.oracle.truffle.api.interop.ForeignAccess;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.interop.UnsupportedTypeException;
import java.util.List;
/**
* This message resolution is generated by {@link org.jruby.truffle.interop.RubyMessageResolution.ForeignExecuteNode}
* It is used by the foreign access factory {@link org.jruby.truffle.interop.RubyMessageResolutionForeign}
*/
public abstract class ForeignExecuteNodeSub extends org.jruby.truffle.interop.RubyMessageResolution.ForeignExecuteNode {
public abstract Object executeWithTarget(VirtualFrame frame, Object o0, Object o1);
@Specialization
protected Object accessWithTarget(com.oracle.truffle.api.frame.VirtualFrame frame, com.oracle.truffle.api.object.DynamicObject object, java.lang.Object[] arguments) {
return access(frame, object, arguments);
}
private static final class EXECUTERootNode extends RootNode {
protected EXECUTERootNode(Class extends TruffleLanguage>> language) {
super(language, null, null);
}
@Child private ForeignExecuteNodeSub node = org.jruby.truffle.interop.ForeignExecuteNodeSubNodeGen.create();
@Override
public Object execute(VirtualFrame frame) {
try {
Object receiver = ForeignAccess.getReceiver(frame);
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy