public class jdk.internal.foreign.abi.CallingSequenceBuilder
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.foreign.abi.CallingSequenceBuilder
super_class: java.lang.Object
{
private static final boolean VERIFY_BINDINGS;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private boolean isTrivial;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private final boolean forUpcall;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.List<java.util.List<jdk.internal.foreign.abi.Binding>> inputBindings;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;>;
private java.util.List<jdk.internal.foreign.abi.Binding> outputBindings;
descriptor: Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;
private java.lang.invoke.MethodType mt;
descriptor: Ljava/lang/invoke/MethodType;
flags: (0x0002) ACC_PRIVATE
private jdk.incubator.foreign.FunctionDescriptor desc;
descriptor: Ljdk/incubator/foreign/FunctionDescriptor;
flags: (0x0002) ACC_PRIVATE
private static final java.util.Set<jdk.internal.foreign.abi.Binding$Tag> UNBOX_TAGS;
descriptor: Ljava/util/Set;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Set<Ljdk/internal/foreign/abi/Binding$Tag;>;
private static final java.util.Set<jdk.internal.foreign.abi.Binding$Tag> BOX_TAGS;
descriptor: Ljava/util/Set;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Set<Ljdk/internal/foreign/abi/Binding$Tag;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=0, args_size=0
0: ldc "jdk.incubator.foreign.VERIFY_BINDINGS"
ldc "true"
invokestatic sun.security.action.GetPropertyAction.privilegedGetProperty:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
1: invokestatic java.lang.Boolean.parseBoolean:(Ljava/lang/String;)Z
putstatic jdk.internal.foreign.abi.CallingSequenceBuilder.VERIFY_BINDINGS:Z
2: getstatic jdk.internal.foreign.abi.Binding$Tag.VM_STORE:Ljdk/internal/foreign/abi/Binding$Tag;
iconst_5
anewarray jdk.internal.foreign.abi.Binding$Tag
dup
iconst_0
3: getstatic jdk.internal.foreign.abi.Binding$Tag.BUFFER_LOAD:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_1
4: getstatic jdk.internal.foreign.abi.Binding$Tag.COPY_BUFFER:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_2
5: getstatic jdk.internal.foreign.abi.Binding$Tag.UNBOX_ADDRESS:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_3
6: getstatic jdk.internal.foreign.abi.Binding$Tag.BASE_ADDRESS:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_4
7: getstatic jdk.internal.foreign.abi.Binding$Tag.DUP:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
8: invokestatic java.util.EnumSet.of:(Ljava/lang/Enum;[Ljava/lang/Enum;)Ljava/util/EnumSet;
putstatic jdk.internal.foreign.abi.CallingSequenceBuilder.UNBOX_TAGS:Ljava/util/Set;
9: getstatic jdk.internal.foreign.abi.Binding$Tag.VM_LOAD:Ljdk/internal/foreign/abi/Binding$Tag;
bipush 6
anewarray jdk.internal.foreign.abi.Binding$Tag
dup
iconst_0
10: getstatic jdk.internal.foreign.abi.Binding$Tag.BUFFER_STORE:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_1
11: getstatic jdk.internal.foreign.abi.Binding$Tag.COPY_BUFFER:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_2
12: getstatic jdk.internal.foreign.abi.Binding$Tag.ALLOC_BUFFER:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_3
13: getstatic jdk.internal.foreign.abi.Binding$Tag.BOX_ADDRESS:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_4
14: getstatic jdk.internal.foreign.abi.Binding$Tag.TO_SEGMENT:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
dup
iconst_5
15: getstatic jdk.internal.foreign.abi.Binding$Tag.DUP:Ljdk/internal/foreign/abi/Binding$Tag;
aastore
16: invokestatic java.util.EnumSet.of:(Ljava/lang/Enum;[Ljava/lang/Enum;)Ljava/util/EnumSet;
putstatic jdk.internal.foreign.abi.CallingSequenceBuilder.BOX_TAGS:Ljava/util/Set;
17: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.inputBindings:Ljava/util/List;
2: aload 0
invokestatic java.util.List.of:()Ljava/util/List;
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.outputBindings:Ljava/util/List;
3: aload 0
getstatic java.lang.Void.TYPE:Ljava/lang/Class;
invokestatic java.lang.invoke.MethodType.methodType:(Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.mt:Ljava/lang/invoke/MethodType;
4: aload 0
iconst_0
anewarray jdk.incubator.foreign.MemoryLayout
invokestatic jdk.incubator.foreign.FunctionDescriptor.ofVoid:([Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/FunctionDescriptor;
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.desc:Ljdk/incubator/foreign/FunctionDescriptor;
5: aload 0
iload 1
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.forUpcall:Z
6: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/foreign/abi/CallingSequenceBuilder;
0 7 1 forUpcall Z
MethodParameters:
Name Flags
forUpcall
public final jdk.internal.foreign.abi.CallingSequenceBuilder addArgumentBindings(java.lang.Class<?>, jdk.incubator.foreign.MemoryLayout, java.util.List<jdk.internal.foreign.abi.Binding>);
descriptor: (Ljava/lang/Class;Ljdk/incubator/foreign/MemoryLayout;Ljava/util/List;)Ljdk/internal/foreign/abi/CallingSequenceBuilder;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
iconst_1
aload 1
aload 3
invokevirtual jdk.internal.foreign.abi.CallingSequenceBuilder.verifyBindings:(ZLjava/lang/Class;Ljava/util/List;)V
1: aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.inputBindings:Ljava/util/List;
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
2: aload 0
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.mt:Ljava/lang/invoke/MethodType;
iconst_1
anewarray java.lang.Class
dup
iconst_0
aload 1
aastore
invokevirtual java.lang.invoke.MethodType.appendParameterTypes:([Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.mt:Ljava/lang/invoke/MethodType;
3: aload 0
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.desc:Ljdk/incubator/foreign/FunctionDescriptor;
iconst_1
anewarray jdk.incubator.foreign.MemoryLayout
dup
iconst_0
aload 2
aastore
invokevirtual jdk.incubator.foreign.FunctionDescriptor.withAppendedArgumentLayouts:([Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/FunctionDescriptor;
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.desc:Ljdk/incubator/foreign/FunctionDescriptor;
4: aload 0
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/foreign/abi/CallingSequenceBuilder;
0 5 1 carrier Ljava/lang/Class<*>;
0 5 2 layout Ljdk/incubator/foreign/MemoryLayout;
0 5 3 bindings Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;
Signature: (Ljava/lang/Class<*>;Ljdk/incubator/foreign/MemoryLayout;Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;)Ljdk/internal/foreign/abi/CallingSequenceBuilder;
MethodParameters:
Name Flags
carrier
layout
bindings
public jdk.internal.foreign.abi.CallingSequenceBuilder setReturnBindings(java.lang.Class<?>, jdk.incubator.foreign.MemoryLayout, java.util.List<jdk.internal.foreign.abi.Binding>);
descriptor: (Ljava/lang/Class;Ljdk/incubator/foreign/MemoryLayout;Ljava/util/List;)Ljdk/internal/foreign/abi/CallingSequenceBuilder;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
iconst_0
aload 1
aload 3
invokevirtual jdk.internal.foreign.abi.CallingSequenceBuilder.verifyBindings:(ZLjava/lang/Class;Ljava/util/List;)V
1: aload 0
aload 3
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.outputBindings:Ljava/util/List;
2: aload 0
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.mt:Ljava/lang/invoke/MethodType;
aload 1
invokevirtual java.lang.invoke.MethodType.changeReturnType:(Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.mt:Ljava/lang/invoke/MethodType;
3: aload 0
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.desc:Ljdk/incubator/foreign/FunctionDescriptor;
aload 2
invokevirtual jdk.incubator.foreign.FunctionDescriptor.withReturnLayout:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/FunctionDescriptor;
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.desc:Ljdk/incubator/foreign/FunctionDescriptor;
4: aload 0
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/foreign/abi/CallingSequenceBuilder;
0 5 1 carrier Ljava/lang/Class<*>;
0 5 2 layout Ljdk/incubator/foreign/MemoryLayout;
0 5 3 bindings Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;
Signature: (Ljava/lang/Class<*>;Ljdk/incubator/foreign/MemoryLayout;Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;)Ljdk/internal/foreign/abi/CallingSequenceBuilder;
MethodParameters:
Name Flags
carrier
layout
bindings
public jdk.internal.foreign.abi.CallingSequenceBuilder setTrivial(boolean);
descriptor: (Z)Ljdk/internal/foreign/abi/CallingSequenceBuilder;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield jdk.internal.foreign.abi.CallingSequenceBuilder.isTrivial:Z
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/internal/foreign/abi/CallingSequenceBuilder;
0 2 1 isTrivial Z
MethodParameters:
Name Flags
isTrivial
public jdk.internal.foreign.abi.CallingSequence build();
descriptor: ()Ljdk/internal/foreign/abi/CallingSequence;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=1, args_size=1
start local 0 0: new jdk.internal.foreign.abi.CallingSequence
dup
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.mt:Ljava/lang/invoke/MethodType;
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.desc:Ljdk/incubator/foreign/FunctionDescriptor;
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.isTrivial:Z
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.inputBindings:Ljava/util/List;
aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.outputBindings:Ljava/util/List;
invokespecial jdk.internal.foreign.abi.CallingSequence.<init>:(Ljava/lang/invoke/MethodType;Ljdk/incubator/foreign/FunctionDescriptor;ZLjava/util/List;Ljava/util/List;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/foreign/abi/CallingSequenceBuilder;
private void verifyBindings(boolean, java.lang.Class<?>, java.util.List<jdk.internal.foreign.abi.Binding>);
descriptor: (ZLjava/lang/Class;Ljava/util/List;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: getstatic jdk.internal.foreign.abi.CallingSequenceBuilder.VERIFY_BINDINGS:Z
ifeq 5
1: aload 0
getfield jdk.internal.foreign.abi.CallingSequenceBuilder.forUpcall:Z
iload 1
if_icmpne 4
2: aload 2
aload 3
invokestatic jdk.internal.foreign.abi.CallingSequenceBuilder.verifyBoxBindings:(Ljava/lang/Class;Ljava/util/List;)V
3: goto 5
4: StackMap locals:
StackMap stack:
aload 2
aload 3
invokestatic jdk.internal.foreign.abi.CallingSequenceBuilder.verifyUnboxBindings:(Ljava/lang/Class;Ljava/util/List;)V
5: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/internal/foreign/abi/CallingSequenceBuilder;
0 6 1 forArguments Z
0 6 2 carrier Ljava/lang/Class<*>;
0 6 3 bindings Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;
Signature: (ZLjava/lang/Class<*>;Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;)V
MethodParameters:
Name Flags
forArguments
carrier
bindings
private static void verifyUnboxBindings(java.lang.Class<?>, java.util.List<jdk.internal.foreign.abi.Binding>);
descriptor: (Ljava/lang/Class;Ljava/util/List;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
astore 2
start local 2 1: aload 2
aload 0
invokeinterface java.util.Deque.push:(Ljava/lang/Object;)V
2: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
goto 7
StackMap locals: java.lang.Class java.util.List java.util.Deque top java.util.Iterator
StackMap stack:
3: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.internal.foreign.abi.Binding
astore 3
start local 3 4: getstatic jdk.internal.foreign.abi.CallingSequenceBuilder.UNBOX_TAGS:Ljava/util/Set;
aload 3
invokevirtual jdk.internal.foreign.abi.Binding.tag:()Ljdk/internal/foreign/abi/Binding$Tag;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifne 6
5: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Unexpected operator: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals: java.lang.Class java.util.List java.util.Deque jdk.internal.foreign.abi.Binding java.util.Iterator
StackMap stack:
aload 3
aload 2
invokevirtual jdk.internal.foreign.abi.Binding.verify:(Ljava/util/Deque;)V
end local 3 7: StackMap locals: java.lang.Class java.util.List java.util.Deque top java.util.Iterator
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
8: aload 2
invokeinterface java.util.Deque.isEmpty:()Z
ifne 10
9: new java.lang.IllegalArgumentException
dup
ldc "Stack must be empty after recipe"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
10: StackMap locals: java.lang.Class java.util.List java.util.Deque
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 inType Ljava/lang/Class<*>;
0 11 1 bindings Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;
1 11 2 stack Ljava/util/Deque<Ljava/lang/Class<*>;>;
4 7 3 b Ljdk/internal/foreign/abi/Binding;
Signature: (Ljava/lang/Class<*>;Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;)V
MethodParameters:
Name Flags
inType
bindings
private static void verifyBoxBindings(java.lang.Class<?>, java.util.List<jdk.internal.foreign.abi.Binding>);
descriptor: (Ljava/lang/Class;Ljava/util/List;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
astore 2
start local 2 1: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
goto 6
StackMap locals: java.lang.Class java.util.List java.util.Deque top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.internal.foreign.abi.Binding
astore 3
start local 3 3: getstatic jdk.internal.foreign.abi.CallingSequenceBuilder.BOX_TAGS:Ljava/util/Set;
aload 3
invokevirtual jdk.internal.foreign.abi.Binding.tag:()Ljdk/internal/foreign/abi/Binding$Tag;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifne 5
4: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Unexpected operator: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: java.lang.Class java.util.List java.util.Deque jdk.internal.foreign.abi.Binding java.util.Iterator
StackMap stack:
aload 3
aload 2
invokevirtual jdk.internal.foreign.abi.Binding.verify:(Ljava/util/Deque;)V
end local 3 6: StackMap locals: java.lang.Class java.util.List java.util.Deque top java.util.Iterator
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
7: aload 2
invokeinterface java.util.Deque.size:()I
iconst_1
if_icmpeq 9
8: new java.lang.IllegalArgumentException
dup
ldc "Stack must contain exactly 1 value"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: java.lang.Class java.util.List java.util.Deque
StackMap stack:
aload 2
invokeinterface java.util.Deque.pop:()Ljava/lang/Object;
checkcast java.lang.Class
astore 3
start local 3 10: aload 3
aload 0
invokestatic jdk.internal.foreign.abi.SharedUtils.checkType:(Ljava/lang/Class;Ljava/lang/Class;)V
11: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 expectedOutType Ljava/lang/Class<*>;
0 12 1 bindings Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;
1 12 2 stack Ljava/util/Deque<Ljava/lang/Class<*>;>;
3 6 3 b Ljdk/internal/foreign/abi/Binding;
10 12 3 actualOutType Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;Ljava/util/List<Ljdk/internal/foreign/abi/Binding;>;)V
MethodParameters:
Name Flags
expectedOutType
bindings
}
SourceFile: "CallingSequenceBuilder.java"
InnerClasses:
final Tag = jdk.internal.foreign.abi.Binding$Tag of jdk.internal.foreign.abi.Binding