public class com.oracle.truffle.api.debug.test.DebuggerThreadsTest extends com.oracle.truffle.api.debug.test.AbstractDebugTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.oracle.truffle.api.debug.test.DebuggerThreadsTest
super_class: com.oracle.truffle.api.debug.test.AbstractDebugTest
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial com.oracle.truffle.api.debug.test.AbstractDebugTest.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest;
public void testSingleThread();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=7, args_size=1
start local 0 0: aload 0
ldc "STATEMENT()"
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.testSource:(Ljava/lang/String;)Lorg/graalvm/polyglot/Source;
astore 1
start local 1 1: new com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener
dup
invokespecial com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener.<init>:()V
astore 2
start local 2 2: aload 2
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener.events:Ljava/util/List;
astore 3
start local 3 3: aconst_null
astore 4
aconst_null
astore 5
4: aload 0
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.startSession:()Lcom/oracle/truffle/api/debug/DebuggerSession;
astore 6
start local 6 5: aload 6
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.suspendNextExecution:()V
6: aload 6
aload 2
iconst_0
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.setThreadsListener:(Lcom/oracle/truffle/api/debug/DebugThreadsListener;Z)V
7: aload 0
aload 1
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.startEval:(Lorg/graalvm/polyglot/Source;)V
8: aload 0
aload 3
invokedynamic onSuspend(Ljava/util/List;)Lcom/oracle/truffle/api/debug/SuspendedCallback;
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:
(Lcom/oracle/truffle/api/debug/SuspendedEvent;)V
com/oracle/truffle/api/debug/test/DebuggerThreadsTest.lambda$0(Ljava/util/List;Lcom/oracle/truffle/api/debug/SuspendedEvent;)V (6)
(Lcom/oracle/truffle/api/debug/SuspendedEvent;)V
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.expectSuspended:(Lcom/oracle/truffle/api/debug/SuspendedCallback;)V
9: aload 0
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.expectDone:()Ljava/lang/String;
pop
10: aload 0
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.closeEngine:()V
11: ldc 4
aload 3
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
12: aload 3
iconst_3
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.isNew:Z
invokestatic org.junit.Assert.assertFalse:(Z)V
13: aload 3
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.context:Lcom/oracle/truffle/api/debug/DebugContext;
aload 3
iconst_3
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.context:Lcom/oracle/truffle/api/debug/DebugContext;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
14: aload 6
ifnull 20
aload 6
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.close:()V
goto 20
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List java.lang.Throwable java.lang.Throwable com.oracle.truffle.api.debug.DebuggerSession
StackMap stack: java.lang.Throwable
15: astore 4
aload 6
ifnull 16
aload 6
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.close:()V
end local 6 StackMap locals:
StackMap stack:
16: aload 4
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
17: astore 5
aload 4
ifnonnull 18
aload 5
astore 4
goto 19
StackMap locals:
StackMap stack:
18: aload 4
aload 5
if_acmpeq 19
aload 4
aload 5
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
19: aload 4
athrow
20: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.List.clear:()V
21: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest;
1 22 1 source Lorg/graalvm/polyglot/Source;
2 22 2 threadsListener Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$TestThreadsListener;
3 22 3 events Ljava/util/List<Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;>;
5 16 6 session Lcom/oracle/truffle/api/debug/DebuggerSession;
Exception table:
from to target type
5 14 15 any
4 17 17 any
Exceptions:
throws java.lang.Throwable
RuntimeVisibleAnnotations:
org.junit.Test()
public void testSpawnThreads();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=9, args_size=1
start local 0 0: bipush 10
istore 1
start local 1 1: aload 0
new java.lang.StringBuilder
dup
ldc "ROOT(DEFINE(foo, STATEMENT), LOOP("
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc ", SPAWN(foo)), JOIN())"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.testSource:(Ljava/lang/String;)Lorg/graalvm/polyglot/Source;
astore 2
start local 2 2: new com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener
dup
invokespecial com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener.<init>:()V
astore 3
start local 3 3: aload 3
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener.events:Ljava/util/List;
astore 4
start local 4 4: aconst_null
astore 5
aconst_null
astore 6
5: aload 0
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.startSession:()Lcom/oracle/truffle/api/debug/DebuggerSession;
astore 7
start local 7 6: aload 7
aload 3
iconst_0
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.setThreadsListener:(Lcom/oracle/truffle/api/debug/DebugThreadsListener;Z)V
7: aload 0
aload 2
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.startEval:(Lorg/graalvm/polyglot/Source;)V
8: aload 0
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.expectDone:()Ljava/lang/String;
pop
9: aload 7
ifnull 15
aload 7
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.close:()V
goto 15
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest int org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List java.lang.Throwable java.lang.Throwable com.oracle.truffle.api.debug.DebuggerSession
StackMap stack: java.lang.Throwable
10: astore 5
aload 7
ifnull 11
aload 7
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.close:()V
end local 7 StackMap locals:
StackMap stack:
11: aload 5
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
12: astore 6
aload 5
ifnonnull 13
aload 6
astore 5
goto 14
StackMap locals:
StackMap stack:
13: aload 5
aload 6
if_acmpeq 14
aload 5
aload 6
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
14: aload 5
athrow
15: StackMap locals:
StackMap stack:
iconst_1
iconst_2
iload 1
imul
iadd
i2l
aload 4
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
16: new java.util.ArrayList
dup
iconst_1
iload 1
iadd
invokespecial java.util.ArrayList.<init>:(I)V
astore 5
start local 5 17: aload 4
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 21
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest int org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List java.util.List top java.util.Iterator
StackMap stack:
18: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
astore 6
start local 6 19: aload 6
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.isNew:Z
ifeq 21
20: aload 5
aload 6
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 6 21: StackMap locals:
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 18
22: iconst_1
iload 1
iadd
i2l
aload 5
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
23: aload 4
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.context:Lcom/oracle/truffle/api/debug/DebugContext;
astore 6
start local 6 24: aload 4
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 8
goto 27
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest int org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List java.util.List com.oracle.truffle.api.debug.DebugContext top java.util.Iterator
StackMap stack:
25: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
astore 7
start local 7 26: aload 6
aload 7
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.context:Lcom/oracle/truffle/api/debug/DebugContext;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
end local 7 27: StackMap locals:
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 25
28: aload 4
invokeinterface java.util.List.clear:()V
29: return
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 30 0 this Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest;
1 30 1 numThreads I
2 30 2 source Lorg/graalvm/polyglot/Source;
3 30 3 threadsListener Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$TestThreadsListener;
4 30 4 events Ljava/util/List<Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;>;
6 11 7 session Lcom/oracle/truffle/api/debug/DebuggerSession;
17 30 5 startEvents Ljava/util/List<Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;>;
19 21 6 event Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;
24 30 6 dcontext Lcom/oracle/truffle/api/debug/DebugContext;
26 27 7 event Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;
Exception table:
from to target type
6 9 10 any
5 12 12 any
RuntimeVisibleAnnotations:
org.junit.Test()
public void testContextThreads();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=13, args_size=1
start local 0 0: invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
astore 1
start local 1 1: aload 0
ldc "STATEMENT()"
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.testSource:(Ljava/lang/String;)Lorg/graalvm/polyglot/Source;
astore 2
start local 2 2: new com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener
dup
invokespecial com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener.<init>:()V
astore 3
start local 3 3: aload 3
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener.events:Ljava/util/List;
astore 4
start local 4 4: bipush 10
istore 5
start local 5 5: iload 5
anewarray java.lang.Thread
astore 6
start local 6 6: aload 1
invokevirtual org.graalvm.polyglot.Engine.getInstruments:()Ljava/util/Map;
ldc "debugger"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.graalvm.polyglot.Instrument
ldc Lcom/oracle/truffle/api/debug/Debugger;
invokevirtual org.graalvm.polyglot.Instrument.lookup:(Ljava/lang/Class;)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.Debugger
astore 7
start local 7 7: aconst_null
astore 8
aconst_null
astore 9
8: aload 7
aconst_null
invokevirtual com.oracle.truffle.api.debug.Debugger.startSession:(Lcom/oracle/truffle/api/debug/SuspendedCallback;)Lcom/oracle/truffle/api/debug/DebuggerSession;
astore 10
start local 10 9: aload 10
aload 3
iconst_0
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.setThreadsListener:(Lcom/oracle/truffle/api/debug/DebugThreadsListener;Z)V
10: iconst_0
istore 11
start local 11 11: goto 14
12: StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest org.graalvm.polyglot.Engine org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List int java.lang.Thread[] com.oracle.truffle.api.debug.Debugger java.lang.Throwable java.lang.Throwable com.oracle.truffle.api.debug.DebuggerSession int
StackMap stack:
aload 6
iload 11
new com.oracle.truffle.api.debug.test.DebuggerThreadsTest$1
dup
aload 0
aload 1
aload 2
invokespecial com.oracle.truffle.api.debug.test.DebuggerThreadsTest$1.<init>:(Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest;Lorg/graalvm/polyglot/Engine;Lorg/graalvm/polyglot/Source;)V
aastore
13: iinc 11 1
StackMap locals:
StackMap stack:
14: iload 11
iload 5
if_icmplt 12
end local 11 15: iconst_0
istore 11
start local 11 16: goto 19
17: StackMap locals:
StackMap stack:
aload 6
iload 11
aaload
invokevirtual java.lang.Thread.start:()V
18: iinc 11 1
StackMap locals:
StackMap stack:
19: iload 11
iload 5
if_icmplt 17
end local 11 20: iconst_0
istore 11
start local 11 21: goto 24
22: StackMap locals:
StackMap stack:
aload 6
iload 11
aaload
invokevirtual java.lang.Thread.join:()V
23: iinc 11 1
StackMap locals:
StackMap stack:
24: iload 11
iload 5
if_icmplt 22
end local 11 25: aload 10
ifnull 31
aload 10
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.close:()V
goto 31
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest org.graalvm.polyglot.Engine org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List int java.lang.Thread[] com.oracle.truffle.api.debug.Debugger java.lang.Throwable java.lang.Throwable com.oracle.truffle.api.debug.DebuggerSession
StackMap stack: java.lang.Throwable
26: astore 8
aload 10
ifnull 27
aload 10
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.close:()V
end local 10 StackMap locals:
StackMap stack:
27: aload 8
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
28: astore 9
aload 8
ifnonnull 29
aload 9
astore 8
goto 30
StackMap locals:
StackMap stack:
29: aload 8
aload 9
if_acmpeq 30
aload 8
aload 9
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
30: aload 8
athrow
31: StackMap locals:
StackMap stack:
iconst_2
iload 5
imul
i2l
aload 4
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
32: new java.util.ArrayList
dup
iload 5
invokespecial java.util.ArrayList.<init>:(I)V
astore 8
start local 8 33: aload 4
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 10
goto 37
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest org.graalvm.polyglot.Engine org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List int java.lang.Thread[] com.oracle.truffle.api.debug.Debugger java.util.List top java.util.Iterator
StackMap stack:
34: aload 10
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
astore 9
start local 9 35: aload 9
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.isNew:Z
ifeq 37
36: aload 8
aload 9
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 9 37: StackMap locals:
StackMap stack:
aload 10
invokeinterface java.util.Iterator.hasNext:()Z
ifne 34
38: iload 5
i2l
aload 8
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
39: new java.util.HashSet
dup
aload 6
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokespecial java.util.HashSet.<init>:(Ljava/util/Collection;)V
astore 9
start local 9 40: iconst_0
istore 10
start local 10 41: goto 44
42: StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest org.graalvm.polyglot.Engine org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List int java.lang.Thread[] com.oracle.truffle.api.debug.Debugger java.util.List java.util.Set int
StackMap stack:
aload 9
aload 8
iload 10
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.thread:Ljava/lang/Thread;
invokeinterface java.util.Set.remove:(Ljava/lang/Object;)Z
invokestatic org.junit.Assert.assertTrue:(Z)V
43: iinc 10 1
StackMap locals:
StackMap stack:
44: iload 10
iload 5
if_icmplt 42
end local 10 45: aload 9
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
aload 9
invokeinterface java.util.Set.isEmpty:()Z
invokestatic org.junit.Assert.assertTrue:(Ljava/lang/String;Z)V
46: new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 10
start local 10 47: aload 4
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 12
goto 50
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest org.graalvm.polyglot.Engine org.graalvm.polyglot.Source com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List int java.lang.Thread[] com.oracle.truffle.api.debug.Debugger java.util.List java.util.Set java.util.Set top java.util.Iterator
StackMap stack:
48: aload 12
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
astore 11
start local 11 49: aload 10
aload 11
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.context:Lcom/oracle/truffle/api/debug/DebugContext;
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
end local 11 50: StackMap locals:
StackMap stack:
aload 12
invokeinterface java.util.Iterator.hasNext:()Z
ifne 48
51: iload 5
i2l
aload 10
invokeinterface java.util.Set.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
52: return
end local 10 end local 9 end local 8 end local 7 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 53 0 this Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest;
1 53 1 engine Lorg/graalvm/polyglot/Engine;
2 53 2 source Lorg/graalvm/polyglot/Source;
3 53 3 threadsListener Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$TestThreadsListener;
4 53 4 events Ljava/util/List<Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;>;
5 53 5 numThreads I
6 53 6 threads [Ljava/lang/Thread;
7 53 7 debugger Lcom/oracle/truffle/api/debug/Debugger;
9 27 10 session Lcom/oracle/truffle/api/debug/DebuggerSession;
11 15 11 i I
16 20 11 i I
21 25 11 i I
33 53 8 startEvents Ljava/util/List<Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;>;
35 37 9 event Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;
40 53 9 allThreads Ljava/util/Set<Ljava/lang/Thread;>;
41 45 10 i I
47 53 10 distinctContexts Ljava/util/Set<Lcom/oracle/truffle/api/debug/DebugContext;>;
49 50 11 event Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;
Exception table:
from to target type
9 25 26 any
8 28 28 any
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void testGetStartedThreads();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=14, args_size=1
start local 0 0: invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
astore 1
start local 1 1: new com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener
dup
invokespecial com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener.<init>:()V
astore 2
start local 2 2: aload 2
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener.events:Ljava/util/List;
astore 3
start local 3 3: aload 1
invokevirtual org.graalvm.polyglot.Engine.getInstruments:()Ljava/util/Map;
ldc "debugger"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.graalvm.polyglot.Instrument
ldc Lcom/oracle/truffle/api/debug/Debugger;
invokevirtual org.graalvm.polyglot.Instrument.lookup:(Ljava/lang/Class;)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.Debugger
astore 4
start local 4 4: new java.util.concurrent.CountDownLatch
dup
iconst_1
invokespecial java.util.concurrent.CountDownLatch.<init>:(I)V
astore 5
start local 5 5: iconst_1
anewarray com.oracle.truffle.api.debug.DebuggerSession
astore 6
start local 6 6: aconst_null
astore 7
aconst_null
astore 8
7: aload 4
new com.oracle.truffle.api.debug.test.DebuggerThreadsTest$2
dup
aload 0
aload 5
aload 6
aload 2
aload 3
invokespecial com.oracle.truffle.api.debug.test.DebuggerThreadsTest$2.<init>:(Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest;Ljava/util/concurrent/CountDownLatch;[Lcom/oracle/truffle/api/debug/DebuggerSession;Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$TestThreadsListener;Ljava/util/List;)V
invokevirtual com.oracle.truffle.api.debug.Debugger.startSession:(Lcom/oracle/truffle/api/debug/SuspendedCallback;)Lcom/oracle/truffle/api/debug/DebuggerSession;
astore 9
start local 9 8: aload 9
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.suspendNextExecution:()V
9: aload 6
iconst_0
aload 9
aastore
10: aconst_null
astore 10
aconst_null
astore 11
11: iconst_0
anewarray java.lang.String
invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
aload 1
invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
iconst_1
invokevirtual org.graalvm.polyglot.Context$Builder.allowCreateThread:(Z)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 12
start local 12 12: aload 0
ldc "ROOT(DEFINE(f1, EXPRESSION), SPAWN(f1), JOIN())"
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.testSource:(Ljava/lang/String;)Lorg/graalvm/polyglot/Source;
astore 13
start local 13 13: aload 12
aload 13
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
pop
14: aload 0
ldc "ROOT(DEFINE(foo, STATEMENT), SPAWN(foo))"
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.testSource:(Ljava/lang/String;)Lorg/graalvm/polyglot/Source;
astore 13
15: aload 12
aload 13
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
pop
16: aload 5
invokevirtual java.util.concurrent.CountDownLatch.await:()V
17: aload 12
aload 0
ldc "JOIN()"
invokevirtual com.oracle.truffle.api.debug.test.DebuggerThreadsTest.testSource:(Ljava/lang/String;)Lorg/graalvm/polyglot/Source;
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
pop
18: aload 3
invokevirtual java.lang.Object.toString:()Ljava/lang/String;
ldc 3
aload 3
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/String;JJ)V
19: aload 3
iconst_2
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.isNew:Z
invokestatic org.junit.Assert.assertFalse:(Z)V
20: aload 3
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.thread:Ljava/lang/Thread;
aload 3
iconst_2
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.thread:Ljava/lang/Thread;
if_acmpeq 21
aload 3
iconst_1
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.thread:Ljava/lang/Thread;
aload 3
iconst_2
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.thread:Ljava/lang/Thread;
if_acmpeq 21
iconst_0
goto 22
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest org.graalvm.polyglot.Engine com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List com.oracle.truffle.api.debug.Debugger java.util.concurrent.CountDownLatch com.oracle.truffle.api.debug.DebuggerSession[] java.lang.Throwable java.lang.Throwable com.oracle.truffle.api.debug.DebuggerSession java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.Source
StackMap stack:
21: iconst_1
StackMap locals:
StackMap stack: int
22: invokestatic org.junit.Assert.assertTrue:(Z)V
end local 13 23: aload 12
ifnull 29
aload 12
invokevirtual org.graalvm.polyglot.Context.close:()V
goto 29
StackMap locals: com.oracle.truffle.api.debug.test.DebuggerThreadsTest org.graalvm.polyglot.Engine com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener java.util.List com.oracle.truffle.api.debug.Debugger java.util.concurrent.CountDownLatch com.oracle.truffle.api.debug.DebuggerSession[] java.lang.Throwable java.lang.Throwable com.oracle.truffle.api.debug.DebuggerSession java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
StackMap stack: java.lang.Throwable
24: astore 10
aload 12
ifnull 25
aload 12
invokevirtual org.graalvm.polyglot.Context.close:()V
end local 12 StackMap locals:
StackMap stack:
25: aload 10
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
26: astore 11
aload 10
ifnonnull 27
aload 11
astore 10
goto 28
StackMap locals:
StackMap stack:
27: aload 10
aload 11
if_acmpeq 28
aload 10
aload 11
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
28: aload 10
athrow
29: StackMap locals:
StackMap stack:
ldc 4
aload 3
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
30: aload 9
ifnull 36
aload 9
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.close:()V
goto 36
StackMap locals:
StackMap stack: java.lang.Throwable
31: astore 7
aload 9
ifnull 32
aload 9
invokevirtual com.oracle.truffle.api.debug.DebuggerSession.close:()V
end local 9 StackMap locals:
StackMap stack:
32: aload 7
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
33: astore 8
aload 7
ifnonnull 34
aload 8
astore 7
goto 35
StackMap locals:
StackMap stack:
34: aload 7
aload 8
if_acmpeq 35
aload 7
aload 8
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
35: aload 7
athrow
36: StackMap locals:
StackMap stack:
return
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 37 0 this Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest;
1 37 1 engine Lorg/graalvm/polyglot/Engine;
2 37 2 threadsListener Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$TestThreadsListener;
3 37 3 events Ljava/util/List<Lcom/oracle/truffle/api/debug/test/DebuggerThreadsTest$ThreadEvent;>;
4 37 4 debugger Lcom/oracle/truffle/api/debug/Debugger;
5 37 5 latch Ljava/util/concurrent/CountDownLatch;
6 37 6 sessionPtr [Lcom/oracle/truffle/api/debug/DebuggerSession;
8 32 9 session Lcom/oracle/truffle/api/debug/DebuggerSession;
12 25 12 context Lorg/graalvm/polyglot/Context;
13 23 13 source Lorg/graalvm/polyglot/Source;
Exception table:
from to target type
12 23 24 any
11 26 26 any
8 30 31 any
7 33 33 any
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
private static void lambda$0(java.util.List, com.oracle.truffle.api.debug.SuspendedEvent);
descriptor: (Ljava/util/List;Lcom/oracle/truffle/api/debug/SuspendedEvent;)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=4, locals=2, args_size=2
start local 1 0: lconst_1
aload 0
invokeinterface java.util.List.size:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
1: aload 0
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.isNew:Z
invokestatic org.junit.Assert.assertTrue:(Z)V
2: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
aload 0
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.thread:Ljava/lang/Thread;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
3: aload 0
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
getfield com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent.context:Lcom/oracle/truffle/api/debug/DebugContext;
invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
4: return
end local 1 LocalVariableTable:
Start End Slot Name Signature
0 5 1 event Lcom/oracle/truffle/api/debug/SuspendedEvent;
}
SourceFile: "DebuggerThreadsTest.java"
NestMembers:
com.oracle.truffle.api.debug.test.DebuggerThreadsTest$1 com.oracle.truffle.api.debug.test.DebuggerThreadsTest$2 com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent
InnerClasses:
com.oracle.truffle.api.debug.test.DebuggerThreadsTest$1
com.oracle.truffle.api.debug.test.DebuggerThreadsTest$2
private TestThreadsListener = com.oracle.truffle.api.debug.test.DebuggerThreadsTest$TestThreadsListener of com.oracle.truffle.api.debug.test.DebuggerThreadsTest
private ThreadEvent = com.oracle.truffle.api.debug.test.DebuggerThreadsTest$ThreadEvent of com.oracle.truffle.api.debug.test.DebuggerThreadsTest
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public final Builder = org.graalvm.polyglot.Context$Builder of org.graalvm.polyglot.Context