class com.oracle.truffle.js.test.threading.ProducerConsumerTest$Producer extends java.lang.Thread
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.oracle.truffle.js.test.threading.ProducerConsumerTest$Producer
super_class: java.lang.Thread
{
private int sent;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private final java.util.concurrent.BlockingQueue<org.graalvm.polyglot.Value> queue;
descriptor: Ljava/util/concurrent/BlockingQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/BlockingQueue<Lorg/graalvm/polyglot/Value;>;
void <init>(java.util.concurrent.BlockingQueue<org.graalvm.polyglot.Value>);
descriptor: (Ljava/util/concurrent/BlockingQueue;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Thread.<init>:()V
1: aload 0
aload 1
putfield com.oracle.truffle.js.test.threading.ProducerConsumerTest$Producer.queue:Ljava/util/concurrent/BlockingQueue;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/oracle/truffle/js/test/threading/ProducerConsumerTest$Producer;
0 3 1 queue Ljava/util/concurrent/BlockingQueue<Lorg/graalvm/polyglot/Value;>;
Signature: (Ljava/util/concurrent/BlockingQueue<Lorg/graalvm/polyglot/Value;>;)V
MethodParameters:
Name Flags
queue
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: iconst_0
anewarray java.lang.String
invokestatic com.oracle.truffle.js.test.threading.TestUtil.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
getstatic org.graalvm.polyglot.HostAccess.ALL:Lorg/graalvm/polyglot/HostAccess;
invokevirtual org.graalvm.polyglot.Context$Builder.allowHostAccess:(Lorg/graalvm/polyglot/HostAccess;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 1
start local 1 1: aload 1
ldc "js"
invokevirtual org.graalvm.polyglot.Context.getBindings:(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
ldc "queue"
aload 0
getfield com.oracle.truffle.js.test.threading.ProducerConsumerTest$Producer.queue:Ljava/util/concurrent/BlockingQueue;
invokevirtual org.graalvm.polyglot.Value.putMember:(Ljava/lang/String;Ljava/lang/Object;)V
2: aload 0
aload 1
ldc "js"
ldc " var sent = 0;for(var i = 0; i < 127; i++) { queue.put(JSON.stringify({message:i})); sent++;};queue.put(JSON.stringify({message:'byebye'}));++sent;"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
3: invokevirtual org.graalvm.polyglot.Value.asInt:()I
4: putfield com.oracle.truffle.js.test.threading.ProducerConsumerTest$Producer.sent:I
5: goto 9
StackMap locals: com.oracle.truffle.js.test.threading.ProducerConsumerTest$Producer org.graalvm.polyglot.Context
StackMap stack: java.lang.Throwable
6: astore 2
7: aload 1
invokevirtual org.graalvm.polyglot.Context.close:()V
8: aload 2
athrow
9: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.graalvm.polyglot.Context.close:()V
10: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/oracle/truffle/js/test/threading/ProducerConsumerTest$Producer;
1 11 1 cx Lorg/graalvm/polyglot/Context;
Exception table:
from to target type
2 6 6 any
}
SourceFile: "ProducerConsumerTest.java"
NestHost: com.oracle.truffle.js.test.threading.ProducerConsumerTest
InnerClasses:
Producer = com.oracle.truffle.js.test.threading.ProducerConsumerTest$Producer of com.oracle.truffle.js.test.threading.ProducerConsumerTest
public final Builder = org.graalvm.polyglot.Context$Builder of org.graalvm.polyglot.Context