NFIBackendSignatureLibrary
public abstract class NFIBackendSignatureLibrary extends LibraryLibrary that specifies the protocol between the Truffle NFI and its backend implementations.
Constructors1
NFIBackendSignatureLibrary()
NFIBackendSignatureLibrary
implicitpublic NFIBackendSignatureLibrary()Creates a new NFIBackendSignatureLibrary instance.
Methods2
Object call(Object, Object, Object...)
call
abstractpublic abstract Object call(
Object signature,
Object functionPointer,
Object... args
) throws ArityException, UnsupportedTypeException, UnsupportedMessageExceptionCall a native function with this signature.
Parameters
Returns
Object- No description.
Throws
ArityException- No description.
UnsupportedTypeException- No description.
UnsupportedMessageException- No description.
Object createClosure(Object, Object)
createClosure
abstractCreate a function pointer closure that calls back into an executable object. This message must return something that's compatible with NativeSimpleType.POINTER. The returned pointer should be a function pointer. Calling that function pointer sends the InteropLibrary.execute message to the executable object. The returned object should not be executable. NFI backends can assume that the execute message of the executable object will never throw. Exceptions are instead stored as "pending" and rethrown at the next managed frame. Before an upcall, backends must save and clear any earlier pending exception using NFIState.savePendingException(). They must restore it using NFIState.restorePendingException(Throwable) in a finally block after the upcall. This scope must include argument and return conversion so nested native calls see a clean exception state and successful upcalls still return their results to native code. An earlier pending exception takes precedence over an exception from the new upcall.
Returns
Object- No description.
Inherited members
From class Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString