public class jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope extends jdk.internal.foreign.AbstractNativeScope
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope
  super_class: jdk.internal.foreign.AbstractNativeScope
{
  private final jdk.incubator.foreign.MemorySegment segment;
    descriptor: Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private long sp;
    descriptor: J
    flags: (0x0002) ACC_PRIVATE

  public java.util.OptionalLong byteSize();
    descriptor: ()Ljava/util/OptionalLong;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope this
         0: .line 144
            aload 0 /* this */
            getfield jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.MemorySegment.byteSize:()J
            invokestatic java.util.OptionalLong.of:(J)Ljava/util/OptionalLong;
            areturn
        end local 0 // jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/internal/foreign/AbstractNativeScope$BoundedNativeScope;

  public long allocatedBytes();
    descriptor: ()J
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope this
         0: .line 149
            aload 0 /* this */
            getfield jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.sp:J
            lreturn
        end local 0 // jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/internal/foreign/AbstractNativeScope$BoundedNativeScope;

  public void <init>(long);
    descriptor: (J)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=6, locals=3, args_size=2
        start local 0 // jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope this
        start local 1 // long size
         0: .line 153
            aload 0 /* this */
            invokespecial jdk.internal.foreign.AbstractNativeScope.<init>:()V
         1: .line 140
            aload 0 /* this */
            lconst_0
            putfield jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.sp:J
         2: .line 154
            aload 0 /* this */
            aload 0 /* this */
            lload 1 /* size */
            lconst_1
            invokevirtual jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.newSegment:(JJ)Ljdk/incubator/foreign/MemorySegment;
            putfield jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
         3: .line 155
            return
        end local 1 // long size
        end local 0 // jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    4     0  this  Ljdk/internal/foreign/AbstractNativeScope$BoundedNativeScope;
            0    4     1  size  J
    MethodParameters:
      Name  Flags
      size  

  public jdk.incubator.foreign.MemorySegment allocate(long, long);
    descriptor: (JJ)Ljdk/incubator/foreign/MemorySegment;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=10, args_size=3
        start local 0 // jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope this
        start local 1 // long bytesSize
        start local 3 // long bytesAlignment
         0: .line 159
            aload 0 /* this */
            invokevirtual jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.checkOwnerThread:()V
         1: .line 160
            aload 0 /* this */
            getfield jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
            invokeinterface jdk.incubator.foreign.MemorySegment.address:()Ljdk/incubator/foreign/MemoryAddress;
            invokeinterface jdk.incubator.foreign.MemoryAddress.toRawLongValue:()J
            lstore 5 /* min */
        start local 5 // long min
         2: .line 161
            lload 5 /* min */
            aload 0 /* this */
            getfield jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.sp:J
            ladd
            lload 3 /* bytesAlignment */
            invokestatic jdk.internal.foreign.Utils.alignUp:(JJ)J
            lload 5 /* min */
            lsub
            lstore 7 /* start */
        start local 7 // long start
         3: .line 163
            aload 0 /* this */
            getfield jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.segment:Ljdk/incubator/foreign/MemorySegment;
            lload 7 /* start */
            lload 1 /* bytesSize */
            invokeinterface jdk.incubator.foreign.MemorySegment.asSlice:(JJ)Ljdk/incubator/foreign/MemorySegment;
         4: .line 164
            iconst_3
            invokeinterface jdk.incubator.foreign.MemorySegment.withAccessModes:(I)Ljdk/incubator/foreign/MemorySegment;
         5: .line 163
            astore 9 /* slice */
        start local 9 // jdk.incubator.foreign.MemorySegment slice
         6: .line 165
            aload 0 /* this */
            lload 7 /* start */
            lload 1 /* bytesSize */
            ladd
            putfield jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope.sp:J
         7: .line 166
            aload 9 /* slice */
         8: areturn
        end local 9 // jdk.incubator.foreign.MemorySegment slice
         9: .line 167
      StackMap locals: jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope long long long long
      StackMap stack: java.lang.IndexOutOfBoundsException
            pop
        10: .line 168
            new java.lang.OutOfMemoryError
            dup
            ldc "Not enough space left to allocate"
            invokespecial java.lang.OutOfMemoryError.<init>:(Ljava/lang/String;)V
            athrow
        end local 7 // long start
        end local 5 // long min
        end local 3 // long bytesAlignment
        end local 1 // long bytesSize
        end local 0 // jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope this
      LocalVariableTable:
        Start  End  Slot            Name  Signature
            0   11     0            this  Ljdk/internal/foreign/AbstractNativeScope$BoundedNativeScope;
            0   11     1       bytesSize  J
            0   11     3  bytesAlignment  J
            2   11     5             min  J
            3   11     7           start  J
            6    9     9           slice  Ljdk/incubator/foreign/MemorySegment;
      Exception table:
        from    to  target  type
           3     8       9  Class java.lang.IndexOutOfBoundsException
    MethodParameters:
                Name  Flags
      bytesSize       
      bytesAlignment  
}
SourceFile: "AbstractNativeScope.java"
NestHost: jdk.internal.foreign.AbstractNativeScope
InnerClasses:
  public BoundedNativeScope = jdk.internal.foreign.AbstractNativeScope$BoundedNativeScope of jdk.internal.foreign.AbstractNativeScope