public class com.oracle.truffle.api.library.test.ParallelInitTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.oracle.truffle.api.library.test.ParallelInitTest
super_class: java.lang.Object
{
static final int THREADS;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 20
static final java.util.concurrent.Semaphore AFTER_CINIT;
descriptor: Ljava/util/concurrent/Semaphore;
flags: (0x0018) ACC_STATIC, ACC_FINAL
static final java.util.concurrent.Semaphore BEFORE_USE;
descriptor: Ljava/util/concurrent/Semaphore;
flags: (0x0018) ACC_STATIC, ACC_FINAL
static final java.util.concurrent.Semaphore AFTER_USE;
descriptor: Ljava/util/concurrent/Semaphore;
flags: (0x0018) ACC_STATIC, ACC_FINAL
static final java.util.concurrent.CountDownLatch ALL_STARTED;
descriptor: Ljava/util/concurrent/CountDownLatch;
flags: (0x0018) ACC_STATIC, ACC_FINAL
static volatile boolean testStarted;
descriptor: Z
flags: (0x0048) ACC_STATIC, ACC_VOLATILE
static volatile boolean initialized;
descriptor: Z
flags: (0x0048) ACC_STATIC, ACC_VOLATILE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: new java.util.concurrent.Semaphore
dup
iconst_0
invokespecial java.util.concurrent.Semaphore.<init>:(I)V
putstatic com.oracle.truffle.api.library.test.ParallelInitTest.AFTER_CINIT:Ljava/util/concurrent/Semaphore;
1: new java.util.concurrent.Semaphore
dup
iconst_0
invokespecial java.util.concurrent.Semaphore.<init>:(I)V
putstatic com.oracle.truffle.api.library.test.ParallelInitTest.BEFORE_USE:Ljava/util/concurrent/Semaphore;
2: new java.util.concurrent.Semaphore
dup
iconst_0
invokespecial java.util.concurrent.Semaphore.<init>:(I)V
putstatic com.oracle.truffle.api.library.test.ParallelInitTest.AFTER_USE:Ljava/util/concurrent/Semaphore;
3: new java.util.concurrent.CountDownLatch
dup
bipush 19
invokespecial java.util.concurrent.CountDownLatch.<init>:(I)V
putstatic com.oracle.truffle.api.library.test.ParallelInitTest.ALL_STARTED:Ljava/util/concurrent/CountDownLatch;
4: iconst_0
putstatic com.oracle.truffle.api.library.test.ParallelInitTest.testStarted:Z
5: iconst_0
putstatic com.oracle.truffle.api.library.test.ParallelInitTest.initialized:Z
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/oracle/truffle/api/library/test/ParallelInitTest;
public void testInitDeadlock();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=1
start local 0 0: getstatic com.oracle.truffle.api.library.test.ParallelInitTest.initialized:Z
ifeq 3
1: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "Warning: ParallelInitTest cannot be repeated."
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
2: return
3: StackMap locals:
StackMap stack:
iconst_1
putstatic com.oracle.truffle.api.library.test.ParallelInitTest.testStarted:Z
4: bipush 20
invokestatic java.util.concurrent.Executors.newFixedThreadPool:(I)Ljava/util/concurrent/ExecutorService;
astore 1
start local 1 5: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 6: iconst_0
istore 3
start local 3 7: goto 11
8: StackMap locals: java.util.concurrent.ExecutorService java.util.List int
StackMap stack:
iload 3
istore 4
start local 4 9: aload 2
aload 1
iload 4
invokedynamic run(I)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
com/oracle/truffle/api/library/test/ParallelInitTest.lambda$0(I)V (6)
()V
invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 4 10: iinc 3 1
StackMap locals:
StackMap stack:
11: iload 3
bipush 20
if_icmplt 8
end local 3 12: getstatic com.oracle.truffle.api.library.test.ParallelInitTest.ALL_STARTED:Ljava/util/concurrent/CountDownLatch;
invokevirtual java.util.concurrent.CountDownLatch.await:()V
13: getstatic com.oracle.truffle.api.library.test.ParallelInitTest.BEFORE_USE:Ljava/util/concurrent/Semaphore;
bipush 20
invokevirtual java.util.concurrent.Semaphore.release:(I)V
14: getstatic com.oracle.truffle.api.library.test.ParallelInitTest.AFTER_CINIT:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.release:()V
15: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
goto 18
StackMap locals: com.oracle.truffle.api.library.test.ParallelInitTest java.util.concurrent.ExecutorService java.util.List top java.util.Iterator
StackMap stack:
16: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.concurrent.Future
astore 3
start local 3 17: aload 3
invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
pop
end local 3 18: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 16
end local 2 19: goto 23
StackMap locals: com.oracle.truffle.api.library.test.ParallelInitTest java.util.concurrent.ExecutorService
StackMap stack: java.lang.Throwable
20: astore 5
21: aload 1
invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
22: aload 5
athrow
23: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
24: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lcom/oracle/truffle/api/library/test/ParallelInitTest;
5 25 1 service Ljava/util/concurrent/ExecutorService;
6 19 2 futures Ljava/util/List<Ljava/util/concurrent/Future<*>;>;
7 12 3 i I
9 10 4 index I
17 18 3 future Ljava/util/concurrent/Future<*>;
Exception table:
from to target type
5 20 20 any
Exceptions:
throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
RuntimeVisibleAnnotations:
org.junit.Test()
static void loadLibraryClass();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: getstatic com.oracle.truffle.api.library.test.ParallelInitTest$ParallelInitLibrary.FACTORY:Lcom/oracle/truffle/api/library/LibraryFactory;
invokevirtual com.oracle.truffle.api.library.LibraryFactory.getUncached:()Lcom/oracle/truffle/api/library/Library;
checkcast com.oracle.truffle.api.library.test.ParallelInitTest$ParallelInitLibrary
ldc ""
invokevirtual com.oracle.truffle.api.library.test.ParallelInitTest$ParallelInitLibrary.m0:(Ljava/lang/Object;)Ljava/lang/String;
pop
1: return
LocalVariableTable:
Start End Slot Name Signature
static void useInitLibrary(int);
descriptor: (I)V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: getstatic com.oracle.truffle.api.library.test.ParallelInitTest.ALL_STARTED:Ljava/util/concurrent/CountDownLatch;
invokevirtual java.util.concurrent.CountDownLatch.countDown:()V
1: getstatic com.oracle.truffle.api.library.test.ParallelInitTest.BEFORE_USE:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.acquire:()V
2: goto 5
StackMap locals:
StackMap stack: java.lang.InterruptedException
3: astore 1
start local 1 4: new java.lang.AssertionError
dup
aload 1
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
end local 1 5: StackMap locals:
StackMap stack:
ldc Lcom/oracle/truffle/api/library/test/ParallelInitTest$ParallelInitLibrary;
invokestatic com.oracle.truffle.api.library.LibraryFactory.resolve:(Ljava/lang/Class;)Lcom/oracle/truffle/api/library/LibraryFactory;
invokevirtual com.oracle.truffle.api.library.LibraryFactory.getUncached:()Lcom/oracle/truffle/api/library/Library;
checkcast com.oracle.truffle.api.library.test.ParallelInitTest$ParallelInitLibrary
ldc ""
invokevirtual com.oracle.truffle.api.library.test.ParallelInitTest$ParallelInitLibrary.m0:(Ljava/lang/Object;)Ljava/lang/String;
pop
6: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 i I
4 5 1 e Ljava/lang/InterruptedException;
Exception table:
from to target type
1 2 3 Class java.lang.InterruptedException
MethodParameters:
Name Flags
i
private static void lambda$0(int);
descriptor: (I)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
0: iload 0
bipush 7
if_icmpne 3
1: invokestatic com.oracle.truffle.api.library.test.ParallelInitTest.loadLibraryClass:()V
2: goto 4
3: StackMap locals:
StackMap stack:
iload 0
invokestatic com.oracle.truffle.api.library.test.ParallelInitTest.useInitLibrary:(I)V
4: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "ParallelInitTest.java"
NestMembers:
com.oracle.truffle.api.library.test.ParallelInitTest$ParallelInitLibrary
InnerClasses:
public abstract ParallelInitLibrary = com.oracle.truffle.api.library.test.ParallelInitTest$ParallelInitLibrary of com.oracle.truffle.api.library.test.ParallelInitTest
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles