class com.oracle.svm.truffle.nfi.NativeSignature$ExecuteHelper
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.oracle.svm.truffle.nfi.NativeSignature$ExecuteHelper
super_class: java.lang.Object
{
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/oracle/svm/truffle/nfi/NativeSignature$ExecuteHelper;
static int alignUp(int, int);
descriptor: (II)I
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: iload 0
istore 2
start local 2 1: iload 2
iload 1
irem
ifeq 3
2: iload 2
iload 1
iload 2
iload 1
irem
isub
iadd
istore 2
3: StackMap locals: int
StackMap stack:
iload 2
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 index I
0 4 1 alignment I
1 4 2 ret I
MethodParameters:
Name Flags
index
alignment
static void execute(com.oracle.svm.truffle.nfi.NativeAPI$NativeTruffleContext, com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_cif, org.graalvm.word.PointerBase, long, byte[], int, int[], java.lang.Object[], com.oracle.svm.truffle.nfi.LocalNativeScope);
descriptor: (Lcom/oracle/svm/truffle/nfi/NativeAPI$NativeTruffleContext;Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;Lorg/graalvm/word/PointerBase;J[BI[I[Ljava/lang/Object;Lcom/oracle/svm/truffle/nfi/LocalNativeScope;)V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=24, args_size=9
start local 0 start local 1 start local 2 start local 3 start local 5 start local 6 start local 7 start local 8 start local 9 0: aload 1
invokeinterface com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_cif.nargs:()I
istore 10
start local 10 1: iload 10
ldc Lorg/graalvm/nativeimage/c/type/WordPointer;
invokestatic org.graalvm.nativeimage.c.struct.SizeOf.get:(Ljava/lang/Class;)I
imul
invokestatic org.graalvm.nativeimage.UnmanagedMemory.malloc:(I)Lorg/graalvm/word/PointerBase;
checkcast org.graalvm.nativeimage.c.type.WordPointer
astore 11
start local 11 2: ldc Lcom/oracle/svm/truffle/nfi/NativeAPI$NativeTruffleEnv;
invokestatic org.graalvm.nativeimage.StackValue.get:(Ljava/lang/Class;)Lorg/graalvm/word/PointerBase;
checkcast com.oracle.svm.truffle.nfi.NativeAPI$NativeTruffleEnv
astore 12
start local 12 3: aload 12
aload 0
invokestatic com.oracle.svm.truffle.nfi.NFIInitialization.initializeEnv:(Lcom/oracle/svm/truffle/nfi/NativeAPI$NativeTruffleEnv;Lcom/oracle/svm/truffle/nfi/NativeAPI$NativeTruffleContext;)V
4: aconst_null
astore 13
aconst_null
astore 14
5: aload 5
invokestatic org.graalvm.nativeimage.PinnedObject.create:(Ljava/lang/Object;)Lorg/graalvm/nativeimage/PinnedObject;
astore 15
start local 15 6: aload 15
iconst_0
invokeinterface org.graalvm.nativeimage.PinnedObject.addressOfArrayElement:(I)Lorg/graalvm/word/PointerBase;
checkcast org.graalvm.word.Pointer
astore 16
start local 16 7: iconst_0
istore 17
start local 17 8: iconst_0
istore 18
start local 18 9: goto 15
10: StackMap locals: com.oracle.svm.truffle.nfi.NativeAPI$NativeTruffleContext com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_cif org.graalvm.word.PointerBase long byte[] int int[] java.lang.Object[] com.oracle.svm.truffle.nfi.LocalNativeScope int org.graalvm.nativeimage.c.type.WordPointer com.oracle.svm.truffle.nfi.NativeAPI$NativeTruffleEnv java.lang.Throwable java.lang.Throwable org.graalvm.nativeimage.PinnedObject org.graalvm.word.Pointer int int
StackMap stack:
aload 1
invokeinterface com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_cif.arg_types:()Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_type_array;
iload 18
invokeinterface com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_type_array.read:(I)Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_type;
astore 19
start local 19 11: iload 17
aload 19
invokeinterface com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_type.alignment:()S
invokestatic com.oracle.svm.truffle.nfi.NativeSignature$ExecuteHelper.alignUp:(II)I
istore 17
12: aload 11
iload 18
aload 16
iload 17
invokeinterface org.graalvm.word.Pointer.add:(I)Lorg/graalvm/word/Pointer;
invokeinterface org.graalvm.nativeimage.c.type.WordPointer.write:(ILorg/graalvm/word/WordBase;)V
13: iload 17
i2l
aload 19
invokeinterface com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_type.size:()Lorg/graalvm/word/UnsignedWord;
invokeinterface org.graalvm.word.UnsignedWord.rawValue:()J
ladd
l2i
istore 17
end local 19 14: iinc 18 1
StackMap locals:
StackMap stack:
15: iload 18
iload 10
if_icmplt 10
end local 18 16: iconst_0
istore 18
start local 18 17: goto 36
18: StackMap locals:
StackMap stack:
aload 7
iload 18
iaload
invokestatic com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag.getTag:(I)Lcom/oracle/svm/truffle/nfi/Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag;
astore 19
start local 19 19: aload 7
iload 18
iaload
invokestatic com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag.getOffset:(I)I
istore 20
start local 20 20: aload 8
iload 18
aaload
astore 21
start local 21 21: aload 19
getstatic com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag.OBJECT:Lcom/oracle/svm/truffle/nfi/Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag;
if_acmpne 25
22: aload 9
aload 21
invokevirtual com.oracle.svm.truffle.nfi.LocalNativeScope.createLocalHandle:(Ljava/lang/Object;)Lcom/oracle/svm/truffle/nfi/TruffleObjectHandle;
astore 22
start local 22 23: aload 16
iload 20
aload 22
invokeinterface org.graalvm.word.Pointer.writeWord:(ILorg/graalvm/word/WordBase;)V
end local 22 24: goto 35
StackMap locals: com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag int java.lang.Object
StackMap stack:
25: aload 19
getstatic com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag.STRING:Lcom/oracle/svm/truffle/nfi/Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag;
if_acmpne 29
26: aload 9
aload 21
checkcast java.lang.String
invokevirtual com.oracle.svm.truffle.nfi.LocalNativeScope.pinString:(Ljava/lang/String;)Lorg/graalvm/word/PointerBase;
astore 22
start local 22 27: aload 16
iload 20
aload 22
invokeinterface org.graalvm.word.Pointer.writeWord:(ILorg/graalvm/word/WordBase;)V
end local 22 28: goto 35
StackMap locals:
StackMap stack:
29: aload 19
getstatic com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag.KEEPALIVE:Lcom/oracle/svm/truffle/nfi/Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag;
if_acmpeq 35
30: aload 19
getstatic com.oracle.svm.truffle.nfi.Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag.ENV:Lcom/oracle/svm/truffle/nfi/Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag;
if_acmpne 33
31: aload 16
iload 20
aload 12
invokeinterface org.graalvm.word.Pointer.writeWord:(ILorg/graalvm/word/WordBase;)V
32: goto 35
33: StackMap locals:
StackMap stack:
aload 9
aload 21
invokevirtual com.oracle.svm.truffle.nfi.LocalNativeScope.pinArray:(Ljava/lang/Object;)Lorg/graalvm/word/PointerBase;
astore 22
start local 22 34: aload 16
iload 20
aload 22
invokeinterface org.graalvm.word.Pointer.writeWord:(ILorg/graalvm/word/WordBase;)V
end local 22 end local 21 end local 20 end local 19 35: StackMap locals:
StackMap stack:
iinc 18 1
StackMap locals:
StackMap stack:
36: iload 18
iload 6
if_icmplt 18
end local 18 37: aload 1
lload 3
invokestatic org.graalvm.word.WordFactory.pointer:(J)Lorg/graalvm/word/PointerBase;
aload 2
aload 11
getstatic com.oracle.svm.truffle.nfi.ErrnoMirror.errnoMirror:Lcom/oracle/svm/core/threadlocal/FastThreadLocalBytes;
invokevirtual com.oracle.svm.core.threadlocal.FastThreadLocalBytes.getAddress:()Lorg/graalvm/word/PointerBase;
checkcast org.graalvm.nativeimage.c.type.CIntPointer
invokestatic com.oracle.svm.truffle.nfi.NativeSignature$ExecuteHelper.ffiCall:(Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;Lorg/graalvm/word/PointerBase;Lorg/graalvm/word/PointerBase;Lorg/graalvm/nativeimage/c/type/WordPointer;Lorg/graalvm/nativeimage/c/type/CIntPointer;)V
38: getstatic com.oracle.svm.truffle.nfi.NativeClosure.pendingException:Lcom/oracle/svm/core/threadlocal/FastThreadLocalObject;
invokevirtual com.oracle.svm.core.threadlocal.FastThreadLocalObject.get:()Ljava/lang/Object;
checkcast java.lang.Throwable
astore 18
start local 18 39: aload 18
ifnull 42
40: getstatic com.oracle.svm.truffle.nfi.NativeClosure.pendingException:Lcom/oracle/svm/core/threadlocal/FastThreadLocalObject;
aconst_null
invokevirtual com.oracle.svm.core.threadlocal.FastThreadLocalObject.set:(Ljava/lang/Object;)V
41: aload 18
invokestatic com.oracle.svm.truffle.nfi.NativeSignature.rethrow:(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
athrow
end local 18 end local 17 end local 16 42: StackMap locals:
StackMap stack:
aload 15
ifnull 51
aload 15
invokeinterface org.graalvm.nativeimage.PinnedObject.close:()V
goto 51
StackMap locals:
StackMap stack: java.lang.Throwable
43: astore 13
aload 15
ifnull 44
aload 15
invokeinterface org.graalvm.nativeimage.PinnedObject.close:()V
end local 15 StackMap locals:
StackMap stack:
44: aload 13
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
45: astore 14
aload 13
ifnonnull 46
aload 14
astore 13
goto 47
StackMap locals:
StackMap stack:
46: aload 13
aload 14
if_acmpeq 47
aload 13
aload 14
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
47: aload 13
athrow
StackMap locals: com.oracle.svm.truffle.nfi.NativeAPI$NativeTruffleContext com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_cif org.graalvm.word.PointerBase long byte[] int int[] java.lang.Object[] com.oracle.svm.truffle.nfi.LocalNativeScope int org.graalvm.nativeimage.c.type.WordPointer com.oracle.svm.truffle.nfi.NativeAPI$NativeTruffleEnv
StackMap stack: java.lang.Throwable
48: astore 23
49: aload 11
invokestatic org.graalvm.nativeimage.UnmanagedMemory.free:(Lorg/graalvm/word/PointerBase;)V
50: aload 23
athrow
51: StackMap locals:
StackMap stack:
aload 11
invokestatic org.graalvm.nativeimage.UnmanagedMemory.free:(Lorg/graalvm/word/PointerBase;)V
52: return
end local 12 end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 53 0 ctx Lcom/oracle/svm/truffle/nfi/NativeAPI$NativeTruffleContext;
0 53 1 cif Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;
0 53 2 ret Lorg/graalvm/word/PointerBase;
0 53 3 functionPointer J
0 53 5 primArgs [B
0 53 6 patchCount I
0 53 7 patchOffsets [I
0 53 8 objArgs [Ljava/lang/Object;
0 53 9 scope Lcom/oracle/svm/truffle/nfi/LocalNativeScope;
1 53 10 nargs I
2 53 11 argPtrs Lorg/graalvm/nativeimage/c/type/WordPointer;
3 53 12 env Lcom/oracle/svm/truffle/nfi/NativeAPI$NativeTruffleEnv;
6 44 15 primBuffer Lorg/graalvm/nativeimage/PinnedObject;
7 42 16 prim Lorg/graalvm/word/Pointer;
8 42 17 primIdx I
9 16 18 i I
11 14 19 type Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_type;
17 37 18 i I
19 35 19 tag Lcom/oracle/svm/truffle/nfi/Target_com_oracle_truffle_nfi_impl_NativeArgumentBuffer_TypeTag;
20 35 20 offset I
21 35 21 obj Ljava/lang/Object;
23 24 22 handle Lorg/graalvm/word/WordBase;
27 28 22 strPtr Lorg/graalvm/word/PointerBase;
34 35 22 arrPtr Lorg/graalvm/word/PointerBase;
39 42 18 pending Ljava/lang/Throwable;
Exception table:
from to target type
6 42 43 any
5 45 45 any
4 48 48 any
MethodParameters:
Name Flags
ctx
cif
ret
functionPointer
primArgs
patchCount
patchOffsets
objArgs
scope
private static void ffiCall(com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_cif, org.graalvm.word.PointerBase, org.graalvm.word.PointerBase, org.graalvm.nativeimage.c.type.WordPointer, org.graalvm.nativeimage.c.type.CIntPointer);
descriptor: (Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;Lorg/graalvm/word/PointerBase;Lorg/graalvm/word/PointerBase;Lorg/graalvm/nativeimage/c/type/WordPointer;Lorg/graalvm/nativeimage/c/type/CIntPointer;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: iconst_3
invokestatic com.oracle.svm.core.nodes.CFunctionPrologueNode.cFunctionPrologue:(I)V
1: aload 0
aload 1
aload 2
aload 3
aload 4
invokestatic com.oracle.svm.truffle.nfi.NativeSignature$ExecuteHelper.doFfiCall:(Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;Lorg/graalvm/word/PointerBase;Lorg/graalvm/word/PointerBase;Lorg/graalvm/nativeimage/c/type/WordPointer;Lorg/graalvm/nativeimage/c/type/CIntPointer;)V
2: iconst_3
invokestatic com.oracle.svm.core.nodes.CFunctionEpilogueNode.cFunctionEpilogue:(I)V
3: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 cif Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;
0 4 1 fn Lorg/graalvm/word/PointerBase;
0 4 2 rvalue Lorg/graalvm/word/PointerBase;
0 4 3 avalue Lorg/graalvm/nativeimage/c/type/WordPointer;
0 4 4 errnoMirror Lorg/graalvm/nativeimage/c/type/CIntPointer;
RuntimeVisibleAnnotations:
com.oracle.svm.core.annotate.NeverInline(value = "Must not be inlined in a caller that has an exception handler: We only support InvokeNode and not InvokeWithExceptionNode between a CFunctionPrologueNode and CFunctionEpilogueNode")
MethodParameters:
Name Flags
cif
fn
rvalue
avalue
errnoMirror
private static void doFfiCall(com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_cif, org.graalvm.word.PointerBase, org.graalvm.word.PointerBase, org.graalvm.nativeimage.c.type.WordPointer, org.graalvm.nativeimage.c.type.CIntPointer);
descriptor: (Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;Lorg/graalvm/word/PointerBase;Lorg/graalvm/word/PointerBase;Lorg/graalvm/nativeimage/c/type/WordPointer;Lorg/graalvm/nativeimage/c/type/CIntPointer;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 4
invokeinterface org.graalvm.nativeimage.c.type.CIntPointer.read:()I
invokestatic com.oracle.svm.core.CErrorNumber.setCErrorNumber:(I)V
1: aload 0
aload 1
aload 2
aload 3
invokestatic com.oracle.svm.truffle.nfi.libffi.LibFFI$NoTransitions.ffi_call:(Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;Lorg/graalvm/word/PointerBase;Lorg/graalvm/word/PointerBase;Lorg/graalvm/nativeimage/c/type/WordPointer;)V
2: aload 4
invokestatic com.oracle.svm.core.CErrorNumber.getCErrorNumber:()I
invokeinterface org.graalvm.nativeimage.c.type.CIntPointer.write:(I)V
3: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 cif Lcom/oracle/svm/truffle/nfi/libffi/LibFFI$ffi_cif;
0 4 1 fn Lorg/graalvm/word/PointerBase;
0 4 2 rvalue Lorg/graalvm/word/PointerBase;
0 4 3 avalue Lorg/graalvm/nativeimage/c/type/WordPointer;
0 4 4 errnoMirror Lorg/graalvm/nativeimage/c/type/CIntPointer;
RuntimeVisibleAnnotations:
com.oracle.svm.core.annotate.Uninterruptible(reason = "In native.")
com.oracle.svm.core.annotate.NeverInline(value = "Can have only a single invoke between CFunctionPrologueNode and CFunctionEpilogueNode.")
MethodParameters:
Name Flags
cif
fn
rvalue
avalue
errnoMirror
}
SourceFile: "NativeSignature.java"
NestHost: com.oracle.svm.truffle.nfi.NativeSignature
InnerClasses:
public abstract NativeTruffleContext = com.oracle.svm.truffle.nfi.NativeAPI$NativeTruffleContext of com.oracle.svm.truffle.nfi.NativeAPI
public abstract NativeTruffleEnv = com.oracle.svm.truffle.nfi.NativeAPI$NativeTruffleEnv of com.oracle.svm.truffle.nfi.NativeAPI
ExecuteHelper = com.oracle.svm.truffle.nfi.NativeSignature$ExecuteHelper of com.oracle.svm.truffle.nfi.NativeSignature
public NoTransitions = com.oracle.svm.truffle.nfi.libffi.LibFFI$NoTransitions of com.oracle.svm.truffle.nfi.libffi.LibFFI
public abstract ffi_cif = com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_cif of com.oracle.svm.truffle.nfi.libffi.LibFFI
public abstract ffi_type = com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_type of com.oracle.svm.truffle.nfi.libffi.LibFFI
public abstract ffi_type_array = com.oracle.svm.truffle.nfi.libffi.LibFFI$ffi_type_array of com.oracle.svm.truffle.nfi.libffi.LibFFI