public class org.jruby.runtime.ObjectSpace
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.runtime.ObjectSpace
super_class: java.lang.Object
{
private final java.lang.ref.ReferenceQueue<java.lang.Object> deadReferences;
descriptor: Ljava/lang/ref/ReferenceQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/ref/ReferenceQueue<Ljava/lang/Object;>;
private final java.lang.ref.ReferenceQueue<org.jruby.runtime.ObjectSpace$ObjectGroup> objectGroupReferenceQueue;
descriptor: Ljava/lang/ref/ReferenceQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/ref/ReferenceQueue<Lorg/jruby/runtime/ObjectSpace$ObjectGroup;>;
private org.jruby.runtime.ObjectSpace$WeakReferenceListNode top;
descriptor: Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
flags: (0x0002) ACC_PRIVATE
private java.lang.ref.ReferenceQueue deadIdentityReferences;
descriptor: Ljava/lang/ref/ReferenceQueue;
flags: (0x0002) ACC_PRIVATE
private final java.util.Map<java.lang.Long, org.jruby.runtime.ObjectSpace$IdReference> identities;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Long;Lorg/jruby/runtime/ObjectSpace$IdReference;>;
private final java.util.Map<org.jruby.runtime.builtin.IRubyObject, java.lang.Long> identitiesByObject;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/Long;>;
private static final java.util.concurrent.atomic.AtomicLong maxId;
descriptor: Ljava/util/concurrent/atomic/AtomicLong;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.lang.ThreadLocal<java.lang.ref.Reference<org.jruby.runtime.ObjectSpace$ObjectGroup>> currentObjectGroup;
descriptor: Ljava/lang/ThreadLocal;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/ThreadLocal<Ljava/lang/ref/Reference<Lorg/jruby/runtime/ObjectSpace$ObjectGroup;>;>;
private java.lang.ref.Reference<org.jruby.runtime.ObjectSpace$GroupSweeper> groupSweeperReference;
descriptor: Ljava/lang/ref/Reference;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/lang/ref/Reference<Lorg/jruby/runtime/ObjectSpace$GroupSweeper;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: new java.util.concurrent.atomic.AtomicLong
dup
ldc 1000
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:(J)V
putstatic org.jruby.runtime.ObjectSpace.maxId:Ljava/util/concurrent/atomic/AtomicLong;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.lang.ref.ReferenceQueue
dup
invokespecial java.lang.ref.ReferenceQueue.<init>:()V
putfield org.jruby.runtime.ObjectSpace.deadReferences:Ljava/lang/ref/ReferenceQueue;
2: aload 0
new java.lang.ref.ReferenceQueue
dup
invokespecial java.lang.ref.ReferenceQueue.<init>:()V
putfield org.jruby.runtime.ObjectSpace.objectGroupReferenceQueue:Ljava/lang/ref/ReferenceQueue;
3: aload 0
new java.lang.ref.ReferenceQueue
dup
invokespecial java.lang.ref.ReferenceQueue.<init>:()V
putfield org.jruby.runtime.ObjectSpace.deadIdentityReferences:Ljava/lang/ref/ReferenceQueue;
4: aload 0
new java.util.HashMap
dup
bipush 64
invokespecial java.util.HashMap.<init>:(I)V
putfield org.jruby.runtime.ObjectSpace.identities:Ljava/util/Map;
5: aload 0
new org.jruby.util.WeakIdentityHashMap
dup
bipush 64
invokespecial org.jruby.util.WeakIdentityHashMap.<init>:(I)V
putfield org.jruby.runtime.ObjectSpace.identitiesByObject:Ljava/util/Map;
6: aload 0
new java.lang.ThreadLocal
dup
invokespecial java.lang.ThreadLocal.<init>:()V
putfield org.jruby.runtime.ObjectSpace.currentObjectGroup:Ljava/lang/ThreadLocal;
7: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jruby/runtime/ObjectSpace;
public void registerObjectId(long, org.jruby.runtime.builtin.IRubyObject);
descriptor: (JLorg/jruby/runtime/builtin/IRubyObject;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=5, args_size=3
start local 0 start local 1 start local 3 0: aload 0
getfield org.jruby.runtime.ObjectSpace.identities:Ljava/util/Map;
dup
astore 4
monitorenter
1: aload 0
invokevirtual org.jruby.runtime.ObjectSpace.cleanIdentities:()V
2: aload 0
getfield org.jruby.runtime.ObjectSpace.identities:Ljava/util/Map;
lload 1
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
new org.jruby.runtime.ObjectSpace$IdReference
dup
aload 3
lload 1
aload 0
getfield org.jruby.runtime.ObjectSpace.deadIdentityReferences:Ljava/lang/ref/ReferenceQueue;
invokespecial org.jruby.runtime.ObjectSpace$IdReference.<init>:(Lorg/jruby/runtime/builtin/IRubyObject;JLjava/lang/ref/ReferenceQueue;)V
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
3: aload 0
getfield org.jruby.runtime.ObjectSpace.identitiesByObject:Ljava/util/Map;
aload 3
lload 1
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: aload 4
monitorexit
5: goto 8
StackMap locals: org.jruby.runtime.ObjectSpace long org.jruby.runtime.builtin.IRubyObject java.util.Map
StackMap stack: java.lang.Throwable
6: aload 4
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/runtime/ObjectSpace;
0 9 1 id J
0 9 3 object Lorg/jruby/runtime/builtin/IRubyObject;
Exception table:
from to target type
1 5 6 any
6 7 6 any
MethodParameters:
Name Flags
id
object
public static long calculateObjectId(java.lang.Object);
descriptor: (Ljava/lang/Object;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: getstatic org.jruby.runtime.ObjectSpace.maxId:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.getAndIncrement:()J
ldc 2
lmul
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 object Ljava/lang/Object;
MethodParameters:
Name Flags
object
public long createAndRegisterObjectId(org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/builtin/IRubyObject;)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.runtime.ObjectSpace.identities:Ljava/util/Map;
dup
astore 2
monitorenter
1: aload 0
getfield org.jruby.runtime.ObjectSpace.identitiesByObject:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Long
astore 3
start local 3 2: aload 3
ifnonnull 4
3: aload 0
aload 1
invokevirtual org.jruby.runtime.ObjectSpace.createId:(Lorg/jruby/runtime/builtin/IRubyObject;)J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
astore 3
4: StackMap locals: java.util.Map java.lang.Long
StackMap stack:
aload 3
invokevirtual java.lang.Long.longValue:()J
aload 2
monitorexit
5: lreturn
end local 3 6: StackMap locals: org.jruby.runtime.ObjectSpace org.jruby.runtime.builtin.IRubyObject java.util.Map
StackMap stack: java.lang.Throwable
aload 2
monitorexit
7: athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jruby/runtime/ObjectSpace;
0 8 1 rubyObject Lorg/jruby/runtime/builtin/IRubyObject;
2 6 3 longId Ljava/lang/Long;
Exception table:
from to target type
1 5 6 any
6 7 6 any
MethodParameters:
Name Flags
rubyObject
private long createId(org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/builtin/IRubyObject;)J
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokestatic org.jruby.runtime.ObjectSpace.calculateObjectId:(Ljava/lang/Object;)J
lstore 2
start local 2 1: aload 0
lload 2
aload 1
invokevirtual org.jruby.runtime.ObjectSpace.registerObjectId:(JLorg/jruby/runtime/builtin/IRubyObject;)V
2: lload 2
lreturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/runtime/ObjectSpace;
0 3 1 object Lorg/jruby/runtime/builtin/IRubyObject;
1 3 2 id J
MethodParameters:
Name Flags
object
public org.jruby.runtime.builtin.IRubyObject id2ref(long);
descriptor: (J)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.runtime.ObjectSpace.identities:Ljava/util/Map;
dup
astore 3
monitorenter
1: aload 0
invokevirtual org.jruby.runtime.ObjectSpace.cleanIdentities:()V
2: aload 0
getfield org.jruby.runtime.ObjectSpace.identities:Ljava/util/Map;
lload 1
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.jruby.runtime.ObjectSpace$IdReference
astore 4
start local 4 3: aload 4
ifnonnull 6
4: aload 3
monitorexit
5: aconst_null
areturn
6: StackMap locals: java.util.Map org.jruby.runtime.ObjectSpace$IdReference
StackMap stack:
aload 4
invokevirtual org.jruby.runtime.ObjectSpace$IdReference.get:()Ljava/lang/Object;
checkcast org.jruby.runtime.builtin.IRubyObject
aload 3
monitorexit
7: areturn
end local 4 8: StackMap locals: org.jruby.runtime.ObjectSpace long java.util.Map
StackMap stack: java.lang.Throwable
aload 3
monitorexit
9: athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/jruby/runtime/ObjectSpace;
0 10 1 id J
3 8 4 reference Lorg/jruby/runtime/ObjectSpace$IdReference;
Exception table:
from to target type
1 5 8 any
6 7 8 any
8 9 8 any
MethodParameters:
Name Flags
id
private void cleanIdentities();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: goto 2
start local 1 1: StackMap locals: org.jruby.runtime.ObjectSpace$IdReference
StackMap stack:
aload 0
getfield org.jruby.runtime.ObjectSpace.identities:Ljava/util/Map;
aload 1
getfield org.jruby.runtime.ObjectSpace$IdReference.id:J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 1 2: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.runtime.ObjectSpace.deadIdentityReferences:Ljava/lang/ref/ReferenceQueue;
invokevirtual java.lang.ref.ReferenceQueue.poll:()Ljava/lang/ref/Reference;
checkcast org.jruby.runtime.ObjectSpace$IdReference
dup
astore 1
start local 1 3: ifnonnull 1
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/runtime/ObjectSpace;
1 2 1 ref Lorg/jruby/runtime/ObjectSpace$IdReference;
3 5 1 ref Lorg/jruby/runtime/ObjectSpace$IdReference;
public long idOf(org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/builtin/IRubyObject;)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.jruby.runtime.ObjectSpace.createAndRegisterObjectId:(Lorg/jruby/runtime/builtin/IRubyObject;)J
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/runtime/ObjectSpace;
0 1 1 rubyObject Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
rubyObject
public void addFinalizer(org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.addFinalizer:(Lorg/jruby/runtime/builtin/IRubyObject;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/runtime/ObjectSpace;
0 2 1 object Lorg/jruby/runtime/builtin/IRubyObject;
0 2 2 proc Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
object
proc
public void removeFinalizers(long);
descriptor: (J)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
lload 1
invokevirtual org.jruby.runtime.ObjectSpace.id2ref:(J)Lorg/jruby/runtime/builtin/IRubyObject;
astore 3
start local 3 1: aload 3
ifnull 3
2: aload 3
invokeinterface org.jruby.runtime.builtin.IRubyObject.removeFinalizers:()V
3: StackMap locals: org.jruby.runtime.builtin.IRubyObject
StackMap stack:
return
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/runtime/ObjectSpace;
0 4 1 id J
1 4 3 object Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
id
public void add(org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/builtin/IRubyObject;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface org.jruby.runtime.builtin.IRubyObject.getMetaClass:()Lorg/jruby/RubyClass;
ifnull 4
aload 1
instanceof org.jruby.java.proxies.JavaProxy
ifne 4
1: aload 1
invokeinterface org.jruby.runtime.builtin.IRubyObject.isFrozen:()Z
ifeq 2
return
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.jruby.runtime.ObjectSpace.getObjectGroup:()Lorg/jruby/runtime/ObjectSpace$ObjectGroup;
aload 1
invokevirtual org.jruby.runtime.ObjectSpace$ObjectGroup.add:(Lorg/jruby/runtime/builtin/IRubyObject;)Z
pop
3: goto 5
4: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.jruby.runtime.ObjectSpace.addIndividualWeakReference:(Lorg/jruby/runtime/builtin/IRubyObject;)V
5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/runtime/ObjectSpace;
0 6 1 object Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
object
private synchronized void addIndividualWeakReference(org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/builtin/IRubyObject;)V
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 0
getfield org.jruby.runtime.ObjectSpace.deadReferences:Ljava/lang/ref/ReferenceQueue;
invokevirtual org.jruby.runtime.ObjectSpace.cleanup:(Ljava/lang/ref/ReferenceQueue;)V
1: aload 0
new org.jruby.runtime.ObjectSpace$WeakReferenceListNode
dup
aload 0
aload 1
aload 0
getfield org.jruby.runtime.ObjectSpace.deadReferences:Ljava/lang/ref/ReferenceQueue;
aload 0
getfield org.jruby.runtime.ObjectSpace.top:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
invokespecial org.jruby.runtime.ObjectSpace$WeakReferenceListNode.<init>:(Lorg/jruby/runtime/ObjectSpace;Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;)V
putfield org.jruby.runtime.ObjectSpace.top:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/runtime/ObjectSpace;
0 3 1 object Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
object
private synchronized void registerGroupSweeper();
descriptor: ()V
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=6, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.runtime.ObjectSpace.groupSweeperReference:Ljava/lang/ref/Reference;
ifnull 1
aload 0
getfield org.jruby.runtime.ObjectSpace.groupSweeperReference:Ljava/lang/ref/Reference;
invokevirtual java.lang.ref.Reference.get:()Ljava/lang/Object;
ifnonnull 2
1: StackMap locals:
StackMap stack:
aload 0
new java.lang.ref.WeakReference
dup
new org.jruby.runtime.ObjectSpace$GroupSweeper
dup
aload 0
invokespecial org.jruby.runtime.ObjectSpace$GroupSweeper.<init>:(Lorg/jruby/runtime/ObjectSpace;)V
invokespecial java.lang.ref.WeakReference.<init>:(Ljava/lang/Object;)V
putfield org.jruby.runtime.ObjectSpace.groupSweeperReference:Ljava/lang/ref/Reference;
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/runtime/ObjectSpace;
private synchronized void splitObjectGroups();
descriptor: ()V
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=7, locals=6, args_size=1
start local 0 0: aload 0
aload 0
getfield org.jruby.runtime.ObjectSpace.objectGroupReferenceQueue:Ljava/lang/ref/ReferenceQueue;
invokevirtual org.jruby.runtime.ObjectSpace.cleanup:(Ljava/lang/ref/ReferenceQueue;)V
1: aload 0
getfield org.jruby.runtime.ObjectSpace.top:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
astore 1
start local 1 2: goto 14
3: StackMap locals: org.jruby.runtime.ObjectSpace$WeakReferenceListNode
StackMap stack:
aload 1
invokevirtual org.jruby.runtime.ObjectSpace$WeakReferenceListNode.get:()Ljava/lang/Object;
astore 2
start local 2 4: aload 2
instanceof org.jruby.runtime.ObjectSpace$ObjectGroup
ifeq 13
5: aload 2
checkcast org.jruby.runtime.ObjectSpace$ObjectGroup
astore 3
start local 3 6: iconst_0
istore 4
start local 4 7: goto 12
8: StackMap locals: java.lang.Object org.jruby.runtime.ObjectSpace$ObjectGroup int
StackMap stack:
aload 3
iload 4
aconst_null
invokevirtual org.jruby.runtime.ObjectSpace$ObjectGroup.set:(ILorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 5
start local 5 9: aload 5
ifnull 11
10: aload 0
new org.jruby.runtime.ObjectSpace$WeakReferenceListNode
dup
aload 0
aload 5
aload 0
getfield org.jruby.runtime.ObjectSpace.deadReferences:Ljava/lang/ref/ReferenceQueue;
aload 0
getfield org.jruby.runtime.ObjectSpace.top:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
invokespecial org.jruby.runtime.ObjectSpace$WeakReferenceListNode.<init>:(Lorg/jruby/runtime/ObjectSpace;Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;)V
putfield org.jruby.runtime.ObjectSpace.top:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
end local 5 11: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
12: iload 4
aload 3
invokevirtual org.jruby.runtime.ObjectSpace$ObjectGroup.size:()I
if_icmplt 8
end local 4 end local 3 13: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.runtime.ObjectSpace$WeakReferenceListNode.nextNode:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
astore 1
end local 2 14: StackMap locals:
StackMap stack:
aload 1
ifnonnull 3
15: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/jruby/runtime/ObjectSpace;
2 16 1 node Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
4 14 2 obj Ljava/lang/Object;
6 13 3 objectGroup Lorg/jruby/runtime/ObjectSpace$ObjectGroup;
7 13 4 i I
9 11 5 rubyObject Lorg/jruby/runtime/builtin/IRubyObject;
public synchronized java.util.Iterator iterator(org.jruby.RubyModule);
descriptor: (Lorg/jruby/RubyModule;)Ljava/util/Iterator;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=4, locals=7, args_size=2
start local 0 start local 1 0: new java.util.ArrayList
dup
bipush 64
invokespecial java.util.ArrayList.<init>:(I)V
astore 2
start local 2 1: aload 0
getfield org.jruby.runtime.ObjectSpace.top:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
astore 3
start local 3 2: goto 16
3: StackMap locals: java.util.ArrayList org.jruby.runtime.ObjectSpace$WeakReferenceListNode
StackMap stack:
aload 3
invokevirtual org.jruby.runtime.ObjectSpace$WeakReferenceListNode.get:()Ljava/lang/Object;
astore 4
start local 4 4: aload 4
instanceof org.jruby.runtime.builtin.IRubyObject
ifeq 9
5: aload 4
checkcast org.jruby.runtime.builtin.IRubyObject
astore 5
start local 5 6: aload 1
aload 5
invokevirtual org.jruby.RubyModule.isInstance:(Lorg/jruby/runtime/builtin/IRubyObject;)Z
ifeq 15
7: aload 2
aload 3
invokevirtual java.util.ArrayList.add:(Ljava/lang/Object;)Z
pop
end local 5 8: goto 15
StackMap locals: java.lang.Object
StackMap stack:
9: aload 4
instanceof org.jruby.runtime.ObjectSpace$ObjectGroup
ifeq 15
10: aload 4
checkcast org.jruby.runtime.ObjectSpace$ObjectGroup
invokevirtual org.jruby.runtime.ObjectSpace$ObjectGroup.iterator:()Ljava/util/Iterator;
astore 6
goto 14
StackMap locals: org.jruby.runtime.ObjectSpace org.jruby.RubyModule java.util.ArrayList org.jruby.runtime.ObjectSpace$WeakReferenceListNode java.lang.Object top java.util.Iterator
StackMap stack:
11: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.runtime.builtin.IRubyObject
astore 5
start local 5 12: aload 5
ifnull 14
aload 1
aload 5
invokevirtual org.jruby.RubyModule.isInstance:(Lorg/jruby/runtime/builtin/IRubyObject;)Z
ifeq 14
13: aload 2
new java.lang.ref.WeakReference
dup
aload 5
invokespecial java.lang.ref.WeakReference.<init>:(Ljava/lang/Object;)V
invokevirtual java.util.ArrayList.add:(Ljava/lang/Object;)Z
pop
end local 5 14: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 11
15: StackMap locals: org.jruby.runtime.ObjectSpace org.jruby.RubyModule java.util.ArrayList org.jruby.runtime.ObjectSpace$WeakReferenceListNode java.lang.Object
StackMap stack:
aload 3
getfield org.jruby.runtime.ObjectSpace$WeakReferenceListNode.nextNode:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
astore 3
end local 4 16: StackMap locals:
StackMap stack:
aload 3
ifnonnull 3
17: new org.jruby.runtime.ObjectSpace$1
dup
aload 0
aload 2
invokespecial org.jruby.runtime.ObjectSpace$1.<init>:(Lorg/jruby/runtime/ObjectSpace;Ljava/util/ArrayList;)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Lorg/jruby/runtime/ObjectSpace;
0 18 1 rubyClass Lorg/jruby/RubyModule;
1 18 2 objList Ljava/util/ArrayList<Ljava/lang/ref/Reference<Ljava/lang/Object;>;>;
2 18 3 current Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
4 16 4 obj Ljava/lang/Object;
6 8 5 rubyObject Lorg/jruby/runtime/builtin/IRubyObject;
12 14 5 rubyObject Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
rubyClass
private void cleanup(java.lang.ref.ReferenceQueue<?>);
descriptor: (Ljava/lang/ref/ReferenceQueue;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: goto 2
start local 2 1: StackMap locals: org.jruby.runtime.ObjectSpace$WeakReferenceListNode
StackMap stack:
aload 2
invokevirtual org.jruby.runtime.ObjectSpace$WeakReferenceListNode.remove:()V
end local 2 2: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.lang.ref.ReferenceQueue.poll:()Ljava/lang/ref/Reference;
checkcast org.jruby.runtime.ObjectSpace$WeakReferenceListNode
dup
astore 2
start local 2 3: ifnonnull 1
4: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/runtime/ObjectSpace;
0 5 1 referenceQueue Ljava/lang/ref/ReferenceQueue<*>;
1 2 2 reference Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
3 5 2 reference Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
Signature: (Ljava/lang/ref/ReferenceQueue<*>;)V
MethodParameters:
Name Flags
referenceQueue
private org.jruby.runtime.ObjectSpace$ObjectGroup getObjectGroup();
descriptor: ()Lorg/jruby/runtime/ObjectSpace$ObjectGroup;
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=3, args_size=1
start local 0 0: aload 0
getfield org.jruby.runtime.ObjectSpace.currentObjectGroup:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.lang.ref.Reference
astore 1
start local 1 1: aload 1
ifnull 2
aload 1
invokevirtual java.lang.ref.Reference.get:()Ljava/lang/Object;
checkcast org.jruby.runtime.ObjectSpace$ObjectGroup
goto 3
StackMap locals: java.lang.ref.Reference
StackMap stack:
2: aconst_null
StackMap locals:
StackMap stack: org.jruby.runtime.ObjectSpace$ObjectGroup
3: astore 2
start local 2 4: aload 2
ifnull 5
aload 2
invokevirtual org.jruby.runtime.ObjectSpace$ObjectGroup.isFull:()Z
ifne 5
aload 2
goto 6
StackMap locals: org.jruby.runtime.ObjectSpace$ObjectGroup
StackMap stack:
5: aload 0
invokevirtual org.jruby.runtime.ObjectSpace.addObjectGroup:()Lorg/jruby/runtime/ObjectSpace$ObjectGroup;
StackMap locals:
StackMap stack: org.jruby.runtime.ObjectSpace$ObjectGroup
6: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/runtime/ObjectSpace;
1 7 1 ref Ljava/lang/ref/Reference<Lorg/jruby/runtime/ObjectSpace$ObjectGroup;>;
4 7 2 objectGroup Lorg/jruby/runtime/ObjectSpace$ObjectGroup;
private synchronized org.jruby.runtime.ObjectSpace$ObjectGroup addObjectGroup();
descriptor: ()Lorg/jruby/runtime/ObjectSpace$ObjectGroup;
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=6, locals=3, args_size=1
start local 0 0: aload 0
aload 0
getfield org.jruby.runtime.ObjectSpace.objectGroupReferenceQueue:Ljava/lang/ref/ReferenceQueue;
invokevirtual org.jruby.runtime.ObjectSpace.cleanup:(Ljava/lang/ref/ReferenceQueue;)V
1: new org.jruby.runtime.ObjectSpace$WeakReferenceListNode
dup
aload 0
new org.jruby.runtime.ObjectSpace$ObjectGroup
dup
invokespecial org.jruby.runtime.ObjectSpace$ObjectGroup.<init>:()V
dup
astore 1
start local 1 2: aload 0
getfield org.jruby.runtime.ObjectSpace.objectGroupReferenceQueue:Ljava/lang/ref/ReferenceQueue;
aload 0
getfield org.jruby.runtime.ObjectSpace.top:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
3: invokespecial org.jruby.runtime.ObjectSpace$WeakReferenceListNode.<init>:(Lorg/jruby/runtime/ObjectSpace;Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;)V
astore 2
start local 2 4: aload 0
getfield org.jruby.runtime.ObjectSpace.currentObjectGroup:Ljava/lang/ThreadLocal;
aload 2
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
5: aload 0
aload 2
putfield org.jruby.runtime.ObjectSpace.top:Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode;
6: aload 0
getfield org.jruby.runtime.ObjectSpace.groupSweeperReference:Ljava/lang/ref/Reference;
ifnonnull 7
aload 0
invokevirtual org.jruby.runtime.ObjectSpace.registerGroupSweeper:()V
7: StackMap locals: org.jruby.runtime.ObjectSpace$ObjectGroup org.jruby.runtime.ObjectSpace$WeakReferenceListNode
StackMap stack:
aload 1
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jruby/runtime/ObjectSpace;
2 8 1 objectGroup Lorg/jruby/runtime/ObjectSpace$ObjectGroup;
4 8 2 ref Lorg/jruby/runtime/ObjectSpace$WeakReferenceListNode<Lorg/jruby/runtime/ObjectSpace$ObjectGroup;>;
}
SourceFile: "ObjectSpace.java"
NestMembers:
org.jruby.runtime.ObjectSpace$1 org.jruby.runtime.ObjectSpace$GroupSweeper org.jruby.runtime.ObjectSpace$IdReference org.jruby.runtime.ObjectSpace$ObjectGroup org.jruby.runtime.ObjectSpace$WeakReferenceListNode
InnerClasses:
org.jruby.runtime.ObjectSpace$1
private final GroupSweeper = org.jruby.runtime.ObjectSpace$GroupSweeper of org.jruby.runtime.ObjectSpace
private IdReference = org.jruby.runtime.ObjectSpace$IdReference of org.jruby.runtime.ObjectSpace
private final ObjectGroup = org.jruby.runtime.ObjectSpace$ObjectGroup of org.jruby.runtime.ObjectSpace
private WeakReferenceListNode = org.jruby.runtime.ObjectSpace$WeakReferenceListNode of org.jruby.runtime.ObjectSpace