public abstract class NativeSymbolLibrary
extends com.oracle.truffle.api.library.Library
| Constructor and Description |
|---|
NativeSymbolLibrary() |
| Modifier and Type | Method and Description |
|---|---|
Object |
call(Object receiver,
Object signature,
Object... args)
Call a native function with a specified signature.
|
boolean |
isBindable(Object receiver)
Returns
true if the receiver is a native symbol that can be bound to a signature
and subsequently called. |
Object |
prepareSignature(Object receiver,
NativeSignature signature)
Prepare a signature for use by the NFI backend.
|
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, lookupContextReference, lookupLanguageReference, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toStringpublic boolean isBindable(Object receiver)
true if the receiver is a native symbol that can be bound to a signature
and subsequently called.public Object prepareSignature(Object receiver, NativeSignature signature) throws com.oracle.truffle.api.interop.UnsupportedMessageException, com.oracle.truffle.api.interop.UnsupportedTypeException
com.oracle.truffle.api.interop.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnsupportedTypeExceptionpublic Object call(Object receiver, Object signature, Object... args) throws com.oracle.truffle.api.interop.ArityException, com.oracle.truffle.api.interop.UnsupportedMessageException, com.oracle.truffle.api.interop.UnsupportedTypeException
NativeSymbolLibrary.prepareSignature(java.lang.Object, com.oracle.truffle.nfi.spi.types.NativeSignature) message of this library, but not necessarily
with the same receiver symbol.com.oracle.truffle.api.interop.ArityExceptioncom.oracle.truffle.api.interop.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnsupportedTypeException