class jdk.internal.foreign.MemoryScope$SharedScope extends jdk.internal.foreign.MemoryScope
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: jdk.internal.foreign.MemoryScope$SharedScope
super_class: jdk.internal.foreign.MemoryScope
{
static jdk.internal.misc.ScopedMemoryAccess SCOPED_MEMORY_ACCESS;
descriptor: Ljdk/internal/misc/ScopedMemoryAccess;
flags: (0x0008) ACC_STATIC
static final int ALIVE;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 0
static final int CLOSING;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 1
static final int CLOSED;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 2
int state;
descriptor: I
flags: (0x0000)
private static final java.lang.invoke.VarHandle STATE;
descriptor: Ljava/lang/invoke/VarHandle;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=1, args_size=0
0: invokestatic jdk.internal.misc.ScopedMemoryAccess.getScopedMemoryAccess:()Ljdk/internal/misc/ScopedMemoryAccess;
putstatic jdk.internal.foreign.MemoryScope$SharedScope.SCOPED_MEMORY_ACCESS:Ljdk/internal/misc/ScopedMemoryAccess;
1: invokestatic java.lang.invoke.MethodHandles.lookup:()Ljava/lang/invoke/MethodHandles$Lookup;
ldc Ljdk/internal/foreign/MemoryScope$SharedScope;
ldc "state"
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$SharedScope.STATE:Ljava/lang/invoke/VarHandle;
2: goto 5
StackMap locals:
StackMap stack: java.lang.Throwable
3: astore 0
start local 0 4: new java.lang.ExceptionInInitializerError
dup
aload 0
invokespecial java.lang.ExceptionInInitializerError.<init>:(Ljava/lang/Throwable;)V
athrow
end local 0 5: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
4 5 0 ex Ljava/lang/Throwable;
Exception table:
from to target type
1 2 3 Class java.lang.Throwable
void <init>(java.lang.Object, java.lang.Runnable, java.lang.ref.Cleaner);
descriptor: (Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
flags: (0x0000)
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
aload 2
aload 3
invokespecial jdk.internal.foreign.MemoryScope.<init>:(Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
1: aload 0
iconst_0
putfield jdk.internal.foreign.MemoryScope$SharedScope.state:I
2: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/foreign/MemoryScope$SharedScope;
0 3 1 ref Ljava/lang/Object;
0 3 2 cleanupAction Ljava/lang/Runnable;
0 3 3 cleaner Ljava/lang/ref/Cleaner;
MethodParameters:
Name Flags
ref
cleanupAction
cleaner
public java.lang.Thread ownerThread();
descriptor: ()Ljava/lang/Thread;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/foreign/MemoryScope$SharedScope;
public void checkValidState();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.foreign.MemoryScope$SharedScope.state:I
ifeq 2
1: getstatic jdk.internal.misc.ScopedMemoryAccess$Scope$ScopedAccessError.INSTANCE:Ljdk/internal/misc/ScopedMemoryAccess$Scope$ScopedAccessError;
athrow
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/foreign/MemoryScope$SharedScope;
void justClose();
descriptor: ()V
flags: (0x0000)
Code:
stack=4, locals=2, args_size=1
start local 0 0: getstatic jdk.internal.foreign.MemoryScope$SharedScope.STATE:Ljava/lang/invoke/VarHandle;
aload 0
iconst_0
iconst_1
invokevirtual java.lang.invoke.VarHandle.compareAndSet:(Ljdk/internal/foreign/MemoryScope$SharedScope;II)Z
ifne 2
1: new java.lang.IllegalStateException
dup
ldc "Already closed"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
getstatic jdk.internal.foreign.MemoryScope$SharedScope.SCOPED_MEMORY_ACCESS:Ljdk/internal/misc/ScopedMemoryAccess;
aload 0
invokevirtual jdk.internal.misc.ScopedMemoryAccess.closeScope:(Ljdk/internal/misc/ScopedMemoryAccess$Scope;)Z
istore 1
start local 1 3: getstatic jdk.internal.foreign.MemoryScope$SharedScope.STATE:Ljava/lang/invoke/VarHandle;
aload 0
iload 1
ifeq 4
iconst_2
goto 5
StackMap locals: jdk.internal.foreign.MemoryScope$SharedScope int
StackMap stack: java.lang.invoke.VarHandle jdk.internal.foreign.MemoryScope$SharedScope
4: iconst_0
StackMap locals: jdk.internal.foreign.MemoryScope$SharedScope int
StackMap stack: java.lang.invoke.VarHandle jdk.internal.foreign.MemoryScope$SharedScope int
5: invokevirtual java.lang.invoke.VarHandle.setVolatile:(Ljdk/internal/foreign/MemoryScope$SharedScope;I)V
6: iload 1
ifne 8
7: new java.lang.IllegalStateException
dup
ldc "Cannot close while another thread is accessing the segment"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/internal/foreign/MemoryScope$SharedScope;
3 9 1 success Z
public boolean isAlive();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic jdk.internal.foreign.MemoryScope$SharedScope.STATE:Ljava/lang/invoke/VarHandle;
aload 0
invokevirtual java.lang.invoke.VarHandle.getVolatile:(Ljdk/internal/foreign/MemoryScope$SharedScope;)I
iconst_2
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$SharedScope;
}
SourceFile: "MemoryScope.java"
NestHost: jdk.internal.foreign.MemoryScope
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
SharedScope = jdk.internal.foreign.MemoryScope$SharedScope of jdk.internal.foreign.MemoryScope
public abstract Scope = jdk.internal.misc.ScopedMemoryAccess$Scope of jdk.internal.misc.ScopedMemoryAccess
public final ScopedAccessError = jdk.internal.misc.ScopedMemoryAccess$Scope$ScopedAccessError of jdk.internal.misc.ScopedMemoryAccess$Scope