public interface jdk.incubator.foreign.NativeScope extends java.lang.AutoCloseable
minor version: 0
major version: 59
flags: flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT
this_class: jdk.incubator.foreign.NativeScope
super_class: java.lang.Object
{
public abstract java.util.OptionalLong byteSize();
descriptor: ()Ljava/util/OptionalLong;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract java.lang.Thread ownerThread();
descriptor: ()Ljava/lang/Thread;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract long allocatedBytes();
descriptor: ()J
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, byte);
descriptor: (Ljdk/incubator/foreign/ValueLayout;B)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
getstatic java.lang.Byte.TYPE:Ljava/lang/Class;
iconst_0
anewarray jdk.incubator.foreign.MemoryLayout$PathElement
invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
astore 3
start local 3 2: aload 0
aload 1
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
astore 4
start local 4 3: aload 3
aload 4
iload 2
invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;B)V
4: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/foreign/NativeScope;
0 5 1 layout Ljdk/incubator/foreign/ValueLayout;
0 5 2 value B
2 5 3 handle Ljava/lang/invoke/VarHandle;
3 5 4 addr Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
layout
value
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, char);
descriptor: (Ljdk/incubator/foreign/ValueLayout;C)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
getstatic java.lang.Character.TYPE:Ljava/lang/Class;
iconst_0
anewarray jdk.incubator.foreign.MemoryLayout$PathElement
invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
astore 3
start local 3 2: aload 0
aload 1
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
astore 4
start local 4 3: aload 3
aload 4
iload 2
invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;C)V
4: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/foreign/NativeScope;
0 5 1 layout Ljdk/incubator/foreign/ValueLayout;
0 5 2 value C
2 5 3 handle Ljava/lang/invoke/VarHandle;
3 5 4 addr Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
layout
value
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, short);
descriptor: (Ljdk/incubator/foreign/ValueLayout;S)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
getstatic java.lang.Short.TYPE:Ljava/lang/Class;
iconst_0
anewarray jdk.incubator.foreign.MemoryLayout$PathElement
invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
astore 3
start local 3 2: aload 0
aload 1
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
astore 4
start local 4 3: aload 3
aload 4
iload 2
invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;S)V
4: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/foreign/NativeScope;
0 5 1 layout Ljdk/incubator/foreign/ValueLayout;
0 5 2 value S
2 5 3 handle Ljava/lang/invoke/VarHandle;
3 5 4 addr Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
layout
value
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, int);
descriptor: (Ljdk/incubator/foreign/ValueLayout;I)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
getstatic java.lang.Integer.TYPE:Ljava/lang/Class;
iconst_0
anewarray jdk.incubator.foreign.MemoryLayout$PathElement
invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
astore 3
start local 3 2: aload 0
aload 1
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
astore 4
start local 4 3: aload 3
aload 4
iload 2
invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;I)V
4: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/foreign/NativeScope;
0 5 1 layout Ljdk/incubator/foreign/ValueLayout;
0 5 2 value I
2 5 3 handle Ljava/lang/invoke/VarHandle;
3 5 4 addr Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
layout
value
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, float);
descriptor: (Ljdk/incubator/foreign/ValueLayout;F)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
getstatic java.lang.Float.TYPE:Ljava/lang/Class;
iconst_0
anewarray jdk.incubator.foreign.MemoryLayout$PathElement
invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
astore 3
start local 3 2: aload 0
aload 1
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
astore 4
start local 4 3: aload 3
aload 4
fload 2
invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;F)V
4: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/foreign/NativeScope;
0 5 1 layout Ljdk/incubator/foreign/ValueLayout;
0 5 2 value F
2 5 3 handle Ljava/lang/invoke/VarHandle;
3 5 4 addr Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
layout
value
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, long);
descriptor: (Ljdk/incubator/foreign/ValueLayout;J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
getstatic java.lang.Long.TYPE:Ljava/lang/Class;
iconst_0
anewarray jdk.incubator.foreign.MemoryLayout$PathElement
invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
astore 4
start local 4 2: aload 0
aload 1
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
astore 5
start local 5 3: aload 4
aload 5
lload 2
invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;J)V
4: aload 5
areturn
end local 5 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/foreign/NativeScope;
0 5 1 layout Ljdk/incubator/foreign/ValueLayout;
0 5 2 value J
2 5 4 handle Ljava/lang/invoke/VarHandle;
3 5 5 addr Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
layout
value
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, double);
descriptor: (Ljdk/incubator/foreign/ValueLayout;D)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
getstatic java.lang.Double.TYPE:Ljava/lang/Class;
iconst_0
anewarray jdk.incubator.foreign.MemoryLayout$PathElement
invokevirtual jdk.incubator.foreign.ValueLayout.varHandle:(Ljava/lang/Class;[Ljdk/incubator/foreign/MemoryLayout$PathElement;)Ljava/lang/invoke/VarHandle;
astore 4
start local 4 2: aload 0
aload 1
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
astore 5
start local 5 3: aload 4
aload 5
dload 2
invokevirtual java.lang.invoke.VarHandle.set:(Ljdk/incubator/foreign/MemorySegment;D)V
4: aload 5
areturn
end local 5 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/foreign/NativeScope;
0 5 1 layout Ljdk/incubator/foreign/ValueLayout;
0 5 2 value D
2 5 4 handle Ljava/lang/invoke/VarHandle;
3 5 5 addr Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
layout
value
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.ValueLayout, jdk.incubator.foreign.Addressable);
descriptor: (Ljdk/incubator/foreign/ValueLayout;Ljdk/incubator/foreign/Addressable;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: getstatic jdk.incubator.foreign.MemoryLayouts.ADDRESS:Ljdk/incubator/foreign/ValueLayout;
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
aload 1
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
lcmp
ifeq 4
3: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Layout size mismatch - "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " != "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
getstatic jdk.incubator.foreign.MemoryLayouts.ADDRESS:Ljdk/incubator/foreign/ValueLayout;
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 1
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
l2i
tableswitch { // 4 - 8
4: 5
5: 7
6: 7
7: 7
8: 6
default: 7
}
5: StackMap locals:
StackMap stack:
aload 0
aload 1
aload 2
invokeinterface jdk.incubator.foreign.Addressable.address:()Ljdk/incubator/foreign/MemoryAddress;
invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
l2i
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/ValueLayout;I)Ljdk/incubator/foreign/MemorySegment;
areturn
6: StackMap locals:
StackMap stack:
aload 0
aload 1
aload 2
invokeinterface jdk.incubator.foreign.Addressable.address:()Ljdk/incubator/foreign/MemoryAddress;
invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/ValueLayout;J)Ljdk/incubator/foreign/MemorySegment;
areturn
7: StackMap locals:
StackMap stack:
new java.lang.UnsupportedOperationException
dup
ldc "Unsupported pointer size"
invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/incubator/foreign/NativeScope;
0 8 1 layout Ljdk/incubator/foreign/ValueLayout;
0 8 2 value Ljdk/incubator/foreign/Addressable;
MethodParameters:
Name Flags
layout
value
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, byte[]);
descriptor: (Ljdk/incubator/foreign/ValueLayout;[B)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([B)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([B)Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/NativeScope;
0 1 1 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 1 2 array [B
MethodParameters:
Name Flags
elementLayout
array
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, short[]);
descriptor: (Ljdk/incubator/foreign/ValueLayout;[S)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([S)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([S)Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/NativeScope;
0 1 1 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 1 2 array [S
MethodParameters:
Name Flags
elementLayout
array
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, char[]);
descriptor: (Ljdk/incubator/foreign/ValueLayout;[C)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([C)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([C)Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/NativeScope;
0 1 1 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 1 2 array [C
MethodParameters:
Name Flags
elementLayout
array
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, int[]);
descriptor: (Ljdk/incubator/foreign/ValueLayout;[I)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([I)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([I)Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/NativeScope;
0 1 1 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 1 2 array [I
MethodParameters:
Name Flags
elementLayout
array
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, float[]);
descriptor: (Ljdk/incubator/foreign/ValueLayout;[F)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([F)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([F)Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/NativeScope;
0 1 1 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 1 2 array [F
MethodParameters:
Name Flags
elementLayout
array
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, long[]);
descriptor: (Ljdk/incubator/foreign/ValueLayout;[J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([J)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([J)Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/NativeScope;
0 1 1 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 1 2 array [J
MethodParameters:
Name Flags
elementLayout
array
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, double[]);
descriptor: (Ljdk/incubator/foreign/ValueLayout;[D)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([D)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([D)Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/NativeScope;
0 1 1 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 1 2 array [D
MethodParameters:
Name Flags
elementLayout
array
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.ValueLayout, jdk.incubator.foreign.Addressable[]);
descriptor: (Ljdk/incubator/foreign/ValueLayout;[Ljdk/incubator/foreign/Addressable;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 2
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 2
invokestatic java.util.stream.Stream.of:([Ljava/lang/Object;)Ljava/util/stream/Stream;
invokedynamic accept()Ljava/util/function/Consumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
java/util/Objects.requireNonNull(Ljava/lang/Object;)Ljava/lang/Object; (6)
(Ljdk/incubator/foreign/Addressable;)V
invokeinterface java.util.stream.Stream.forEach:(Ljava/util/function/Consumer;)V
3: getstatic jdk.incubator.foreign.MemoryLayouts.ADDRESS:Ljdk/incubator/foreign/ValueLayout;
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
aload 1
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
lcmp
ifeq 5
4: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Layout size mismatch - "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " != "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
getstatic jdk.incubator.foreign.MemoryLayouts.ADDRESS:Ljdk/incubator/foreign/ValueLayout;
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 1
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
l2i
tableswitch { // 4 - 8
4: 6
5: 14
6: 14
7: 14
8: 10
default: 14
}
6: StackMap locals:
StackMap stack:
aload 0
aload 2
invokestatic java.util.stream.Stream.of:([Ljava/lang/Object;)Ljava/util/stream/Stream;
7: invokedynamic applyAsInt()Ljava/util/function/ToIntFunction;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)I
jdk/incubator/foreign/NativeScope.lambda$8(Ljdk/incubator/foreign/Addressable;)I (6 itf)
(Ljdk/incubator/foreign/Addressable;)I
invokeinterface java.util.stream.Stream.mapToInt:(Ljava/util/function/ToIntFunction;)Ljava/util/stream/IntStream;
invokeinterface java.util.stream.IntStream.toArray:()[I
8: aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([I)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([I)Ljdk/incubator/foreign/MemorySegment;
9: invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
10: StackMap locals:
StackMap stack:
aload 0
aload 2
invokestatic java.util.stream.Stream.of:([Ljava/lang/Object;)Ljava/util/stream/Stream;
11: invokedynamic applyAsLong()Ljava/util/function/ToLongFunction;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)J
jdk/incubator/foreign/NativeScope.lambda$10(Ljdk/incubator/foreign/Addressable;)J (6 itf)
(Ljdk/incubator/foreign/Addressable;)J
invokeinterface java.util.stream.Stream.mapToLong:(Ljava/util/function/ToLongFunction;)Ljava/util/stream/LongStream;
invokeinterface java.util.stream.LongStream.toArray:()[J
12: aload 1
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/incubator/foreign/MemorySegment.ofArray([J)Ljdk/incubator/foreign/MemorySegment; (6 itf)
([J)Ljdk/incubator/foreign/MemorySegment;
13: invokeinterface jdk.incubator.foreign.NativeScope.copyArrayWithSwapIfNeeded:(Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
areturn
14: StackMap locals:
StackMap stack:
new java.lang.UnsupportedOperationException
dup
ldc "Unsupported pointer size"
invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Ljdk/incubator/foreign/NativeScope;
0 15 1 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 15 2 array [Ljdk/incubator/foreign/Addressable;
MethodParameters:
Name Flags
elementLayout
array
private <Z> jdk.incubator.foreign.MemorySegment copyArrayWithSwapIfNeeded(Z, jdk.incubator.foreign.ValueLayout, java.util.function.Function<Z, jdk.incubator.foreign.MemorySegment>);
descriptor: (Ljava/lang/Object;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 2
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.componentType:()Ljava/lang/Class;
aload 2
invokestatic jdk.internal.foreign.Utils.checkPrimitiveCarrierCompat:(Ljava/lang/Class;Ljdk/incubator/foreign/MemoryLayout;)V
3: aload 0
aload 1
invokestatic java.lang.reflect.Array.getLength:(Ljava/lang/Object;)I
i2l
aload 2
invokestatic jdk.incubator.foreign.MemoryLayout.ofSequence:(JLjdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/SequenceLayout;
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
astore 4
start local 4 4: aload 2
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
lconst_1
lcmp
ifeq 5
aload 2
invokevirtual jdk.incubator.foreign.ValueLayout.order:()Ljava/nio/ByteOrder;
invokestatic java.nio.ByteOrder.nativeOrder:()Ljava/nio/ByteOrder;
if_acmpne 7
5: StackMap locals: jdk.incubator.foreign.MemorySegment
StackMap stack:
aload 4
aload 3
aload 1
invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast jdk.incubator.foreign.MemorySegment
invokeinterface jdk.incubator.foreign.MemorySegment.copyFrom:(Ljdk/incubator/foreign/MemorySegment;)V
6: goto 8
7: StackMap locals:
StackMap stack:
aload 4
checkcast jdk.internal.foreign.AbstractMemorySegmentImpl
aload 3
aload 1
invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast jdk.incubator.foreign.MemorySegment
aload 2
invokevirtual jdk.incubator.foreign.ValueLayout.byteSize:()J
invokevirtual jdk.internal.foreign.AbstractMemorySegmentImpl.copyFromSwap:(Ljdk/incubator/foreign/MemorySegment;J)V
8: StackMap locals:
StackMap stack:
aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/incubator/foreign/NativeScope;
0 9 1 array TZ;
0 9 2 elementLayout Ljdk/incubator/foreign/ValueLayout;
0 9 3 heapSegmentFactory Ljava/util/function/Function<TZ;Ljdk/incubator/foreign/MemorySegment;>;
4 9 4 addr Ljdk/incubator/foreign/MemorySegment;
Signature: <Z:Ljava/lang/Object;>(TZ;Ljdk/incubator/foreign/ValueLayout;Ljava/util/function/Function<TZ;Ljdk/incubator/foreign/MemorySegment;>;)Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
array
elementLayout
heapSegmentFactory
public jdk.incubator.foreign.MemorySegment allocate(jdk.incubator.foreign.MemoryLayout);
descriptor: (Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
aload 1
invokeinterface jdk.incubator.foreign.MemoryLayout.byteSize:()J
aload 1
invokeinterface jdk.incubator.foreign.MemoryLayout.byteAlignment:()J
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/foreign/NativeScope;
0 2 1 layout Ljdk/incubator/foreign/MemoryLayout;
MethodParameters:
Name Flags
layout
public jdk.incubator.foreign.MemorySegment allocateArray(jdk.incubator.foreign.MemoryLayout, long);
descriptor: (Ljdk/incubator/foreign/MemoryLayout;J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
lload 2
aload 1
invokestatic jdk.incubator.foreign.MemoryLayout.ofSequence:(JLjdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/SequenceLayout;
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(Ljdk/incubator/foreign/MemoryLayout;)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/foreign/NativeScope;
0 2 1 elementLayout Ljdk/incubator/foreign/MemoryLayout;
0 2 2 count J
MethodParameters:
Name Flags
elementLayout
count
public jdk.incubator.foreign.MemorySegment allocate(long);
descriptor: (J)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
lload 1
lload 1
invokeinterface jdk.incubator.foreign.NativeScope.allocate:(JJ)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/foreign/NativeScope;
0 1 1 bytesSize J
MethodParameters:
Name Flags
bytesSize
public abstract jdk.incubator.foreign.MemorySegment allocate(long, long);
descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
MethodParameters:
Name Flags
bytesSize
bytesAlignment
public abstract void close();
descriptor: ()V
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public static jdk.incubator.foreign.NativeScope boundedScope(long);
descriptor: (J)Ljdk/incubator/foreign/NativeScope;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: new jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope
dup
lload 0
invokespecial jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.<init>:(J)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 size J
MethodParameters:
Name Flags
size
public static jdk.incubator.foreign.NativeScope unboundedScope();
descriptor: ()Ljdk/incubator/foreign/NativeScope;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope
dup
invokespecial jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.<init>:()V
areturn
LocalVariableTable:
Start End Slot Name Signature
private static int lambda$8(jdk.incubator.foreign.Addressable);
descriptor: (Ljdk/incubator/foreign/Addressable;)I
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface jdk.incubator.foreign.Addressable.address:()Ljdk/incubator/foreign/MemoryAddress;
invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
l2i
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 a Ljdk/incubator/foreign/Addressable;
private static long lambda$10(jdk.incubator.foreign.Addressable);
descriptor: (Ljdk/incubator/foreign/Addressable;)J
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface jdk.incubator.foreign.Addressable.address:()Ljdk/incubator/foreign/MemoryAddress;
invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 a Ljdk/incubator/foreign/Addressable;
}
SourceFile: "NativeScope.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract PathElement = jdk.incubator.foreign.MemoryLayout$PathElement of jdk.incubator.foreign.MemoryLayout
public BoundedNativeScope = jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope of jdk.internal.foreign.AbstractNativeScope
public UnboundedNativeScope = jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope of jdk.internal.foreign.AbstractNativeScope