public class org.jruby.ext.fiber.ThreadFiber extends org.jruby.RubyObject implements org.jruby.runtime.ExecutionContext
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ext.fiber.ThreadFiber
super_class: org.jruby.RubyObject
{
private static final org.jruby.util.log.Logger LOG;
descriptor: Lorg/jruby/util/log/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
volatile org.jruby.ext.fiber.ThreadFiber$FiberData data;
descriptor: Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
flags: (0x0040) ACC_VOLATILE
volatile org.jruby.RubyThread thread;
descriptor: Lorg/jruby/RubyThread;
flags: (0x0040) ACC_VOLATILE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/jruby/ext/fiber/ThreadFiber;
invokestatic org.jruby.util.log.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/jruby/util/log/Logger;
putstatic org.jruby.ext.fiber.ThreadFiber.LOG:Lorg/jruby/util/log/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(org.jruby.Ruby, org.jruby.RubyClass);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokespecial org.jruby.RubyObject.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)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/fiber/ThreadFiber;
0 2 1 runtime Lorg/jruby/Ruby;
0 2 2 klass Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
klass
public static void initRootFiber(org.jruby.runtime.ThreadContext, org.jruby.RubyThread);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyThread;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
astore 2
start local 2 1: new org.jruby.ext.fiber.ThreadFiber
dup
aload 2
aload 2
invokevirtual org.jruby.Ruby.getFiber:()Lorg/jruby/RubyClass;
invokespecial org.jruby.ext.fiber.ThreadFiber.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
astore 3
start local 3 2: aload 3
new org.jruby.ext.fiber.ThreadFiber$FiberData
dup
new org.jruby.ext.fiber.FiberQueue
dup
aload 2
invokespecial org.jruby.ext.fiber.FiberQueue.<init>:(Lorg/jruby/Ruby;)V
aload 1
aload 3
invokespecial org.jruby.ext.fiber.ThreadFiber$FiberData.<init>:(Lorg/jruby/ext/fiber/FiberQueue;Lorg/jruby/RubyThread;Lorg/jruby/ext/fiber/ThreadFiber;)V
putfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
3: aload 3
aload 1
putfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
4: aload 0
aload 3
invokevirtual org.jruby.runtime.ThreadContext.setRootFiber:(Lorg/jruby/ext/fiber/ThreadFiber;)V
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 context Lorg/jruby/runtime/ThreadContext;
0 6 1 currentThread Lorg/jruby/RubyThread;
1 6 2 runtime Lorg/jruby/Ruby;
2 6 3 rootFiber Lorg/jruby/ext/fiber/ThreadFiber;
MethodParameters:
Name Flags
context
currentThread
public org.jruby.runtime.builtin.IRubyObject initialize(org.jruby.runtime.ThreadContext, org.jruby.runtime.Block);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=5, 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 2
invokevirtual org.jruby.runtime.Block.isGiven:()Z
ifne 2
aload 3
ldc "tried to create Proc object without block"
invokevirtual org.jruby.Ruby.newArgumentError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
2: StackMap locals: org.jruby.Ruby
StackMap stack:
aload 0
new org.jruby.ext.fiber.ThreadFiber$FiberData
dup
new org.jruby.ext.fiber.FiberQueue
dup
aload 3
invokespecial org.jruby.ext.fiber.FiberQueue.<init>:(Lorg/jruby/Ruby;)V
aload 1
invokevirtual org.jruby.runtime.ThreadContext.getFiberCurrentThread:()Lorg/jruby/RubyThread;
aload 0
invokespecial org.jruby.ext.fiber.ThreadFiber$FiberData.<init>:(Lorg/jruby/ext/fiber/FiberQueue;Lorg/jruby/RubyThread;Lorg/jruby/ext/fiber/ThreadFiber;)V
putfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
3: aload 1
invokevirtual org.jruby.runtime.ThreadContext.getFiber:()Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 4
start local 4 4: aload 0
aload 3
aload 0
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
aload 4
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
aload 2
invokestatic org.jruby.ext.fiber.ThreadFiber.createThread:(Lorg/jruby/Ruby;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/FiberQueue;Lorg/jruby/runtime/Block;)Lorg/jruby/RubyThread;
putfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
5: aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/ext/fiber/ThreadFiber;
0 6 1 context Lorg/jruby/runtime/ThreadContext;
0 6 2 block Lorg/jruby/runtime/Block;
1 6 3 runtime Lorg/jruby/Ruby;
4 6 4 currentFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
block
public org.jruby.runtime.builtin.IRubyObject resume(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: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=9, 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 0
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 4
start local 4 2: aload 4
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnonnull 3
aload 4
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.transferred:Z
ifeq 4
StackMap locals: org.jruby.Ruby org.jruby.ext.fiber.ThreadFiber$FiberData
StackMap stack:
3: aload 3
ldc "double resume"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.jruby.ext.fiber.ThreadFiber.alive:()Z
ifne 5
aload 3
ldc "dead fiber called"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.jruby.runtime.ThreadContext.getFiber:()Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 5
start local 5 6: aload 4
aload 5
if_acmpne 11
7: aload 2
arraylength
tableswitch { // 0 - 1
0: 8
1: 9
default: 10
}
8: StackMap locals: org.jruby.ext.fiber.ThreadFiber$FiberData
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
9: StackMap locals:
StackMap stack:
aload 2
iconst_0
aaload
areturn
10: StackMap locals:
StackMap stack:
aload 3
aload 2
invokestatic org.jruby.RubyArray.newArrayMayCopy:(Lorg/jruby/Ruby;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyArray;
areturn
11: StackMap locals:
StackMap stack:
aload 2
arraylength
tableswitch { // 0 - 1
0: 12
1: 14
default: 16
}
12: StackMap locals:
StackMap stack:
getstatic org.jruby.ext.fiber.ThreadFiber.NEVER:Lorg/jruby/runtime/builtin/IRubyObject;
astore 6
start local 6 13: goto 17
end local 6 14: StackMap locals:
StackMap stack:
aload 2
iconst_0
aaload
astore 6
start local 6 15: goto 17
end local 6 16: StackMap locals:
StackMap stack:
aload 3
aload 2
invokestatic org.jruby.RubyArray.newArrayMayCopy:(Lorg/jruby/Ruby;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyArray;
astore 6
start local 6 17: StackMap locals: org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 4
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.parent:Lorg/jruby/RubyThread;
aload 1
invokevirtual org.jruby.runtime.ThreadContext.getFiberCurrentThread:()Lorg/jruby/RubyThread;
if_acmpeq 18
aload 3
ldc "fiber called across threads"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
18: StackMap locals:
StackMap stack:
aload 4
aload 1
invokevirtual org.jruby.runtime.ThreadContext.getFiber:()Lorg/jruby/ext/fiber/ThreadFiber;
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
19: aload 1
aload 5
aload 4
aload 6
invokestatic org.jruby.ext.fiber.ThreadFiber.exchangeWithFiber:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 8
20: aload 4
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
21: aload 8
areturn
22: StackMap locals:
StackMap stack: java.lang.Throwable
astore 7
23: aload 4
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
24: aload 7
athrow
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 25 0 this Lorg/jruby/ext/fiber/ThreadFiber;
0 25 1 context Lorg/jruby/runtime/ThreadContext;
0 25 2 values [Lorg/jruby/runtime/builtin/IRubyObject;
1 25 3 runtime Lorg/jruby/Ruby;
2 25 4 data Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
6 25 5 currentFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
13 14 6 val Lorg/jruby/runtime/builtin/IRubyObject;
15 16 6 val Lorg/jruby/runtime/builtin/IRubyObject;
17 25 6 val Lorg/jruby/runtime/builtin/IRubyObject;
Exception table:
from to target type
19 20 22 any
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(rest = true)
MethodParameters:
Name Flags
context
values
private static org.jruby.runtime.builtin.IRubyObject exchangeWithFiber(org.jruby.runtime.ThreadContext, org.jruby.ext.fiber.ThreadFiber$FiberData, org.jruby.ext.fiber.ThreadFiber$FiberData, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
aload 0
iconst_1
anewarray org.jruby.runtime.builtin.IRubyObject
dup
iconst_0
aload 3
aastore
invokevirtual org.jruby.ext.fiber.FiberQueue.push:(Lorg/jruby/runtime/ThreadContext;[Lorg/jruby/runtime/builtin/IRubyObject;)V
1: goto 4
StackMap locals:
StackMap stack: org.jruby.exceptions.RaiseException
2: astore 4
start local 4 3: aload 0
aload 1
aload 2
aload 4
invokestatic org.jruby.ext.fiber.ThreadFiber.handleExceptionDuringExchange:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/exceptions/RaiseException;)V
end local 4 4: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
aload 0
invokevirtual org.jruby.ext.fiber.FiberQueue.pop:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 4
start local 4 5: aload 4
getstatic org.jruby.ext.fiber.ThreadFiber.NEVER:Lorg/jruby/runtime/builtin/IRubyObject;
if_acmpne 6
aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
goto 7
StackMap locals: org.jruby.runtime.builtin.IRubyObject
StackMap stack:
6: aload 4
StackMap locals:
StackMap stack: org.jruby.runtime.builtin.IRubyObject
7: areturn
end local 4 8: StackMap locals: org.jruby.runtime.ThreadContext org.jruby.ext.fiber.ThreadFiber$FiberData org.jruby.ext.fiber.ThreadFiber$FiberData org.jruby.runtime.builtin.IRubyObject
StackMap stack: org.jruby.exceptions.RaiseException
astore 4
start local 4 9: aload 0
aload 1
aload 2
aload 4
invokestatic org.jruby.ext.fiber.ThreadFiber.handleExceptionDuringExchange:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/exceptions/RaiseException;)V
end local 4 10: goto 4
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 context Lorg/jruby/runtime/ThreadContext;
0 11 1 currentFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
0 11 2 targetFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
0 11 3 val Lorg/jruby/runtime/builtin/IRubyObject;
3 4 4 re Lorg/jruby/exceptions/RaiseException;
5 8 4 result Lorg/jruby/runtime/builtin/IRubyObject;
9 10 4 re Lorg/jruby/exceptions/RaiseException;
Exception table:
from to target type
0 1 2 Class org.jruby.exceptions.RaiseException
4 7 8 Class org.jruby.exceptions.RaiseException
MethodParameters:
Name Flags
context
currentFiberData
targetFiberData
val
private static void handleExceptionDuringExchange(org.jruby.runtime.ThreadContext, org.jruby.ext.fiber.ThreadFiber$FiberData, org.jruby.ext.fiber.ThreadFiber$FiberData, org.jruby.exceptions.RaiseException);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/exceptions/RaiseException;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=7, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getLocalJumpError:()Lorg/jruby/RubyClass;
aload 3
invokevirtual org.jruby.exceptions.RaiseException.getException:()Lorg/jruby/RubyException;
invokevirtual org.jruby.RubyClass.isInstance:(Lorg/jruby/runtime/builtin/IRubyObject;)Z
ifeq 2
1: aload 3
athrow
2: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
invokevirtual org.jruby.ext.fiber.FiberQueue.isShutdown:()Z
ifeq 4
3: aload 3
athrow
4: StackMap locals:
StackMap stack:
aload 2
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
invokevirtual org.jruby.ext.fiber.FiberQueue.isShutdown:()Z
ifeq 6
5: aload 3
athrow
6: StackMap locals:
StackMap stack:
aload 2
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.fiber:Ljava/lang/ref/WeakReference;
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
checkcast org.jruby.ext.fiber.ThreadFiber
astore 4
start local 4 7: aload 4
ifnull 8
aload 4
invokevirtual org.jruby.ext.fiber.ThreadFiber.alive:()Z
ifeq 8
aload 4
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
aload 3
invokevirtual org.jruby.exceptions.RaiseException.getException:()Lorg/jruby/RubyException;
invokevirtual org.jruby.RubyThread.raise:(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
goto 9
8: StackMap locals: org.jruby.ext.fiber.ThreadFiber
StackMap stack:
getstatic org.jruby.ext.fiber.ThreadFiber.LOG:Lorg/jruby/util/log/Logger;
ldc "no fiber thread to raise: {}"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 3
invokevirtual org.jruby.exceptions.RaiseException.getException:()Lorg/jruby/RubyException;
aload 0
invokevirtual org.jruby.RubyException.inspect:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyString;
aastore
invokeinterface org.jruby.util.log.Logger.warn:(Ljava/lang/String;[Ljava/lang/Object;)V
9: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 context Lorg/jruby/runtime/ThreadContext;
0 10 1 currentFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
0 10 2 targetFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
0 10 3 re Lorg/jruby/exceptions/RaiseException;
7 10 4 fiber Lorg/jruby/ext/fiber/ThreadFiber;
MethodParameters:
Name Flags
context
currentFiberData
targetFiberData
re
public org.jruby.runtime.builtin.IRubyObject __transfer__(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: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=9, 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 0
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 4
start local 4 2: aload 4
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnull 3
aload 3
ldc "double resume"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
3: StackMap locals: org.jruby.Ruby org.jruby.ext.fiber.ThreadFiber$FiberData
StackMap stack:
aload 0
invokevirtual org.jruby.ext.fiber.ThreadFiber.alive:()Z
ifne 4
aload 3
ldc "dead fiber called"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
4: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.jruby.runtime.ThreadContext.getFiber:()Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 5
start local 5 5: aload 4
aload 5
if_acmpne 10
6: aload 2
arraylength
tableswitch { // 0 - 1
0: 7
1: 8
default: 9
}
7: StackMap locals: org.jruby.ext.fiber.ThreadFiber$FiberData
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
8: StackMap locals:
StackMap stack:
aload 2
iconst_0
aaload
areturn
9: StackMap locals:
StackMap stack:
aload 3
aload 2
invokestatic org.jruby.RubyArray.newArrayMayCopy:(Lorg/jruby/Ruby;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyArray;
areturn
10: StackMap locals:
StackMap stack:
aload 2
arraylength
tableswitch { // 0 - 1
0: 11
1: 13
default: 15
}
11: StackMap locals:
StackMap stack:
getstatic org.jruby.ext.fiber.ThreadFiber.NEVER:Lorg/jruby/runtime/builtin/IRubyObject;
astore 6
start local 6 12: goto 16
end local 6 13: StackMap locals:
StackMap stack:
aload 2
iconst_0
aaload
astore 6
start local 6 14: goto 16
end local 6 15: StackMap locals:
StackMap stack:
aload 3
aload 2
invokestatic org.jruby.RubyArray.newArrayMayCopy:(Lorg/jruby/Ruby;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyArray;
astore 6
start local 6 16: StackMap locals: org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 4
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.parent:Lorg/jruby/RubyThread;
aload 1
invokevirtual org.jruby.runtime.ThreadContext.getFiberCurrentThread:()Lorg/jruby/RubyThread;
if_acmpeq 17
aload 3
ldc "fiber called across threads"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
17: StackMap locals:
StackMap stack:
aload 5
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnull 22
18: aload 4
aload 5
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
19: aload 5
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
20: aload 5
iconst_1
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.transferred:Z
21: goto 23
22: StackMap locals:
StackMap stack:
aload 4
aload 1
invokevirtual org.jruby.runtime.ThreadContext.getFiber:()Lorg/jruby/ext/fiber/ThreadFiber;
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
23: StackMap locals:
StackMap stack:
aload 1
aload 5
aload 4
aload 6
invokestatic org.jruby.ext.fiber.ThreadFiber.exchangeWithFiber:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 8
24: aload 4
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
25: aload 5
iconst_0
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.transferred:Z
26: aload 8
areturn
27: StackMap locals:
StackMap stack: java.lang.Throwable
astore 7
28: aload 4
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
29: aload 5
iconst_0
putfield org.jruby.ext.fiber.ThreadFiber$FiberData.transferred:Z
30: aload 7
athrow
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 31 0 this Lorg/jruby/ext/fiber/ThreadFiber;
0 31 1 context Lorg/jruby/runtime/ThreadContext;
0 31 2 values [Lorg/jruby/runtime/builtin/IRubyObject;
1 31 3 runtime Lorg/jruby/Ruby;
2 31 4 data Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
5 31 5 currentFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
12 13 6 val Lorg/jruby/runtime/builtin/IRubyObject;
14 15 6 val Lorg/jruby/runtime/builtin/IRubyObject;
16 31 6 val Lorg/jruby/runtime/builtin/IRubyObject;
Exception table:
from to target type
23 24 27 any
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(rest = true)
MethodParameters:
Name Flags
context
values
public static org.jruby.runtime.builtin.IRubyObject yield(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: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\trestricted identifier yield not allowed here - method calls need to be qualified\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
LocalVariableTable:
Start End Slot Name Signature
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(meta = true)
MethodParameters:
Name Flags
context
recv
public static org.jruby.runtime.builtin.IRubyObject yield(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: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
astore 3
start local 3 1: aload 0
aload 3
invokestatic org.jruby.ext.fiber.ThreadFiber.verifyCurrentFiber:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/Ruby;)Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 4
start local 4 2: aload 4
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 5
start local 5 3: aload 0
aload 4
aload 5
aload 2
invokestatic org.jruby.ext.fiber.ThreadFiber.exchangeWithFiber:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
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 4 0 context Lorg/jruby/runtime/ThreadContext;
0 4 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
0 4 2 value Lorg/jruby/runtime/builtin/IRubyObject;
1 4 3 runtime Lorg/jruby/Ruby;
2 4 4 currentFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
3 4 5 prevFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(meta = true)
MethodParameters:
Name Flags
context
recv
value
public static org.jruby.runtime.builtin.IRubyObject yield(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: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=3
0: new java.lang.Error
dup
ldc "Unresolved compilation problems: \n\trestricted identifier yield not allowed here - method calls need to be qualified\n\trestricted identifier yield not allowed here - method calls need to be qualified\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
LocalVariableTable:
Start End Slot Name Signature
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(meta = true, rest = true)
MethodParameters:
Name Flags
context
recv
value
private static org.jruby.ext.fiber.ThreadFiber$FiberData verifyCurrentFiber(org.jruby.runtime.ThreadContext, org.jruby.Ruby);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/Ruby;)Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.runtime.ThreadContext.getFiber:()Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 2
start local 2 1: aload 2
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.parent:Lorg/jruby/RubyThread;
ifnonnull 2
aload 1
ldc "can't yield from root fiber"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
2: StackMap locals: org.jruby.ext.fiber.ThreadFiber$FiberData
StackMap stack:
aload 2
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnonnull 4
3: aload 1
ldc "BUG: yield occurred with null previous fiber. Report this at http://bugs.jruby.org"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
4: StackMap locals:
StackMap stack:
aload 2
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
invokevirtual org.jruby.ext.fiber.FiberQueue.isShutdown:()Z
ifeq 5
aload 1
ldc "dead fiber yielded"
invokevirtual org.jruby.Ruby.newFiberError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 context Lorg/jruby/runtime/ThreadContext;
0 6 1 runtime Lorg/jruby/Ruby;
1 6 2 currentFiberData Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
MethodParameters:
Name Flags
context
runtime
public org.jruby.runtime.builtin.IRubyObject __alive__(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 0
invokevirtual org.jruby.ext.fiber.ThreadFiber.alive:()Z
invokevirtual org.jruby.Ruby.newBoolean:(Z)Lorg/jruby/RubyBoolean;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/fiber/ThreadFiber;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
public static org.jruby.runtime.builtin.IRubyObject __current__(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: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.runtime.ThreadContext.getFiber:()Lorg/jruby/ext/fiber/ThreadFiber;
areturn
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;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(meta = true)
MethodParameters:
Name Flags
context
recv
public java.util.Map<java.lang.Object, org.jruby.runtime.builtin.IRubyObject> getContextVariables();
descriptor: ()Ljava/util/Map;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
invokevirtual org.jruby.RubyThread.getContextVariables:()Ljava/util/Map;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/fiber/ThreadFiber;
Signature: ()Ljava/util/Map<Ljava/lang/Object;Lorg/jruby/runtime/builtin/IRubyObject;>;
final boolean alive();
descriptor: ()Z
flags: (0x0010) ACC_FINAL
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
astore 1
start local 1 1: aload 1
ifnull 2
aload 1
invokevirtual org.jruby.RubyThread.isAlive:()Z
ifeq 2
aload 0
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
invokevirtual org.jruby.ext.fiber.FiberQueue.isShutdown:()Z
ifeq 3
2: StackMap locals: org.jruby.RubyThread
StackMap stack:
iconst_0
ireturn
3: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/ext/fiber/ThreadFiber;
1 4 1 thread Lorg/jruby/RubyThread;
static org.jruby.RubyThread createThread(org.jruby.Ruby, org.jruby.ext.fiber.ThreadFiber$FiberData, org.jruby.ext.fiber.FiberQueue, org.jruby.runtime.Block);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Lorg/jruby/ext/fiber/FiberQueue;Lorg/jruby/runtime/Block;)Lorg/jruby/RubyThread;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=8, args_size=4
start local 0 start local 1 start local 2 start local 3 0: new java.util.concurrent.atomic.AtomicReference
dup
invokespecial java.util.concurrent.atomic.AtomicReference.<init>:()V
astore 4
start local 4 1: iconst_0
istore 5
start local 5 2: goto 12
3: StackMap locals: java.util.concurrent.atomic.AtomicReference int
StackMap stack:
aload 0
invokevirtual org.jruby.Ruby.getFiberExecutor:()Ljava/util/concurrent/ExecutorService;
aload 0
aload 1
aload 4
aload 3
invokedynamic run(Lorg/jruby/Ruby;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Ljava/util/concurrent/atomic/AtomicReference;Lorg/jruby/runtime/Block;)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
org/jruby/ext/fiber/ThreadFiber.lambda$0(Lorg/jruby/Ruby;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Ljava/util/concurrent/atomic/AtomicReference;Lorg/jruby/runtime/Block;)V (6)
()V
invokeinterface java.util.concurrent.ExecutorService.execute:(Ljava/lang/Runnable;)V
4: goto 15
5: StackMap locals:
StackMap stack: java.lang.OutOfMemoryError
astore 6
start local 6 6: aload 6
invokevirtual java.lang.OutOfMemoryError.getMessage:()Ljava/lang/String;
astore 7
start local 7 7: iload 5
ifne 11
aload 7
ifnull 11
aload 7
ldc "unable to create new native thread"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 11
8: invokestatic java.lang.System.gc:()V
9: iconst_1
istore 5
10: goto 12
11: StackMap locals: java.lang.OutOfMemoryError java.lang.String
StackMap stack:
aload 6
athrow
end local 7 end local 6 12: StackMap locals:
StackMap stack:
iload 5
ifeq 3
13: goto 15
StackMap locals:
StackMap stack:
14: invokestatic java.lang.Thread.yield:()V
StackMap locals:
StackMap stack:
15: aload 4
invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
ifnull 14
16: aload 4
invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
checkcast org.jruby.RubyThread
areturn
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 17 0 runtime Lorg/jruby/Ruby;
0 17 1 data Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
0 17 2 queue Lorg/jruby/ext/fiber/FiberQueue;
0 17 3 block Lorg/jruby/runtime/Block;
1 17 4 fiberThread Ljava/util/concurrent/atomic/AtomicReference<Lorg/jruby/RubyThread;>;
2 17 5 retried Z
6 12 6 oome Ljava/lang/OutOfMemoryError;
7 12 7 oomeMessage Ljava/lang/String;
Exception table:
from to target type
3 4 5 Class java.lang.OutOfMemoryError
MethodParameters:
Name Flags
runtime final
data final
queue final
block final
public org.jruby.runtime.builtin.IRubyObject __finalize__(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ext.fiber.ThreadFiber.doFinalize:()V
1: goto 3
StackMap locals:
StackMap stack: java.lang.Exception
2: pop
aload 1
getfield org.jruby.runtime.ThreadContext.fals:Lorg/jruby/RubyBoolean;
areturn
3: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/ext/fiber/ThreadFiber;
0 4 1 context Lorg/jruby/runtime/ThreadContext;
Exception table:
from to target type
0 1 2 Class java.lang.Exception
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
private void doFinalize();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
astore 1
start local 1 1: aload 0
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
2: aload 1
ifnull 5
3: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.parent:Lorg/jruby/RubyThread;
ifnonnull 4
return
4: StackMap locals: org.jruby.ext.fiber.ThreadFiber$FiberData
StackMap stack:
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
invokevirtual org.jruby.ext.fiber.FiberQueue.shutdown:()V
5: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
astore 2
start local 2 6: aload 0
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
7: aload 2
ifnull 11
8: aload 2
invokevirtual org.jruby.RubyThread.dieFromFinalizer:()V
9: aload 2
invokevirtual org.jruby.RubyThread.interrupt:()V
10: aconst_null
astore 1
aconst_null
astore 2
11: StackMap locals: org.jruby.RubyThread
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/jruby/ext/fiber/ThreadFiber;
1 12 1 data Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
6 12 2 thread Lorg/jruby/RubyThread;
protected void finalize();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual org.jruby.ext.fiber.ThreadFiber.doFinalize:()V
1: goto 5
StackMap locals:
StackMap stack: java.lang.Throwable
2: astore 1
3: aload 0
invokespecial java.lang.Object.finalize:()V
4: aload 1
athrow
5: StackMap locals:
StackMap stack:
aload 0
invokespecial java.lang.Object.finalize:()V
6: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/ext/fiber/ThreadFiber;
Exception table:
from to target type
0 2 2 any
Exceptions:
throws java.lang.Throwable
public org.jruby.ext.fiber.ThreadFiber$FiberData getData();
descriptor: ()Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/fiber/ThreadFiber;
public org.jruby.RubyThread getThread();
descriptor: ()Lorg/jruby/RubyThread;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/fiber/ThreadFiber;
private static void lambda$0(org.jruby.Ruby, org.jruby.ext.fiber.ThreadFiber$FiberData, java.util.concurrent.atomic.AtomicReference, org.jruby.runtime.Block);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/ext/fiber/ThreadFiber$FiberData;Ljava/util/concurrent/atomic/AtomicReference;Lorg/jruby/runtime/Block;)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=6, locals=13, args_size=4
0: aload 0
invokevirtual org.jruby.Ruby.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
astore 4
start local 4 1: aload 4
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.fiber:Ljava/lang/ref/WeakReference;
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
checkcast org.jruby.ext.fiber.ThreadFiber
invokevirtual org.jruby.runtime.ThreadContext.setFiber:(Lorg/jruby/ext/fiber/ThreadFiber;)V
2: aload 4
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.parent:Lorg/jruby/RubyThread;
invokevirtual org.jruby.RubyThread.getContext:()Lorg/jruby/runtime/ThreadContext;
invokevirtual org.jruby.runtime.ThreadContext.useRecursionGuardsFrom:(Lorg/jruby/runtime/ThreadContext;)V
3: aload 2
aload 4
invokevirtual org.jruby.runtime.ThreadContext.getThread:()Lorg/jruby/RubyThread;
invokevirtual java.util.concurrent.atomic.AtomicReference.set:(Ljava/lang/Object;)V
4: aload 4
invokevirtual org.jruby.runtime.ThreadContext.getThread:()Lorg/jruby/RubyThread;
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.parent:Lorg/jruby/RubyThread;
invokevirtual org.jruby.RubyThread.setFiberCurrentThread:(Lorg/jruby/RubyThread;)V
5: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
astore 5
start local 5 6: aload 5
invokevirtual java.lang.Thread.getName:()Ljava/lang/String;
astore 6
start local 6 7: aload 5
new java.lang.StringBuilder
dup
ldc "Fiber thread for block at: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual org.jruby.runtime.Block.getBody:()Lorg/jruby/runtime/BlockBody;
invokevirtual org.jruby.runtime.BlockBody.getFile:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ":"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokevirtual org.jruby.runtime.Block.getBody:()Lorg/jruby/runtime/BlockBody;
invokevirtual org.jruby.runtime.BlockBody.getLine:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
8: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
aload 4
invokevirtual org.jruby.ext.fiber.FiberQueue.pop:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 7
start local 7 9: aload 7
getstatic org.jruby.ext.fiber.ThreadFiber.NEVER:Lorg/jruby/runtime/builtin/IRubyObject;
if_acmpne 12
10: aload 3
aload 4
invokevirtual org.jruby.runtime.Block.yieldSpecific:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 8
start local 8 11: goto 13
end local 8 12: StackMap locals: org.jruby.Ruby org.jruby.ext.fiber.ThreadFiber$FiberData java.util.concurrent.atomic.AtomicReference org.jruby.runtime.Block org.jruby.runtime.ThreadContext java.lang.Thread java.lang.String org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 3
aload 4
aload 7
aconst_null
invokevirtual org.jruby.runtime.Block.yieldArray:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 8
start local 8 13: StackMap locals: org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.fiber:Ljava/lang/ref/WeakReference;
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
checkcast org.jruby.ext.fiber.ThreadFiber
astore 9
start local 9 14: aload 9
ifnull 15
aload 9
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
15: StackMap locals: org.jruby.ext.fiber.ThreadFiber
StackMap stack:
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.data:Lorg/jruby/ext/fiber/ThreadFiber$FiberData;
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
aload 4
iconst_1
anewarray org.jruby.runtime.builtin.IRubyObject
dup
iconst_0
aload 8
aastore
invokevirtual org.jruby.ext.fiber.FiberQueue.push:(Lorg/jruby/runtime/ThreadContext;[Lorg/jruby/runtime/builtin/IRubyObject;)V
end local 9 end local 8 16: goto 23
StackMap locals: org.jruby.Ruby org.jruby.ext.fiber.ThreadFiber$FiberData java.util.concurrent.atomic.AtomicReference org.jruby.runtime.Block org.jruby.runtime.ThreadContext java.lang.Thread java.lang.String org.jruby.runtime.builtin.IRubyObject
StackMap stack: java.lang.Throwable
17: astore 10
18: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
invokevirtual org.jruby.ext.fiber.FiberQueue.shutdown:()V
19: aload 0
invokevirtual org.jruby.Ruby.getThreadService:()Lorg/jruby/internal/runtime/ThreadService;
aload 4
invokevirtual org.jruby.internal.runtime.ThreadService.unregisterCurrentThread:(Lorg/jruby/runtime/ThreadContext;)V
20: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.fiber:Ljava/lang/ref/WeakReference;
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
checkcast org.jruby.ext.fiber.ThreadFiber
astore 11
start local 11 21: aload 11
ifnull 22
aload 11
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
end local 11 22: StackMap locals: org.jruby.Ruby org.jruby.ext.fiber.ThreadFiber$FiberData java.util.concurrent.atomic.AtomicReference org.jruby.runtime.Block org.jruby.runtime.ThreadContext java.lang.Thread java.lang.String org.jruby.runtime.builtin.IRubyObject top top java.lang.Throwable
StackMap stack:
aload 10
athrow
23: StackMap locals: org.jruby.Ruby org.jruby.ext.fiber.ThreadFiber$FiberData java.util.concurrent.atomic.AtomicReference org.jruby.runtime.Block org.jruby.runtime.ThreadContext java.lang.Thread java.lang.String org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.queue:Lorg/jruby/ext/fiber/FiberQueue;
invokevirtual org.jruby.ext.fiber.FiberQueue.shutdown:()V
24: aload 0
invokevirtual org.jruby.Ruby.getThreadService:()Lorg/jruby/internal/runtime/ThreadService;
aload 4
invokevirtual org.jruby.internal.runtime.ThreadService.unregisterCurrentThread:(Lorg/jruby/runtime/ThreadContext;)V
25: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.fiber:Ljava/lang/ref/WeakReference;
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
checkcast org.jruby.ext.fiber.ThreadFiber
astore 11
start local 11 26: aload 11
ifnull 51
aload 11
aconst_null
putfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
end local 11 end local 7 27: goto 51
StackMap locals: org.jruby.Ruby org.jruby.ext.fiber.ThreadFiber$FiberData java.util.concurrent.atomic.AtomicReference org.jruby.runtime.Block org.jruby.runtime.ThreadContext java.lang.Thread java.lang.String
StackMap stack: org.jruby.exceptions.JumpException$FlowControlException
28: astore 7
start local 7 29: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnull 31
30: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
aload 7
aload 0
invokevirtual org.jruby.exceptions.JumpException$FlowControlException.buildException:(Lorg/jruby/Ruby;)Lorg/jruby/exceptions/RaiseException;
invokevirtual org.jruby.exceptions.RaiseException.getException:()Lorg/jruby/RubyException;
invokevirtual org.jruby.RubyThread.raise:(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
end local 7 31: StackMap locals:
StackMap stack:
aload 5
aload 6
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
goto 52
32: StackMap locals:
StackMap stack: org.jruby.ir.runtime.IRBreakJump
pop
33: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnull 35
34: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
getstatic org.jruby.ir.operands.IRException.BREAK_LocalJumpError:Lorg/jruby/ir/operands/IRException;
aload 0
invokevirtual org.jruby.ir.operands.IRException.getException:(Lorg/jruby/Ruby;)Ljava/lang/RuntimeException;
checkcast org.jruby.exceptions.RaiseException
invokevirtual org.jruby.exceptions.RaiseException.getException:()Lorg/jruby/RubyException;
invokevirtual org.jruby.RubyThread.raise:(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
35: StackMap locals:
StackMap stack:
aload 5
aload 6
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
goto 52
36: StackMap locals:
StackMap stack: org.jruby.ir.runtime.IRReturnJump
pop
37: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnull 39
38: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
getstatic org.jruby.ir.operands.IRException.RETURN_LocalJumpError:Lorg/jruby/ir/operands/IRException;
aload 0
invokevirtual org.jruby.ir.operands.IRException.getException:(Lorg/jruby/Ruby;)Ljava/lang/RuntimeException;
checkcast org.jruby.exceptions.RaiseException
invokevirtual org.jruby.exceptions.RaiseException.getException:()Lorg/jruby/RubyException;
invokevirtual org.jruby.RubyThread.raise:(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
39: StackMap locals:
StackMap stack:
aload 5
aload 6
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
goto 52
40: StackMap locals:
StackMap stack: org.jruby.exceptions.RaiseException
astore 7
start local 7 41: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnull 43
42: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
aload 7
invokevirtual org.jruby.exceptions.RaiseException.getException:()Lorg/jruby/RubyException;
invokevirtual org.jruby.RubyThread.raise:(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
end local 7 43: StackMap locals:
StackMap stack:
aload 5
aload 6
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
goto 52
44: StackMap locals:
StackMap stack: java.lang.Throwable
astore 7
start local 7 45: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
ifnull 47
46: aload 1
getfield org.jruby.ext.fiber.ThreadFiber$FiberData.prev:Lorg/jruby/ext/fiber/ThreadFiber;
getfield org.jruby.ext.fiber.ThreadFiber.thread:Lorg/jruby/RubyThread;
aload 0
aload 7
invokestatic org.jruby.javasupport.JavaUtil.convertJavaToUsableRubyObject:(Lorg/jruby/Ruby;Ljava/lang/Object;)Lorg/jruby/runtime/builtin/IRubyObject;
invokevirtual org.jruby.RubyThread.raise:(Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
end local 7 47: StackMap locals:
StackMap stack:
aload 5
aload 6
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
goto 52
48: StackMap locals:
StackMap stack: java.lang.Throwable
astore 12
49: aload 5
aload 6
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
50: aload 12
athrow
51: StackMap locals:
StackMap stack:
aload 5
aload 6
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
end local 6 end local 5 end local 4 52: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
1 52 4 context Lorg/jruby/runtime/ThreadContext;
6 52 5 thread Ljava/lang/Thread;
7 52 6 oldName Ljava/lang/String;
9 27 7 init Lorg/jruby/runtime/builtin/IRubyObject;
11 12 8 result Lorg/jruby/runtime/builtin/IRubyObject;
13 16 8 result Lorg/jruby/runtime/builtin/IRubyObject;
14 16 9 tf Lorg/jruby/ext/fiber/ThreadFiber;
21 22 11 tf Lorg/jruby/ext/fiber/ThreadFiber;
26 27 11 tf Lorg/jruby/ext/fiber/ThreadFiber;
29 31 7 fce Lorg/jruby/exceptions/JumpException$FlowControlException;
41 43 7 re Lorg/jruby/exceptions/RaiseException;
45 47 7 t Ljava/lang/Throwable;
Exception table:
from to target type
9 17 17 any
8 27 28 Class org.jruby.exceptions.JumpException$FlowControlException
8 27 32 Class org.jruby.ir.runtime.IRBreakJump
8 27 36 Class org.jruby.ir.runtime.IRReturnJump
8 27 40 Class org.jruby.exceptions.RaiseException
8 27 44 Class java.lang.Throwable
8 31 48 any
32 35 48 any
36 39 48 any
40 43 48 any
44 47 48 any
}
SourceFile: "ThreadFiber.java"
NestMembers:
org.jruby.ext.fiber.ThreadFiber$FiberData
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public FlowControlException = org.jruby.exceptions.JumpException$FlowControlException of org.jruby.exceptions.JumpException
public FiberData = org.jruby.ext.fiber.ThreadFiber$FiberData of org.jruby.ext.fiber.ThreadFiber