public class jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope extends jdk.internal.foreign.AbstractNativeScope
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope
super_class: jdk.internal.foreign.AbstractNativeScope
{
private static final long BLOCK_SIZE;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4096
private static final long MAX_ALLOC_SIZE;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2048
private jdk.incubator.foreign.MemorySegment segment;
descriptor: Ljdk/incubator/foreign/MemorySegment;
flags: (0x0002) ACC_PRIVATE
private long sp;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private long size;
descriptor: J
flags: (0x0002) ACC_PRIVATE
public java.util.OptionalLong byteSize();
descriptor: ()Ljava/util/OptionalLong;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: invokestatic java.util.OptionalLong.empty:()Ljava/util/OptionalLong;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/foreign/AbstractNativeScope$UnboundedNativeScope;
public long allocatedBytes();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.size:J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/foreign/AbstractNativeScope$UnboundedNativeScope;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial jdk.internal.foreign.AbstractNativeScope.<init>:()V
1: aload 0
lconst_0
putfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.sp:J
2: aload 0
lconst_0
putfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.size:J
3: aload 0
aload 0
ldc 4096
invokevirtual jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.newSegment:(J)Ljdk/incubator/foreign/MemorySegment;
putfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/foreign/AbstractNativeScope$UnboundedNativeScope;
public jdk.incubator.foreign.MemorySegment allocate(long, long);
descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=6, args_size=3
start local 0 start local 1 start local 3 0: aload 0
invokevirtual jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.checkOwnerThread:()V
1: lload 1
lload 3
invokestatic jdk.internal.foreign.Utils.alignUp:(JJ)J
ldc 2048
lcmp
ifle 4
2: aload 0
lload 1
lload 3
invokevirtual jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.newSegment:(JJ)Ljdk/incubator/foreign/MemorySegment;
astore 5
start local 5 3: aload 5
iconst_3
invokeinterface jdk.incubator.foreign.MemorySegment.withAccessModes:(I)Ljdk/incubator/foreign/MemorySegment;
areturn
end local 5 4: StackMap locals:
StackMap stack:
aload 0
lload 1
lload 3
invokevirtual jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.trySlice:(JJ)Ljdk/incubator/foreign/MemorySegment;
astore 5
start local 5 5: aload 5
ifnonnull 11
6: aload 0
lconst_0
putfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.sp:J
7: aload 0
aload 0
ldc 4096
lconst_1
invokevirtual jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.newSegment:(JJ)Ljdk/incubator/foreign/MemorySegment;
putfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
8: aload 0
lload 1
lload 3
invokevirtual jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.trySlice:(JJ)Ljdk/incubator/foreign/MemorySegment;
astore 5
9: aload 5
ifnonnull 11
10: new java.lang.AssertionError
dup
ldc "Cannot get here!"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
11: StackMap locals: jdk.incubator.foreign.MemorySegment
StackMap stack:
aload 5
areturn
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/internal/foreign/AbstractNativeScope$UnboundedNativeScope;
0 12 1 bytesSize J
0 12 3 bytesAlignment J
3 4 5 segment Ljdk/incubator/foreign/MemorySegment;
5 12 5 slice Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
bytesSize
bytesAlignment
private jdk.incubator.foreign.MemorySegment trySlice(long, long);
descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=10, args_size=3
start local 0 start local 1 start local 3 0: aload 0
getfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.MemorySegment.address:()Ljdk/incubator/foreign/MemoryAddress;
invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
lstore 5
start local 5 1: lload 5
aload 0
getfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.sp:J
ladd
lload 3
invokestatic jdk.internal.foreign.Utils.alignUp:(JJ)J
lload 5
lsub
lstore 7
start local 7 2: aload 0
getfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
invokeinterface jdk.incubator.foreign.MemorySegment.byteSize:()J
lload 7
lsub
lload 1
lcmp
ifge 4
3: aconst_null
areturn
4: StackMap locals: long long
StackMap stack:
aload 0
getfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
lload 7
lload 1
invokeinterface jdk.incubator.foreign.MemorySegment.asSlice:(JJ)Ljdk/incubator/foreign/MemorySegment;
5: iconst_3
invokeinterface jdk.incubator.foreign.MemorySegment.withAccessModes:(I)Ljdk/incubator/foreign/MemorySegment;
6: astore 9
start local 9 7: aload 0
lload 7
lload 1
ladd
putfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.sp:J
8: aload 0
dup
getfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.size:J
lload 1
lload 3
invokestatic jdk.internal.foreign.Utils.alignUp:(JJ)J
ladd
putfield jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope.size:J
9: aload 9
areturn
end local 9 end local 7 end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Ljdk/internal/foreign/AbstractNativeScope$UnboundedNativeScope;
0 10 1 bytesSize J
0 10 3 bytesAlignment J
1 10 5 min J
2 10 7 start J
7 10 9 slice Ljdk/incubator/foreign/MemorySegment;
MethodParameters:
Name Flags
bytesSize
bytesAlignment
}
SourceFile: "AbstractNativeScope.java"
NestHost: jdk.internal.foreign.AbstractNativeScope
InnerClasses:
public UnboundedNativeScope = jdk.internal.foreign.AbstractNativeScope$UnboundedNativeScope of jdk.internal.foreign.AbstractNativeScope