public class org.jruby.ext.ffi.AutoPointer extends org.jruby.ext.ffi.Pointer
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ext.ffi.AutoPointer
super_class: org.jruby.ext.ffi.Pointer
{
static final java.lang.String AUTOPTR_CLASS_NAME;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "AutoPointer"
private static final java.util.concurrent.ConcurrentMap<org.jruby.ext.ffi.AutoPointer$ReaperGroup, java.lang.Boolean> referenceSet;
descriptor: Ljava/util/concurrent/ConcurrentMap;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentMap<Lorg/jruby/ext/ffi/AutoPointer$ReaperGroup;Ljava/lang/Boolean;>;
private static final java.lang.ThreadLocal<java.lang.ref.Reference<org.jruby.ext.ffi.AutoPointer$ReaperGroup>> currentReaper;
descriptor: Ljava/lang/ThreadLocal;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/lang/ThreadLocal<Ljava/lang/ref/Reference<Lorg/jruby/ext/ffi/AutoPointer$ReaperGroup;>;>;
private org.jruby.ext.ffi.Pointer pointer;
descriptor: Lorg/jruby/ext/ffi/Pointer;
flags: (0x0002) ACC_PRIVATE
private java.lang.Object referent;
descriptor: Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
private volatile transient org.jruby.ext.ffi.AutoPointer$Reaper reaper;
descriptor: Lorg/jruby/ext/ffi/AutoPointer$Reaper;
flags: (0x00c2) ACC_PRIVATE, ACC_VOLATILE, ACC_TRANSIENT
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new java.util.concurrent.ConcurrentHashMap
dup
invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
putstatic org.jruby.ext.ffi.AutoPointer.referenceSet:Ljava/util/concurrent/ConcurrentMap;
1: new java.lang.ThreadLocal
dup
invokespecial java.lang.ThreadLocal.<init>:()V
putstatic org.jruby.ext.ffi.AutoPointer.currentReaper:Ljava/lang/ThreadLocal;
return
LocalVariableTable:
Start End Slot Name Signature
public static org.jruby.RubyClass createAutoPointerClass(org.jruby.Ruby, org.jruby.RubyModule);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyModule;)Lorg/jruby/RubyClass;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ldc "AutoPointer"
1: aload 1
ldc "Pointer"
invokevirtual org.jruby.RubyModule.getClass:(Ljava/lang/String;)Lorg/jruby/RubyClass;
2: getstatic org.jruby.util.cli.Options.REIFY_FFI:Lcom/headius/options/Option;
invokevirtual com.headius.options.Option.load:()Ljava/lang/Object;
checkcast java.lang.Boolean
invokevirtual java.lang.Boolean.booleanValue:()Z
ifeq 3
new org.jruby.ext.ffi.ReifyingAllocator
dup
ldc Lorg/jruby/ext/ffi/AutoPointer;
invokespecial org.jruby.ext.ffi.ReifyingAllocator.<init>:(Ljava/lang/Class;)V
goto 4
StackMap locals: org.jruby.Ruby org.jruby.RubyModule
StackMap stack: org.jruby.RubyModule java.lang.String org.jruby.RubyClass
3: getstatic org.jruby.ext.ffi.AutoPointer$AutoPointerAllocator.INSTANCE:Lorg/jruby/runtime/ObjectAllocator;
4: StackMap locals: org.jruby.Ruby org.jruby.RubyModule
StackMap stack: org.jruby.RubyModule java.lang.String org.jruby.RubyClass org.jruby.runtime.ObjectAllocator
invokevirtual org.jruby.RubyModule.defineClassUnder:(Ljava/lang/String;Lorg/jruby/RubyClass;Lorg/jruby/runtime/ObjectAllocator;)Lorg/jruby/RubyClass;
astore 2
start local 2 5: aload 2
ldc Lorg/jruby/ext/ffi/AutoPointer;
invokevirtual org.jruby.RubyClass.defineAnnotatedMethods:(Ljava/lang/Class;)V
6: aload 2
ldc Lorg/jruby/ext/ffi/AutoPointer;
invokevirtual org.jruby.RubyClass.defineAnnotatedConstants:(Ljava/lang/Class;)V
7: aload 2
ldc Lorg/jruby/ext/ffi/AutoPointer;
invokevirtual org.jruby.RubyClass.setReifiedClass:(Ljava/lang/Class;)V
8: aload 2
new org.jruby.ext.ffi.AutoPointer$1
dup
invokespecial org.jruby.ext.ffi.AutoPointer$1.<init>:()V
putfield org.jruby.RubyClass.kindOf:Lorg/jruby/RubyModule$KindOf;
9: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 runtime Lorg/jruby/Ruby;
0 10 1 module Lorg/jruby/RubyModule;
5 10 2 autoptrClass Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
module
public void <init>(org.jruby.Ruby, org.jruby.RubyClass);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
aload 1
invokevirtual org.jruby.Ruby.getFFI:()Lorg/jruby/ext/ffi/FFI;
invokevirtual org.jruby.ext.ffi.FFI.getNullMemoryIO:()Lorg/jruby/ext/ffi/NullMemoryIO;
invokespecial org.jruby.ext.ffi.Pointer.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Lorg/jruby/ext/ffi/MemoryIO;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/ffi/AutoPointer;
0 2 1 runtime Lorg/jruby/Ruby;
0 2 2 klazz Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
klazz
private static final void checkPointer(org.jruby.Ruby, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)V
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
instanceof org.jruby.ext.ffi.Pointer
ifne 2
1: aload 0
aload 1
aload 0
invokevirtual org.jruby.Ruby.getFFI:()Lorg/jruby/ext/ffi/FFI;
getfield org.jruby.ext.ffi.FFI.pointerClass:Lorg/jruby/RubyClass;
invokevirtual org.jruby.Ruby.newTypeError:(Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyClass;)Lorg/jruby/exceptions/RaiseException;
athrow
2: StackMap locals:
StackMap stack:
aload 1
instanceof org.jruby.ext.ffi.MemoryPointer
ifne 3
aload 1
instanceof org.jruby.ext.ffi.AutoPointer
ifeq 4
3: StackMap locals:
StackMap stack:
aload 0
ldc "Cannot use AutoPointer with MemoryPointer or AutoPointer instances"
invokevirtual org.jruby.Ruby.newTypeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 runtime Lorg/jruby/Ruby;
0 5 1 ptr Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
runtime
ptr
public static org.jruby.runtime.builtin.IRubyObject from_native(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
checkcast org.jruby.RubyClass
aload 0
aload 2
getstatic org.jruby.runtime.Block.NULL_BLOCK:Lorg/jruby/runtime/Block;
invokevirtual org.jruby.RubyClass.newInstance:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
0 1 2 value Lorg/jruby/runtime/builtin/IRubyObject;
0 1 3 ctx Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"from_native"}, meta = true)
MethodParameters:
Name Flags
context
recv
value
ctx
public final org.jruby.runtime.builtin.IRubyObject initialize(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=6, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
astore 3
start local 3 1: aload 3
aload 2
invokestatic org.jruby.ext.ffi.AutoPointer.checkPointer:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)V
2: aload 0
invokevirtual org.jruby.ext.ffi.AutoPointer.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getFFIHandle:()Ljava/lang/Object;
astore 4
start local 4 3: aload 4
instanceof org.jruby.ext.ffi.AutoPointer$ClassData
ifne 5
4: aload 0
invokevirtual org.jruby.ext.ffi.AutoPointer.getMetaClass:()Lorg/jruby/RubyClass;
new org.jruby.ext.ffi.AutoPointer$ClassData
dup
invokespecial org.jruby.ext.ffi.AutoPointer$ClassData.<init>:()V
dup
astore 4
invokevirtual org.jruby.RubyClass.setFFIHandle:(Ljava/lang/Object;)V
5: StackMap locals: org.jruby.Ruby java.lang.Object
StackMap stack:
aload 4
checkcast org.jruby.ext.ffi.AutoPointer$ClassData
astore 5
start local 5 6: aload 5
getfield org.jruby.ext.ffi.AutoPointer$ClassData.releaseCallSite:Lorg/jruby/runtime/callsite/CachingCallSite;
aload 0
invokevirtual org.jruby.ext.ffi.AutoPointer.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.runtime.callsite.CachingCallSite.retrieveCache:(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/callsite/CacheEntry;
getfield org.jruby.runtime.callsite.CacheEntry.method:Lorg/jruby/internal/runtime/methods/DynamicMethod;
astore 6
start local 6 7: aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.isUndefined:()Z
ifeq 9
8: aload 3
ldc "release method undefined"
invokevirtual org.jruby.Ruby.newRuntimeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
9: StackMap locals: org.jruby.ext.ffi.AutoPointer$ClassData org.jruby.internal.runtime.methods.DynamicMethod
StackMap stack:
aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.getArity:()Lorg/jruby/runtime/Arity;
invokevirtual org.jruby.runtime.Arity.isFixed:()Z
ifeq 10
aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.getArity:()Lorg/jruby/runtime/Arity;
invokevirtual org.jruby.runtime.Arity.required:()I
iconst_1
if_icmpne 11
StackMap locals:
StackMap stack:
10: aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.getArity:()Lorg/jruby/runtime/Arity;
invokevirtual org.jruby.runtime.Arity.required:()I
iconst_1
if_icmple 14
11: StackMap locals:
StackMap stack:
aload 3
new java.lang.StringBuilder
dup
ldc "wrong number of arguments to release method (1 for "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
12: aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.getArity:()Lorg/jruby/runtime/Arity;
invokevirtual org.jruby.runtime.Arity.required:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc ")"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
13: invokevirtual org.jruby.Ruby.newRuntimeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
14: StackMap locals:
StackMap stack:
aload 0
aload 2
checkcast org.jruby.ext.ffi.Pointer
invokevirtual org.jruby.ext.ffi.Pointer.getMemoryIO:()Lorg/jruby/ext/ffi/MemoryIO;
invokevirtual org.jruby.ext.ffi.AutoPointer.setMemoryIO:(Lorg/jruby/ext/ffi/MemoryIO;)Lorg/jruby/ext/ffi/MemoryIO;
pop
15: aload 0
aload 2
checkcast org.jruby.ext.ffi.Pointer
putfield org.jruby.ext.ffi.AutoPointer.pointer:Lorg/jruby/ext/ffi/Pointer;
16: aload 0
aload 0
getfield org.jruby.ext.ffi.AutoPointer.pointer:Lorg/jruby/ext/ffi/Pointer;
getfield org.jruby.ext.ffi.Pointer.size:J
putfield org.jruby.ext.ffi.AutoPointer.size:J
17: aload 0
aload 0
getfield org.jruby.ext.ffi.AutoPointer.pointer:Lorg/jruby/ext/ffi/Pointer;
getfield org.jruby.ext.ffi.Pointer.typeSize:I
putfield org.jruby.ext.ffi.AutoPointer.typeSize:I
18: aload 0
new org.jruby.ext.ffi.AutoPointer$Reaper
dup
aload 0
getfield org.jruby.ext.ffi.AutoPointer.pointer:Lorg/jruby/ext/ffi/Pointer;
aload 0
invokevirtual org.jruby.ext.ffi.AutoPointer.getMetaClass:()Lorg/jruby/RubyClass;
aload 5
getfield org.jruby.ext.ffi.AutoPointer$ClassData.releaseCallSite:Lorg/jruby/runtime/callsite/CachingCallSite;
invokespecial org.jruby.ext.ffi.AutoPointer$Reaper.<init>:(Lorg/jruby/ext/ffi/Pointer;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/callsite/CachingCallSite;)V
invokevirtual org.jruby.ext.ffi.AutoPointer.setReaper:(Lorg/jruby/ext/ffi/AutoPointer$Reaper;)V
19: aload 0
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lorg/jruby/ext/ffi/AutoPointer;
0 20 1 context Lorg/jruby/runtime/ThreadContext;
0 20 2 pointerArg Lorg/jruby/runtime/builtin/IRubyObject;
1 20 3 runtime Lorg/jruby/Ruby;
3 20 4 ffiHandle Ljava/lang/Object;
6 20 5 classData Lorg/jruby/ext/ffi/AutoPointer$ClassData;
7 20 6 releaseMethod Lorg/jruby/internal/runtime/methods/DynamicMethod;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"initialize"}, visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
pointerArg
public final org.jruby.runtime.builtin.IRubyObject initialize(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=6, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 2
invokestatic org.jruby.ext.ffi.AutoPointer.checkPointer:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)V
1: aload 0
aload 2
checkcast org.jruby.ext.ffi.Pointer
invokevirtual org.jruby.ext.ffi.Pointer.getMemoryIO:()Lorg/jruby/ext/ffi/MemoryIO;
invokevirtual org.jruby.ext.ffi.AutoPointer.setMemoryIO:(Lorg/jruby/ext/ffi/MemoryIO;)Lorg/jruby/ext/ffi/MemoryIO;
pop
2: aload 0
aload 2
checkcast org.jruby.ext.ffi.Pointer
putfield org.jruby.ext.ffi.AutoPointer.pointer:Lorg/jruby/ext/ffi/Pointer;
3: aload 0
aload 0
getfield org.jruby.ext.ffi.AutoPointer.pointer:Lorg/jruby/ext/ffi/Pointer;
getfield org.jruby.ext.ffi.Pointer.size:J
putfield org.jruby.ext.ffi.AutoPointer.size:J
4: aload 0
aload 0
getfield org.jruby.ext.ffi.AutoPointer.pointer:Lorg/jruby/ext/ffi/Pointer;
getfield org.jruby.ext.ffi.Pointer.typeSize:I
putfield org.jruby.ext.ffi.AutoPointer.typeSize:I
5: aload 3
invokeinterface org.jruby.runtime.builtin.IRubyObject.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getFFIHandleAccessorField:()Lorg/jruby/runtime/ivars/VariableAccessorField;
invokevirtual org.jruby.runtime.ivars.VariableAccessorField.getVariableAccessorForRead:()Lorg/jruby/runtime/ivars/VariableAccessor;
aload 3
invokevirtual org.jruby.runtime.ivars.VariableAccessor.get:(Ljava/lang/Object;)Ljava/lang/Object;
astore 4
start local 4 6: aload 4
instanceof org.jruby.ext.ffi.AutoPointer$ReleaserData
ifne 8
7: aload 0
invokevirtual org.jruby.ext.ffi.AutoPointer.getMetaClass:()Lorg/jruby/RubyClass;
new org.jruby.ext.ffi.AutoPointer$ReleaserData
dup
invokespecial org.jruby.ext.ffi.AutoPointer$ReleaserData.<init>:()V
dup
astore 4
invokevirtual org.jruby.RubyClass.setFFIHandle:(Ljava/lang/Object;)V
8: StackMap locals: java.lang.Object
StackMap stack:
aload 4
checkcast org.jruby.ext.ffi.AutoPointer$ReleaserData
astore 5
start local 5 9: aload 5
getfield org.jruby.ext.ffi.AutoPointer$ReleaserData.releaseCallSite:Lorg/jruby/runtime/callsite/CachingCallSite;
aload 3
invokevirtual org.jruby.runtime.callsite.CachingCallSite.retrieveCache:(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/callsite/CacheEntry;
getfield org.jruby.runtime.callsite.CacheEntry.method:Lorg/jruby/internal/runtime/methods/DynamicMethod;
astore 6
start local 6 10: aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.isUndefined:()Z
ifeq 12
11: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "call method undefined"
invokevirtual org.jruby.Ruby.newRuntimeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
12: StackMap locals: org.jruby.ext.ffi.AutoPointer$ReleaserData org.jruby.internal.runtime.methods.DynamicMethod
StackMap stack:
aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.getArity:()Lorg/jruby/runtime/Arity;
invokevirtual org.jruby.runtime.Arity.isFixed:()Z
ifeq 13
aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.getArity:()Lorg/jruby/runtime/Arity;
invokevirtual org.jruby.runtime.Arity.required:()I
iconst_1
if_icmpne 14
StackMap locals:
StackMap stack:
13: aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.getArity:()Lorg/jruby/runtime/Arity;
invokevirtual org.jruby.runtime.Arity.required:()I
iconst_1
if_icmple 17
14: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "wrong number of arguments to call method (1 for "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
15: aload 6
invokevirtual org.jruby.internal.runtime.methods.DynamicMethod.getArity:()Lorg/jruby/runtime/Arity;
invokevirtual org.jruby.runtime.Arity.required:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc ")"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
16: invokevirtual org.jruby.Ruby.newRuntimeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
17: StackMap locals:
StackMap stack:
aload 0
new org.jruby.ext.ffi.AutoPointer$Reaper
dup
aload 0
getfield org.jruby.ext.ffi.AutoPointer.pointer:Lorg/jruby/ext/ffi/Pointer;
aload 3
aload 5
getfield org.jruby.ext.ffi.AutoPointer$ReleaserData.releaseCallSite:Lorg/jruby/runtime/callsite/CachingCallSite;
invokespecial org.jruby.ext.ffi.AutoPointer$Reaper.<init>:(Lorg/jruby/ext/ffi/Pointer;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/callsite/CachingCallSite;)V
invokevirtual org.jruby.ext.ffi.AutoPointer.setReaper:(Lorg/jruby/ext/ffi/AutoPointer$Reaper;)V
18: aload 0
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lorg/jruby/ext/ffi/AutoPointer;
0 19 1 context Lorg/jruby/runtime/ThreadContext;
0 19 2 pointerArg Lorg/jruby/runtime/builtin/IRubyObject;
0 19 3 releaser Lorg/jruby/runtime/builtin/IRubyObject;
6 19 4 ffiHandle Ljava/lang/Object;
9 19 5 releaserData Lorg/jruby/ext/ffi/AutoPointer$ReleaserData;
10 19 6 releaseMethod Lorg/jruby/internal/runtime/methods/DynamicMethod;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"initialize"}, visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
pointerArg
releaser
public final org.jruby.runtime.builtin.IRubyObject free(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.ext.ffi.AutoPointer.reaper:Lorg/jruby/ext/ffi/AutoPointer$Reaper;
astore 2
start local 2 1: aload 2
ifnull 2
aload 2
getfield org.jruby.ext.ffi.AutoPointer$Reaper.released:Z
ifeq 3
2: StackMap locals: org.jruby.ext.ffi.AutoPointer$Reaper
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "pointer already freed"
invokevirtual org.jruby.Ruby.newRuntimeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
3: StackMap locals:
StackMap stack:
aload 2
aload 1
invokevirtual org.jruby.ext.ffi.AutoPointer$Reaper.release:(Lorg/jruby/runtime/ThreadContext;)V
4: aload 0
aconst_null
putfield org.jruby.ext.ffi.AutoPointer.reaper:Lorg/jruby/ext/ffi/AutoPointer$Reaper;
5: aload 0
aconst_null
putfield org.jruby.ext.ffi.AutoPointer.referent:Ljava/lang/Object;
6: aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/ext/ffi/AutoPointer;
0 7 1 context Lorg/jruby/runtime/ThreadContext;
1 7 2 r Lorg/jruby/ext/ffi/AutoPointer$Reaper;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"free"})
MethodParameters:
Name Flags
context
public final org.jruby.runtime.builtin.IRubyObject autorelease(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.ext.ffi.AutoPointer.reaper:Lorg/jruby/ext/ffi/AutoPointer$Reaper;
astore 3
start local 3 1: aload 3
ifnull 2
aload 3
getfield org.jruby.ext.ffi.AutoPointer$Reaper.released:Z
ifeq 3
2: StackMap locals: org.jruby.ext.ffi.AutoPointer$Reaper
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "pointer already freed"
invokevirtual org.jruby.Ruby.newRuntimeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
3: StackMap locals:
StackMap stack:
aload 3
aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.isTrue:()Z
invokevirtual org.jruby.ext.ffi.AutoPointer$Reaper.autorelease:(Z)V
4: aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/ext/ffi/AutoPointer;
0 5 1 context Lorg/jruby/runtime/ThreadContext;
0 5 2 autorelease Lorg/jruby/runtime/builtin/IRubyObject;
1 5 3 r Lorg/jruby/ext/ffi/AutoPointer$Reaper;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"autorelease="})
MethodParameters:
Name Flags
context
autorelease
public final org.jruby.runtime.builtin.IRubyObject autorelease_p(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield org.jruby.ext.ffi.AutoPointer.reaper:Lorg/jruby/ext/ffi/AutoPointer$Reaper;
ifnull 2
aload 0
getfield org.jruby.ext.ffi.AutoPointer.reaper:Lorg/jruby/ext/ffi/AutoPointer$Reaper;
getfield org.jruby.ext.ffi.AutoPointer$Reaper.unmanaged:Z
ifeq 1
iconst_0
goto 3
StackMap locals:
StackMap stack: org.jruby.runtime.ThreadContext
1: iconst_1
goto 3
StackMap locals:
StackMap stack: org.jruby.runtime.ThreadContext
2: iconst_0
StackMap locals: org.jruby.ext.ffi.AutoPointer org.jruby.runtime.ThreadContext
StackMap stack: org.jruby.runtime.ThreadContext int
3: invokestatic org.jruby.RubyBoolean.newBoolean:(Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/RubyBoolean;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/ext/ffi/AutoPointer;
0 4 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"autorelease?"})
MethodParameters:
Name Flags
context
private void setReaper(org.jruby.ext.ffi.AutoPointer$Reaper);
descriptor: (Lorg/jruby/ext/ffi/AutoPointer$Reaper;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: getstatic org.jruby.ext.ffi.AutoPointer.currentReaper:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.lang.ref.Reference
astore 2
start local 2 1: aload 2
ifnull 2
aload 2
invokevirtual java.lang.ref.Reference.get:()Ljava/lang/Object;
checkcast org.jruby.ext.ffi.AutoPointer$ReaperGroup
goto 3
StackMap locals: java.lang.ref.Reference
StackMap stack:
2: aconst_null
StackMap locals:
StackMap stack: org.jruby.ext.ffi.AutoPointer$ReaperGroup
3: astore 3
start local 3 4: aload 3
ifnull 5
aload 3
invokevirtual org.jruby.ext.ffi.AutoPointer$ReaperGroup.referent:()Ljava/lang/Object;
goto 6
StackMap locals: org.jruby.ext.ffi.AutoPointer$ReaperGroup
StackMap stack:
5: aconst_null
StackMap locals:
StackMap stack: java.lang.Object
6: astore 4
start local 4 7: aload 4
ifnull 8
aload 3
invokevirtual org.jruby.ext.ffi.AutoPointer$ReaperGroup.canAccept:()Z
ifne 11
8: StackMap locals: java.lang.Object
StackMap stack:
new org.jruby.ext.ffi.AutoPointer$ReaperGroup
dup
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
dup
astore 4
invokespecial org.jruby.ext.ffi.AutoPointer$ReaperGroup.<init>:(Ljava/lang/Object;)V
astore 3
9: getstatic org.jruby.ext.ffi.AutoPointer.currentReaper:Ljava/lang/ThreadLocal;
new java.lang.ref.SoftReference
dup
aload 3
invokespecial java.lang.ref.SoftReference.<init>:(Ljava/lang/Object;)V
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
10: getstatic org.jruby.ext.ffi.AutoPointer.referenceSet:Ljava/util/concurrent/ConcurrentMap;
aload 3
getstatic java.lang.Boolean.TRUE:Ljava/lang/Boolean;
invokeinterface java.util.concurrent.ConcurrentMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
11: StackMap locals:
StackMap stack:
aload 0
aload 4
putfield org.jruby.ext.ffi.AutoPointer.referent:Ljava/lang/Object;
12: aload 0
aload 1
putfield org.jruby.ext.ffi.AutoPointer.reaper:Lorg/jruby/ext/ffi/AutoPointer$Reaper;
13: aload 3
aload 1
invokevirtual org.jruby.ext.ffi.AutoPointer$ReaperGroup.add:(Lorg/jruby/ext/ffi/AutoPointer$Reaper;)V
14: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/jruby/ext/ffi/AutoPointer;
0 15 1 reaper Lorg/jruby/ext/ffi/AutoPointer$Reaper;
1 15 2 reaperGroupReference Ljava/lang/ref/Reference<Lorg/jruby/ext/ffi/AutoPointer$ReaperGroup;>;
4 15 3 reaperGroup Lorg/jruby/ext/ffi/AutoPointer$ReaperGroup;
7 15 4 referent Ljava/lang/Object;
MethodParameters:
Name Flags
reaper
}
SourceFile: "AutoPointer.java"
NestMembers:
org.jruby.ext.ffi.AutoPointer$1 org.jruby.ext.ffi.AutoPointer$AutoPointerAllocator org.jruby.ext.ffi.AutoPointer$ClassData org.jruby.ext.ffi.AutoPointer$Reaper org.jruby.ext.ffi.AutoPointer$ReaperGroup org.jruby.ext.ffi.AutoPointer$ReleaserData
InnerClasses:
org.jruby.ext.ffi.AutoPointer$1
private final AutoPointerAllocator = org.jruby.ext.ffi.AutoPointer$AutoPointerAllocator of org.jruby.ext.ffi.AutoPointer
private final ClassData = org.jruby.ext.ffi.AutoPointer$ClassData of org.jruby.ext.ffi.AutoPointer
private final Reaper = org.jruby.ext.ffi.AutoPointer$Reaper of org.jruby.ext.ffi.AutoPointer
private final ReaperGroup = org.jruby.ext.ffi.AutoPointer$ReaperGroup of org.jruby.ext.ffi.AutoPointer
private final ReleaserData = org.jruby.ext.ffi.AutoPointer$ReleaserData of org.jruby.ext.ffi.AutoPointer
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyClass(name = {"FFI::AutoPointer"}, parent = "FFI::Pointer")