
com.oracle.truffle.tck.StructuredDataEntryMessageResolutionForeign 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.UnsupportedMessageException;
import com.oracle.truffle.api.interop.ForeignAccess.Factory10;
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;
final class StructuredDataEntryMessageResolutionForeign implements Factory10, Factory {
public static final ForeignAccess ACCESS = ForeignAccess.create(null, new StructuredDataEntryMessageResolutionForeign());
public static ForeignAccess createAccess() { return ForeignAccess.create(null, new StructuredDataEntryMessageResolutionForeign());}
private StructuredDataEntryMessageResolutionForeign(){}
public boolean canHandle(TruffleObject obj) {
return com.oracle.truffle.tck.StructuredDataEntry.isInstance(obj);
}
public CallTarget accessIsNull() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
public CallTarget accessIsExecutable() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
public CallTarget accessIsBoxed() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
public CallTarget accessHasSize() {
return Truffle.getRuntime().createCallTarget(RootNode.createConstantNode(false));
}
public CallTarget accessGetSize() {
throw UnsupportedMessageException.raise(Message.GET_SIZE);
}
public CallTarget accessUnbox() {
throw UnsupportedMessageException.raise(Message.UNBOX);
}
public CallTarget accessRead() {
return com.oracle.truffle.api.Truffle.getRuntime().createCallTarget(com.oracle.truffle.tck.StructuredDataEntryReadNodeSub.createRoot(com.oracle.truffle.tck.impl.TckLanguage.class));
}
public CallTarget accessWrite() {
throw UnsupportedMessageException.raise(Message.WRITE);
}
public CallTarget accessExecute(int argumentsLength) {
throw UnsupportedMessageException.raise(Message.createExecute(argumentsLength));
}
public CallTarget accessInvoke(int argumentsLength) {
throw UnsupportedMessageException.raise(Message.createInvoke(argumentsLength));
}
public CallTarget accessNew(int argumentsLength) {
throw UnsupportedMessageException.raise(Message.createNew(argumentsLength));
}
public CallTarget accessMessage(Message unknown) {
throw UnsupportedMessageException.raise(unknown);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy