com.oracle.truffle.sl.runtime.SLNullMessageResolutionForeign Maven / Gradle / Ivy
package com.oracle.truffle.sl.runtime;
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 SLNullMessageResolutionForeign implements Factory10, Factory {
public static final ForeignAccess ACCESS = ForeignAccess.create(new SLNullMessageResolutionForeign(), com.oracle.truffle.sl.runtime.CheckNullSub.createRoot(com.oracle.truffle.sl.SLLanguage.class));
public static ForeignAccess createAccess() { return ForeignAccess.create(new SLNullMessageResolutionForeign(), com.oracle.truffle.sl.runtime.CheckNullSub.createRoot(com.oracle.truffle.sl.SLLanguage.class));}
private SLNullMessageResolutionForeign(){}
public boolean canHandle(TruffleObject obj) {
return (boolean) Truffle.getRuntime().createCallTarget(com.oracle.truffle.sl.runtime.CheckNullSub.createRoot(com.oracle.truffle.sl.SLLanguage.class)).call(obj);
}
public CallTarget accessIsNull() {
return Truffle.getRuntime().createCallTarget(com.oracle.truffle.sl.runtime.SLForeignIsNullNodeSub.createRoot(com.oracle.truffle.sl.SLLanguage.class));
}
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() {
throw UnsupportedMessageException.raise(Message.READ);
}
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