abstract class jdk.internal.foreign.MemoryScope implements jdk.internal.misc.ScopedMemoryAccess$Scope
minor version: 0
major version: 59
flags: flags: (0x0420) ACC_SUPER, ACC_ABSTRACT
this_class: jdk.internal.foreign.MemoryScope
super_class: java.lang.Object
{
static final java.lang.Runnable DUMMY_CLEANUP_ACTION;
descriptor: Ljava/lang/Runnable;
flags: (0x0018) ACC_STATIC, ACC_FINAL
protected final java.lang.Object ref;
descriptor: Ljava/lang/Object;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final jdk.internal.foreign.MemoryScope$ScopeCleanable scopeCleanable;
descriptor: Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final java.lang.Runnable cleanupAction;
descriptor: Ljava/lang/Runnable;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: invokedynamic run()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.lambda$0()V (6)
()V
putstatic jdk.internal.foreign.MemoryScope.DUMMY_CLEANUP_ACTION:Ljava/lang/Runnable;
return
LocalVariableTable:
Start End Slot Name Signature
private 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: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 2
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
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: aload 0
aload 3
ifnull 6
5: new jdk.internal.foreign.MemoryScope$ScopeCleanable
dup
aload 0
aload 3
aload 2
invokespecial jdk.internal.foreign.MemoryScope$ScopeCleanable.<init>:(Ljdk/internal/foreign/MemoryScope;Ljava/lang/ref/Cleaner;Ljava/lang/Runnable;)V
goto 7
6: StackMap locals: jdk.internal.foreign.MemoryScope java.lang.Object java.lang.Runnable java.lang.ref.Cleaner
StackMap stack: jdk.internal.foreign.MemoryScope
aconst_null
7: StackMap locals: jdk.internal.foreign.MemoryScope java.lang.Object java.lang.Runnable java.lang.ref.Cleaner
StackMap stack: jdk.internal.foreign.MemoryScope jdk.internal.foreign.MemoryScope$ScopeCleanable
putfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
8: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/internal/foreign/MemoryScope;
0 9 1 ref Ljava/lang/Object;
0 9 2 cleanupAction Ljava/lang/Runnable;
0 9 3 cleaner Ljava/lang/ref/Cleaner;
MethodParameters:
Name Flags
ref
cleanupAction
cleaner
static jdk.internal.foreign.MemoryScope createConfined(java.lang.Object, java.lang.Runnable, java.lang.ref.Cleaner);
descriptor: (Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)Ljdk/internal/foreign/MemoryScope;
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new jdk.internal.foreign.MemoryScope$ConfinedScope
dup
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
aload 0
aload 1
aload 2
invokespecial jdk.internal.foreign.MemoryScope$ConfinedScope.<init>:(Ljava/lang/Thread;Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 ref Ljava/lang/Object;
0 1 1 cleanupAction Ljava/lang/Runnable;
0 1 2 cleaner Ljava/lang/ref/Cleaner;
MethodParameters:
Name Flags
ref
cleanupAction
cleaner
static jdk.internal.foreign.MemoryScope createShared(java.lang.Object, java.lang.Runnable, java.lang.ref.Cleaner);
descriptor: (Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)Ljdk/internal/foreign/MemoryScope;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new jdk.internal.foreign.MemoryScope$SharedScope
dup
aload 0
aload 1
aload 2
invokespecial jdk.internal.foreign.MemoryScope$SharedScope.<init>:(Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 ref Ljava/lang/Object;
0 1 1 cleanupAction Ljava/lang/Runnable;
0 1 2 cleaner Ljava/lang/ref/Cleaner;
MethodParameters:
Name Flags
ref
cleanupAction
cleaner
final void close();
descriptor: ()V
flags: (0x0010) ACC_FINAL
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.foreign.MemoryScope.justClose:()V
1: aload 0
getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
2: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
ifnull 8
3: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
invokevirtual jdk.internal.foreign.MemoryScope$ScopeCleanable.clear:()V
4: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
5: astore 1
6: aload 0
invokestatic java.lang.ref.Reference.reachabilityFence:(Ljava/lang/Object;)V
7: aload 1
athrow
8: StackMap locals:
StackMap stack:
aload 0
invokestatic java.lang.ref.Reference.reachabilityFence:(Ljava/lang/Object;)V
9: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Ljdk/internal/foreign/MemoryScope;
Exception table:
from to target type
0 5 5 any
abstract void justClose();
descriptor: ()V
flags: (0x0400) ACC_ABSTRACT
final jdk.internal.foreign.MemoryScope confineTo(java.lang.Thread);
descriptor: (Ljava/lang/Thread;)Ljdk/internal/foreign/MemoryScope;
flags: (0x0010) ACC_FINAL
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual jdk.internal.foreign.MemoryScope.justClose:()V
1: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
ifnull 3
2: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
invokevirtual jdk.internal.foreign.MemoryScope$ScopeCleanable.clear:()V
3: StackMap locals:
StackMap stack:
new jdk.internal.foreign.MemoryScope$ConfinedScope
dup
aload 1
aload 0
getfield jdk.internal.foreign.MemoryScope.ref:Ljava/lang/Object;
aload 0
getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
ifnull 5
4: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
getfield jdk.internal.foreign.MemoryScope$ScopeCleanable.cleaner:Ljava/lang/ref/Cleaner;
goto 6
StackMap locals: jdk.internal.foreign.MemoryScope java.lang.Thread
StackMap stack: new 3 new 3 java.lang.Thread java.lang.Object java.lang.Runnable
5: aconst_null
6: StackMap locals: jdk.internal.foreign.MemoryScope java.lang.Thread
StackMap stack: new 3 new 3 java.lang.Thread java.lang.Object java.lang.Runnable java.lang.ref.Cleaner
invokespecial jdk.internal.foreign.MemoryScope$ConfinedScope.<init>:(Ljava/lang/Thread;Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
astore 3
7: aload 0
invokestatic java.lang.ref.Reference.reachabilityFence:(Ljava/lang/Object;)V
8: aload 3
areturn
9: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
10: aload 0
invokestatic java.lang.ref.Reference.reachabilityFence:(Ljava/lang/Object;)V
11: aload 2
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/internal/foreign/MemoryScope;
0 12 1 newOwner Ljava/lang/Thread;
Exception table:
from to target type
0 7 9 any
MethodParameters:
Name Flags
newOwner
final jdk.internal.foreign.MemoryScope share();
descriptor: ()Ljdk/internal/foreign/MemoryScope;
flags: (0x0010) ACC_FINAL
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.foreign.MemoryScope.justClose:()V
1: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
ifnull 3
2: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
invokevirtual jdk.internal.foreign.MemoryScope$ScopeCleanable.clear:()V
3: StackMap locals:
StackMap stack:
new jdk.internal.foreign.MemoryScope$SharedScope
dup
aload 0
getfield jdk.internal.foreign.MemoryScope.ref:Ljava/lang/Object;
aload 0
getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
ifnull 5
4: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
getfield jdk.internal.foreign.MemoryScope$ScopeCleanable.cleaner:Ljava/lang/ref/Cleaner;
goto 6
StackMap locals: jdk.internal.foreign.MemoryScope
StackMap stack: new 3 new 3 java.lang.Object java.lang.Runnable
5: aconst_null
6: StackMap locals: jdk.internal.foreign.MemoryScope
StackMap stack: new 3 new 3 java.lang.Object java.lang.Runnable java.lang.ref.Cleaner
invokespecial jdk.internal.foreign.MemoryScope$SharedScope.<init>:(Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
astore 2
7: aload 0
invokestatic java.lang.ref.Reference.reachabilityFence:(Ljava/lang/Object;)V
8: aload 2
areturn
9: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
10: aload 0
invokestatic java.lang.ref.Reference.reachabilityFence:(Ljava/lang/Object;)V
11: aload 1
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/internal/foreign/MemoryScope;
Exception table:
from to target type
0 7 9 any
final jdk.internal.foreign.MemoryScope cleanable(java.lang.ref.Cleaner);
descriptor: (Ljava/lang/ref/Cleaner;)Ljdk/internal/foreign/MemoryScope;
flags: (0x0010) ACC_FINAL
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.foreign.MemoryScope.scopeCleanable:Ljdk/internal/foreign/MemoryScope$ScopeCleanable;
ifnull 2
1: new java.lang.IllegalStateException
dup
ldc "Already registered with a cleaner"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.internal.foreign.MemoryScope.justClose:()V
3: aload 0
invokevirtual jdk.internal.foreign.MemoryScope.ownerThread:()Ljava/lang/Thread;
ifnonnull 5
4: new jdk.internal.foreign.MemoryScope$SharedScope
dup
aload 0
getfield jdk.internal.foreign.MemoryScope.ref:Ljava/lang/Object;
aload 0
getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
aload 1
invokespecial jdk.internal.foreign.MemoryScope$SharedScope.<init>:(Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
goto 6
5: StackMap locals:
StackMap stack:
new jdk.internal.foreign.MemoryScope$ConfinedScope
dup
aload 0
invokevirtual jdk.internal.foreign.MemoryScope.ownerThread:()Ljava/lang/Thread;
aload 0
getfield jdk.internal.foreign.MemoryScope.ref:Ljava/lang/Object;
aload 0
getfield jdk.internal.foreign.MemoryScope.cleanupAction:Ljava/lang/Runnable;
aload 1
invokespecial jdk.internal.foreign.MemoryScope$ConfinedScope.<init>:(Ljava/lang/Thread;Ljava/lang/Object;Ljava/lang/Runnable;Ljava/lang/ref/Cleaner;)V
StackMap locals:
StackMap stack: jdk.internal.foreign.MemoryScope
6: astore 3
7: aload 0
invokestatic java.lang.ref.Reference.reachabilityFence:(Ljava/lang/Object;)V
8: aload 3
areturn
9: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
10: aload 0
invokestatic java.lang.ref.Reference.reachabilityFence:(Ljava/lang/Object;)V
11: aload 2
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/internal/foreign/MemoryScope;
0 12 1 cleaner Ljava/lang/ref/Cleaner;
Exception table:
from to target type
2 7 9 any
MethodParameters:
Name Flags
cleaner
public abstract java.lang.Thread ownerThread();
descriptor: ()Ljava/lang/Thread;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract boolean isAlive();
descriptor: ()Z
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
public abstract void checkValidState();
descriptor: ()V
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
protected java.lang.Object clone();
descriptor: ()Ljava/lang/Object;
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=1, args_size=1
start local 0 0: new java.lang.CloneNotSupportedException
dup
invokespecial java.lang.CloneNotSupportedException.<init>:()V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/foreign/MemoryScope;
Exceptions:
throws java.lang.CloneNotSupportedException
private static void lambda$0();
descriptor: ()V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=0, locals=0, args_size=0
0: return
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "MemoryScope.java"
NestMembers:
jdk.internal.foreign.MemoryScope$ConfinedScope jdk.internal.foreign.MemoryScope$ScopeCleanable jdk.internal.foreign.MemoryScope$SharedScope
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
ConfinedScope = jdk.internal.foreign.MemoryScope$ConfinedScope of jdk.internal.foreign.MemoryScope
ScopeCleanable = jdk.internal.foreign.MemoryScope$ScopeCleanable of jdk.internal.foreign.MemoryScope
SharedScope = jdk.internal.foreign.MemoryScope$SharedScope of jdk.internal.foreign.MemoryScope
public abstract Scope = jdk.internal.misc.ScopedMemoryAccess$Scope of jdk.internal.misc.ScopedMemoryAccess