public final class jdk.internal.foreign.MemoryScope
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.internal.foreign.MemoryScope
super_class: java.lang.Object
{
final java.lang.Object ref;
descriptor: Ljava/lang/Object;
flags: (0x0010) ACC_FINAL
int activeCount;
descriptor: I
flags: (0x0000)
static final java.lang.invoke.VarHandle COUNT_HANDLE;
descriptor: Ljava/lang/invoke/VarHandle;
flags: (0x0018) ACC_STATIC, ACC_FINAL
static final int UNACQUIRED;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 0
static final int CLOSED;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: -1
static final int MAX_ACQUIRE;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 2147483647
final java.lang.Runnable cleanupAction;
descriptor: Ljava/lang/Runnable;
flags: (0x0010) ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=1, args_size=0
0: invokestatic java.lang.invoke.MethodHandles.lookup:()Ljava/lang/invoke/MethodHandles$Lookup;
ldc Ljdk/internal/foreign/MemoryScope;
ldc "activeCount"
getstatic java.lang.Integer.TYPE:Ljava/lang/Class;
invokevirtual java.lang.invoke.MethodHandles$Lookup.findVarHandle:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;
putstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
1: goto 4
StackMap locals:
StackMap stack: java.lang.Throwable
2: astore 0
start local 0 3: new java.lang.ExceptionInInitializerError
dup
aload 0
invokespecial java.lang.ExceptionInInitializerError.<init>:(Ljava/lang/Throwable;)V
athrow
end local 0 4: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
3 4 0 ex Ljava/lang/Throwable;
Exception table:
from to target type
0 1 2 Class java.lang.Throwable
public void <init>(java.lang.Object, java.lang.Runnable);
descriptor: (Ljava/lang/Object;Ljava/lang/Runnable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield jdk.internal.foreign.MemoryScope.activeCount:I
2: aload 0
aload 1
putfield jdk.internal.foreign.MemoryScope.ref:Ljava/lang/Object;
3: aload 0
aload 2
putfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
4: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/foreign/MemoryScope;
0 5 1 ref Ljava/lang/Object;
0 5 2 cleanupAction Ljava/lang/Runnable;
MethodParameters:
Name Flags
ref
cleanupAction
final boolean isAliveThreadSafe();
descriptor: ()Z
flags: (0x0010) ACC_FINAL
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
aload 0
invokevirtual java.lang.invoke.VarHandle.getVolatile:(Ljdk/internal/foreign/MemoryScope;)I
iconst_m1
if_icmpeq 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/internal/foreign/MemoryScope;
final void checkAliveConfined();
descriptor: ()V
flags: (0x0010) ACC_FINAL
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.foreign.MemoryScope.activeCount:I
iconst_m1
if_icmpne 2
1: new java.lang.IllegalStateException
dup
ldc "Segment is not alive"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/foreign/MemoryScope;
jdk.internal.foreign.MemoryScope acquire();
descriptor: ()Ljdk/internal/foreign/MemoryScope;
flags: (0x0000)
Code:
stack=5, locals=2, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
aload 0
invokevirtual java.lang.invoke.VarHandle.getVolatile:(Ljdk/internal/foreign/MemoryScope;)I
istore 1
start local 1 1: iload 1
iconst_m1
if_icmpne 3
2: new java.lang.IllegalStateException
dup
ldc "Segment is not alive"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: int
StackMap stack:
iload 1
ldc 2147483647
if_icmpne 5
4: new java.lang.IllegalStateException
dup
ldc "Segment acquire limit exceeded"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
aload 0
iload 1
iload 1
iconst_1
iadd
invokevirtual java.lang.invoke.VarHandle.compareAndSet:(Ljdk/internal/foreign/MemoryScope;II)Z
ifeq 0
6: new jdk.internal.foreign.MemoryScope
dup
aload 0
getfield jdk.internal.foreign.MemoryScope.ref:Ljava/lang/Object;
aload 0
invokedynamic run(Ljdk/internal/foreign/MemoryScope;)Ljava/lang/Runnable;
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:
()V
jdk/internal/foreign/MemoryScope.release()V (7)
()V
invokespecial jdk.internal.foreign.MemoryScope.<init>:(Ljava/lang/Object;Ljava/lang/Runnable;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/foreign/MemoryScope;
1 7 1 value I
private void release();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
aload 0
invokevirtual java.lang.invoke.VarHandle.getVolatile:(Ljdk/internal/foreign/MemoryScope;)I
istore 1
start local 1 1: iload 1
ifgt 3
2: new java.lang.IllegalStateException
dup
invokespecial java.lang.IllegalStateException.<init>:()V
athrow
3: StackMap locals: int
StackMap stack:
getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
aload 0
iload 1
iload 1
iconst_1
isub
invokevirtual java.lang.invoke.VarHandle.compareAndSet:(Ljdk/internal/foreign/MemoryScope;II)Z
ifeq 0
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/internal/foreign/MemoryScope;
1 5 1 value I
void close();
descriptor: ()V
flags: (0x0000)
Code:
stack=4, locals=1, args_size=1
start local 0 0: getstatic jdk.internal.foreign.MemoryScope.COUNT_HANDLE:Ljava/lang/invoke/VarHandle;
aload 0
iconst_0
iconst_m1
invokevirtual java.lang.invoke.VarHandle.compareAndSet:(Ljdk/internal/foreign/MemoryScope;II)Z
ifne 3
1: aload 0
invokevirtual jdk.internal.foreign.MemoryScope.checkAliveConfined:()V
2: new java.lang.IllegalStateException
dup
ldc "Cannot close a segment that has active acquired views"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
ifnull 5
4: aload 0
getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/internal/foreign/MemoryScope;
}
SourceFile: "MemoryScope.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles