
com.oracle.truffle.tck.ComplexInvokeNodeSub Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truffle-tck Show documentation
Show all versions of truffle-tck Show documentation
A collection of tests that can certify language implementation to be compliant
with most recent requirements of the Truffle infrastructure and tooling.
package com.oracle.truffle.tck;
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;
abstract class ComplexInvokeNodeSub extends com.oracle.truffle.tck.ComplexNumberMessageResolution.ComplexInvokeNode {
public abstract Object executeWithTarget(VirtualFrame frame, Object o0, Object o1, Object o2);
@Specialization
protected Object accessWithTarget(com.oracle.truffle.tck.ComplexNumber complex, java.lang.String identifier, java.lang.Object[] arguments) {
return access(complex, identifier, arguments);
}
private final static class INVOKERootNode extends RootNode {
protected INVOKERootNode(Class extends TruffleLanguage>> language) {
super(language, null, null);
}
@Child private ComplexInvokeNodeSub node = com.oracle.truffle.tck.ComplexInvokeNodeSubNodeGen.create();
@Override
public Object execute(VirtualFrame frame) {
try {
Object receiver = ForeignAccess.getReceiver(frame);
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy