com.oracle.truffle.tck.ComplexNumberMessageResolutionForeign 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.interop.ForeignAccess.Factory18;
import com.oracle.truffle.api.interop.ForeignAccess.Factory;
import com.oracle.truffle.api.interop.Message;
import com.oracle.truffle.api.interop.ForeignAccess;
import com.oracle.truffle.api.interop.TruffleObject;
import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.nodes.RootNode;
/**
* This foreign access factory is generated by {@link com.oracle.truffle.tck.ComplexNumberMessageResolution}.
* You are supposed to use it for the receiver object {@link com.oracle.truffle.tck.ComplexNumber}.
*/
final class ComplexNumberMessageResolutionForeign implements Factory18, Factory {
public static final ForeignAccess ACCESS = ForeignAccess.create(new ComplexNumberMessageResolutionForeign(), null);
public static ForeignAccess createAccess() { return ForeignAccess.create(new ComplexNumberMessageResolutionForeign(), null); }
private ComplexNumberMessageResolutionForeign() { }
@Override
public boolean canHandle(TruffleObject obj) {
return com.oracle.truffle.tck.ComplexNumber.isInstance(obj);
}
@Override
public CallTarget accessIsNull() {
return Truffle.getRuntime().createCallTarget(com.oracle.truffle.tck.ComplexIsNullNodeSub.createRoot(com.oracle.truffle.tck.impl.TckLanguage.class));
}
@Override
public CallTarget accessIsExecutable() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
@Override
public CallTarget accessIsBoxed() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
@Override
public CallTarget accessHasSize() {
return Truffle.getRuntime().createCallTarget(com.oracle.truffle.tck.ComplexHasSizeNodeSub.createRoot(com.oracle.truffle.tck.impl.TckLanguage.class));
}
@Override
public CallTarget accessGetSize() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(com.oracle.truffle.tck.ComplexGetSizeNodeSub.createRoot(com.oracle.truffle.tck.impl.TckLanguage.class));
}
@Override
public CallTarget accessUnbox() {
return null;
}
@Override
public CallTarget accessRead() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(com.oracle.truffle.tck.ComplexReadNodeSub.createRoot(com.oracle.truffle.tck.impl.TckLanguage.class));
}
@Override
public CallTarget accessWrite() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(com.oracle.truffle.tck.ComplexWriteNodeSub.createRoot(com.oracle.truffle.tck.impl.TckLanguage.class));
}
@Override
public CallTarget accessExecute(int argumentsLength) {
return null;
}
@Override
public CallTarget accessInvoke(int argumentsLength) {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(com.oracle.truffle.tck.ComplexInvokeNodeSub.createRoot(com.oracle.truffle.tck.impl.TckLanguage.class));
}
@Override
public CallTarget accessNew(int argumentsLength) {
return null;
}
@Override
public CallTarget accessKeys() {
return null;
}
@Override
public CallTarget accessMessage(Message unknown) {
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy