public abstract class TruffleNFISupport extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TruffleNFISupport.ErrnoMirrorContext
Context for calling from native code into Java code.
|
static class |
TruffleNFISupport.NativeErrnoContext
Context for calling from Java code into native code.
|
Modifier and Type | Field and Description |
---|---|
String |
errnoGetterFunctionName |
Modifier | Constructor and Description |
---|---|
protected |
TruffleNFISupport(String errnoLocation) |
Modifier and Type | Method and Description |
---|---|
static void |
closeLocalScope(LocalNativeScope current,
LocalNativeScope parent) |
com.oracle.svm.truffle.nfi.LibFFI.NativeClosureHandle |
createClosureHandle(com.oracle.svm.truffle.nfi.NativeClosure closure) |
com.oracle.svm.truffle.nfi.NativeAPI.TruffleContextHandle |
createContextHandle(com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NFIContext context) |
TruffleObjectHandle |
createGlobalHandle(Object obj) |
static TruffleObjectHandle |
createLocalHandle(Object obj) |
static LocalNativeScope |
createLocalScope(int pinCount) |
void |
destroyClosureHandle(com.oracle.svm.truffle.nfi.LibFFI.NativeClosureHandle handle) |
void |
destroyContextHandle(com.oracle.svm.truffle.nfi.NativeAPI.TruffleContextHandle handle) |
void |
destroyGlobalHandle(TruffleObjectHandle handle) |
static void |
freeLibrary(long library) |
protected abstract void |
freeLibraryImpl(long library) |
protected static com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NFIContext |
getContext(long nativeContext) |
static byte[] |
javaStringToUtf8(String str) |
static long |
loadLibrary(long nativeContext,
String name,
int flags) |
protected abstract long |
loadLibraryImpl(long nativeContext,
String name,
int flags) |
static long |
lookup(long nativeContext,
long library,
String name) |
protected abstract long |
lookupImpl(long nativeContext,
long library,
String name) |
com.oracle.svm.truffle.nfi.NativeClosure |
resolveClosureHandle(com.oracle.svm.truffle.nfi.LibFFI.NativeClosureHandle handle) |
com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NFIContext |
resolveContextHandle(com.oracle.svm.truffle.nfi.NativeAPI.TruffleContextHandle handle) |
Object |
resolveHandle(TruffleObjectHandle handle) |
static org.graalvm.nativeimage.c.type.CCharPointer |
strdup(org.graalvm.nativeimage.c.type.CCharPointer src) |
protected abstract org.graalvm.nativeimage.c.type.CCharPointer |
strdupImpl(org.graalvm.nativeimage.c.type.CCharPointer src) |
static String |
utf8ToJavaString(org.graalvm.nativeimage.c.type.CCharPointer str) |
public final String errnoGetterFunctionName
protected TruffleNFISupport(String errnoLocation)
public static LocalNativeScope createLocalScope(int pinCount)
public static void closeLocalScope(LocalNativeScope current, LocalNativeScope parent)
public static TruffleObjectHandle createLocalHandle(Object obj)
public TruffleObjectHandle createGlobalHandle(Object obj)
public void destroyGlobalHandle(TruffleObjectHandle handle)
public Object resolveHandle(TruffleObjectHandle handle)
public com.oracle.svm.truffle.nfi.LibFFI.NativeClosureHandle createClosureHandle(com.oracle.svm.truffle.nfi.NativeClosure closure)
public com.oracle.svm.truffle.nfi.NativeClosure resolveClosureHandle(com.oracle.svm.truffle.nfi.LibFFI.NativeClosureHandle handle)
public void destroyClosureHandle(com.oracle.svm.truffle.nfi.LibFFI.NativeClosureHandle handle)
public com.oracle.svm.truffle.nfi.NativeAPI.TruffleContextHandle createContextHandle(com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NFIContext context)
public com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NFIContext resolveContextHandle(com.oracle.svm.truffle.nfi.NativeAPI.TruffleContextHandle handle)
public void destroyContextHandle(com.oracle.svm.truffle.nfi.NativeAPI.TruffleContextHandle handle)
public static String utf8ToJavaString(org.graalvm.nativeimage.c.type.CCharPointer str)
public static byte[] javaStringToUtf8(String str)
protected abstract org.graalvm.nativeimage.c.type.CCharPointer strdupImpl(org.graalvm.nativeimage.c.type.CCharPointer src)
protected abstract long loadLibraryImpl(long nativeContext, String name, int flags)
protected abstract void freeLibraryImpl(long library)
protected abstract long lookupImpl(long nativeContext, long library, String name)
public static org.graalvm.nativeimage.c.type.CCharPointer strdup(org.graalvm.nativeimage.c.type.CCharPointer src)
public static long loadLibrary(long nativeContext, String name, int flags)
public static void freeLibrary(long library)
public static long lookup(long nativeContext, long library, String name)
protected static com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NFIContext getContext(long nativeContext)