public class com.oracle.truffle.js.test.threading.ExecutorsTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.oracle.truffle.js.test.threading.ExecutorsTest
super_class: java.lang.Object
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 // com.oracle.truffle.js.test.threading.ExecutorsTest this
0: .line 59
aload 0 /* this */
invokespecial java.lang.Object.<init>:()V
return
end local 0 // com.oracle.truffle.js.test.threading.ExecutorsTest this
LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/oracle/truffle/js/test/threading/ExecutorsTest;
public void fixedThreadPool();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=8, args_size=1
start local 0 // com.oracle.truffle.js.test.threading.ExecutorsTest this
0: .line 70
invokestatic com.oracle.truffle.js.test.threading.TestUtil.newEngineBuilder:()Lorg/graalvm/polyglot/Engine$Builder;
invokevirtual org.graalvm.polyglot.Engine$Builder.build:()Lorg/graalvm/polyglot/Engine;
astore 1 /* engine */
start local 1 // org.graalvm.polyglot.Engine engine
1: .line 71
iconst_4
invokestatic java.util.concurrent.Executors.newFixedThreadPool:(I)Ljava/util/concurrent/ExecutorService;
astore 2 /* pool */
start local 2 // java.util.concurrent.ExecutorService pool
2: .line 74
new com.oracle.truffle.js.test.threading.ExecutorsTest$1
dup
aload 0 /* this */
aload 1 /* engine */
invokespecial com.oracle.truffle.js.test.threading.ExecutorsTest$1.<init>:(Lcom/oracle/truffle/js/test/threading/ExecutorsTest;Lorg/graalvm/polyglot/Engine;)V
invokestatic java.lang.ThreadLocal.withInitial:(Ljava/util/function/Supplier;)Ljava/lang/ThreadLocal;
astore 3 /* tl */
start local 3 // java.lang.ThreadLocal tl
3: .line 82
new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 4 /* tasks */
start local 4 // java.util.Set tasks
4: .line 83
iconst_0
istore 5 /* i */
start local 5 // int i
5: goto 8
6: .line 84
StackMap locals: com.oracle.truffle.js.test.threading.ExecutorsTest org.graalvm.polyglot.Engine java.util.concurrent.ExecutorService java.lang.ThreadLocal java.util.Set int
StackMap stack:
aload 4 /* tasks */
new com.oracle.truffle.js.test.threading.ExecutorsTest$2
dup
aload 0 /* this */
aload 3 /* tl */
invokespecial com.oracle.truffle.js.test.threading.ExecutorsTest$2.<init>:(Lcom/oracle/truffle/js/test/threading/ExecutorsTest;Ljava/lang/ThreadLocal;)V
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
7: .line 83
iinc 5 /* i */ 1
StackMap locals:
StackMap stack:
8: iload 5 /* i */
bipush 42
if_icmplt 6
end local 5 // int i
9: .line 100
aload 2 /* pool */
aload 4 /* tasks */
invokeinterface java.util.concurrent.ExecutorService.invokeAll:(Ljava/util/Collection;)Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 6
goto 12
StackMap locals: com.oracle.truffle.js.test.threading.ExecutorsTest org.graalvm.polyglot.Engine java.util.concurrent.ExecutorService java.lang.ThreadLocal java.util.Set top java.util.Iterator
StackMap stack:
10: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.concurrent.Future
astore 5 /* v */
start local 5 // java.util.concurrent.Future v
11: .line 101
aload 5 /* v */
invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
checkcast org.graalvm.polyglot.Value
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
ldc 42
invokestatic org.junit.Assert.assertEquals:(JJ)V
end local 5 // java.util.concurrent.Future v
12: .line 100
StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 10
13: .line 103
goto 20
StackMap locals: com.oracle.truffle.js.test.threading.ExecutorsTest org.graalvm.polyglot.Engine java.util.concurrent.ExecutorService java.lang.ThreadLocal java.util.Set
StackMap stack: java.lang.Exception
14: astore 5 /* e */
start local 5 // java.lang.Exception e
15: .line 104
new java.lang.AssertionError
dup
aload 5 /* e */
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
end local 5 // java.lang.Exception e
end local 4 // java.util.Set tasks
end local 3 // java.lang.ThreadLocal tl
16: .line 106
StackMap locals: com.oracle.truffle.js.test.threading.ExecutorsTest org.graalvm.polyglot.Engine java.util.concurrent.ExecutorService
StackMap stack: java.lang.Throwable
astore 7
17: .line 107
aload 1 /* engine */
invokevirtual org.graalvm.polyglot.Engine.close:()V
18: .line 108
aload 2 /* pool */
invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
19: .line 109
aload 7
athrow
20: .line 107
StackMap locals:
StackMap stack:
aload 1 /* engine */
invokevirtual org.graalvm.polyglot.Engine.close:()V
21: .line 108
aload 2 /* pool */
invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
22: .line 110
return
end local 2 // java.util.concurrent.ExecutorService pool
end local 1 // org.graalvm.polyglot.Engine engine
end local 0 // com.oracle.truffle.js.test.threading.ExecutorsTest this
LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Lcom/oracle/truffle/js/test/threading/ExecutorsTest;
1 23 1 engine Lorg/graalvm/polyglot/Engine;
2 23 2 pool Ljava/util/concurrent/ExecutorService;
3 16 3 tl Ljava/lang/ThreadLocal<Lorg/graalvm/polyglot/Context;>;
4 16 4 tasks Ljava/util/Set<Ljava/util/concurrent/Callable<Lorg/graalvm/polyglot/Value;>;>;
5 9 5 i I
11 12 5 v Ljava/util/concurrent/Future<Lorg/graalvm/polyglot/Value;>;
15 16 5 e Ljava/lang/Exception;
Exception table:
from to target type
9 13 14 Class java.lang.InterruptedException
9 13 14 Class java.util.concurrent.ExecutionException
2 16 16 any
RuntimeVisibleAnnotations:
org.junit.Test()
}
SourceFile: "ExecutorsTest.java"
NestMembers:
com.oracle.truffle.js.test.threading.ExecutorsTest$1 com.oracle.truffle.js.test.threading.ExecutorsTest$2
InnerClasses:
com.oracle.truffle.js.test.threading.ExecutorsTest$1
com.oracle.truffle.js.test.threading.ExecutorsTest$2
public final Builder = org.graalvm.polyglot.Engine$Builder of org.graalvm.polyglot.Engine