com.oracle.truffle.api.interop.java.NewNodeSub Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truffle-api Show documentation
Show all versions of truffle-api Show documentation
Truffle is a multi-language framework for executing dynamic languages
that achieves high performance when combined with Graal.
package com.oracle.truffle.api.interop.java;
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 com.oracle.truffle.api.interop.java.JavaObjectMessageResolution.NewNode}
* It is used by the foreign access factory {@link com.oracle.truffle.api.interop.java.JavaObjectMessageResolutionForeign}
*/
abstract class NewNodeSub extends com.oracle.truffle.api.interop.java.JavaObjectMessageResolution.NewNode {
public abstract Object executeWithTarget(VirtualFrame frame, Object o0, Object o1);
@Specialization
protected Object accessWithTarget(com.oracle.truffle.api.interop.java.JavaObject object, java.lang.Object[] args) {
return access(object, args);
}
private static final class NEWRootNode extends RootNode {
protected NEWRootNode(Class extends TruffleLanguage>> language) {
super(language, null, null);
}
@Child private NewNodeSub node = com.oracle.truffle.api.interop.java.NewNodeSubNodeGen.create();
@Override
public Object execute(VirtualFrame frame) {
try {
Object receiver = ForeignAccess.getReceiver(frame);
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy