final class com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler
super_class: java.lang.Object
{
private final com.oracle.truffle.api.instrumentation.Instrumenter instrumenter;
descriptor: Lcom/oracle/truffle/api/instrumentation/Instrumenter;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile com.oracle.truffle.api.instrumentation.EventBinding<?> cancellationBinding;
descriptor: Lcom/oracle/truffle/api/instrumentation/EventBinding;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
Signature: Lcom/oracle/truffle/api/instrumentation/EventBinding<*>;
private int cancellationUsers;
descriptor: I
flags: (0x0002) ACC_PRIVATE
final com.oracle.truffle.polyglot.PolyglotEngineImpl this$0;
descriptor: Lcom/oracle/truffle/polyglot/PolyglotEngineImpl;
flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
void <init>(com.oracle.truffle.polyglot.PolyglotEngineImpl);
descriptor: (Lcom/oracle/truffle/polyglot/PolyglotEngineImpl;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 0: aload 0
aload 1
putfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.this$0:Lcom/oracle/truffle/polyglot/PolyglotEngineImpl;
aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
getstatic com.oracle.truffle.polyglot.EngineAccessor.INSTRUMENT:Lcom/oracle/truffle/api/impl/Accessor$InstrumentSupport;
aload 1
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl.instrumentationHandler:Ljava/lang/Object;
invokevirtual com.oracle.truffle.api.impl.Accessor$InstrumentSupport.getEngineInstrumenter:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.oracle.truffle.api.instrumentation.Instrumenter
putfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.instrumenter:Lcom/oracle/truffle/api/instrumentation/Instrumenter;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/oracle/truffle/polyglot/PolyglotEngineImpl$CancelHandler;
MethodParameters:
Name Flags
this$0 final
void cancel(java.util.List<com.oracle.truffle.polyglot.PolyglotContextImpl>);
descriptor: (Ljava/util/List;)V
flags: (0x0000)
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
lconst_0
aconst_null
invokevirtual com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancel:(Ljava/util/List;JLjava/time/Duration;)Z
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/oracle/truffle/polyglot/PolyglotEngineImpl$CancelHandler;
0 2 1 localContexts Ljava/util/List<Lcom/oracle/truffle/polyglot/PolyglotContextImpl;>;
Signature: (Ljava/util/List<Lcom/oracle/truffle/polyglot/PolyglotContextImpl;>;)V
MethodParameters:
Name Flags
localContexts
boolean cancel(java.util.List<com.oracle.truffle.polyglot.PolyglotContextImpl>, long, java.time.Duration);
descriptor: (Ljava/util/List;JLjava/time/Duration;)Z
flags: (0x0000)
Code:
stack=5, locals=13, args_size=4
start local 0 start local 1 start local 2 start local 4 0: iconst_0
istore 5
start local 5 1: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 6
StackMap locals: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler java.util.List long java.time.Duration int top java.util.Iterator
StackMap stack:
2: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.oracle.truffle.polyglot.PolyglotContextImpl
astore 6
start local 6 3: aload 6
getfield com.oracle.truffle.polyglot.PolyglotContextImpl.cancelling:Z
ifne 4
aload 6
getfield com.oracle.truffle.polyglot.PolyglotContextImpl.interrupting:Z
ifeq 6
4: StackMap locals: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler java.util.List long java.time.Duration int com.oracle.truffle.polyglot.PolyglotContextImpl java.util.Iterator
StackMap stack:
iconst_1
istore 5
5: goto 7
end local 6 6: StackMap locals: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler java.util.List long java.time.Duration int top java.util.Iterator
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
7: StackMap locals: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler java.util.List long java.time.Duration int
StackMap stack:
iload 5
ifeq 35
8: aload 0
invokevirtual com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.enableCancel:()V
9: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 12
StackMap locals: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler java.util.List long java.time.Duration int top java.util.Iterator
StackMap stack:
10: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.oracle.truffle.polyglot.PolyglotContextImpl
astore 6
start local 6 11: aload 6
invokevirtual com.oracle.truffle.polyglot.PolyglotContextImpl.sendInterrupt:()V
end local 6 12: StackMap locals:
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 10
13: aload 4
ifnonnull 19
14: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 17
StackMap locals:
StackMap stack:
15: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.oracle.truffle.polyglot.PolyglotContextImpl
astore 6
start local 6 16: aload 6
invokevirtual com.oracle.truffle.polyglot.PolyglotContextImpl.waitForClose:()V
end local 6 17: StackMap locals:
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 15
18: goto 34
19: StackMap locals: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler java.util.List long java.time.Duration int
StackMap stack:
aload 4
getstatic java.time.Duration.ZERO:Ljava/time/Duration;
if_acmpeq 20
aload 4
invokevirtual java.time.Duration.toMillis:()J
goto 21
StackMap locals:
StackMap stack:
20: lconst_0
StackMap locals:
StackMap stack: long
21: lstore 6
start local 6 22: iconst_1
istore 8
start local 8 23: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 10
goto 27
StackMap locals: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler java.util.List long java.time.Duration int long int top java.util.Iterator
StackMap stack:
24: aload 10
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.oracle.truffle.polyglot.PolyglotContextImpl
astore 9
start local 9 25: aload 9
lload 2
lload 6
invokevirtual com.oracle.truffle.polyglot.PolyglotContextImpl.waitForThreads:(JJ)Z
ifne 27
26: iconst_0
istore 8
end local 9 27: StackMap locals:
StackMap stack:
aload 10
invokeinterface java.util.Iterator.hasNext:()Z
ifne 24
28: iload 8
istore 12
29: aload 0
invokevirtual com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.disableCancel:()V
30: iload 12
ireturn
end local 8 end local 6 31: StackMap locals: com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler java.util.List long java.time.Duration int
StackMap stack: java.lang.Throwable
astore 11
32: aload 0
invokevirtual com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.disableCancel:()V
33: aload 11
athrow
34: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.disableCancel:()V
35: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 5 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 36 0 this Lcom/oracle/truffle/polyglot/PolyglotEngineImpl$CancelHandler;
0 36 1 localContexts Ljava/util/List<Lcom/oracle/truffle/polyglot/PolyglotContextImpl;>;
0 36 2 startMillis J
0 36 4 timeout Ljava/time/Duration;
1 36 5 cancelling Z
3 6 6 context Lcom/oracle/truffle/polyglot/PolyglotContextImpl;
11 12 6 context Lcom/oracle/truffle/polyglot/PolyglotContextImpl;
16 17 6 context Lcom/oracle/truffle/polyglot/PolyglotContextImpl;
22 31 6 cancelTimeoutMillis J
23 31 8 success Z
25 27 9 context Lcom/oracle/truffle/polyglot/PolyglotContextImpl;
Exception table:
from to target type
9 29 31 any
Signature: (Ljava/util/List<Lcom/oracle/truffle/polyglot/PolyglotContextImpl;>;JLjava/time/Duration;)Z
MethodParameters:
Name Flags
localContexts
startMillis
timeout
void enableCancel();
descriptor: ()V
flags: (0x0000)
Code:
stack=6, locals=2, args_size=1
start local 0 0: aload 0
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.this$0:Lcom/oracle/truffle/polyglot/PolyglotEngineImpl;
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl.lock:Ljava/lang/Object;
dup
astore 1
monitorenter
1: aload 0
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancellationBinding:Lcom/oracle/truffle/api/instrumentation/EventBinding;
ifnonnull 3
2: aload 0
aload 0
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.instrumenter:Lcom/oracle/truffle/api/instrumentation/Instrumenter;
getstatic com.oracle.truffle.api.instrumentation.SourceSectionFilter.ANY:Lcom/oracle/truffle/api/instrumentation/SourceSectionFilter;
new com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler$1
dup
aload 0
invokespecial com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler$1.<init>:(Lcom/oracle/truffle/polyglot/PolyglotEngineImpl$CancelHandler;)V
invokevirtual com.oracle.truffle.api.instrumentation.Instrumenter.attachExecutionEventListener:(Lcom/oracle/truffle/api/instrumentation/SourceSectionFilter;Lcom/oracle/truffle/api/instrumentation/ExecutionEventListener;)Lcom/oracle/truffle/api/instrumentation/EventBinding;
putfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancellationBinding:Lcom/oracle/truffle/api/instrumentation/EventBinding;
3: StackMap locals: java.lang.Object
StackMap stack:
aload 0
dup
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancellationUsers:I
iconst_1
iadd
putfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancellationUsers:I
4: aload 1
monitorexit
5: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lcom/oracle/truffle/polyglot/PolyglotEngineImpl$CancelHandler;
Exception table:
from to target type
1 5 6 any
6 7 6 any
private void disableCancel();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=1
start local 0 0: aload 0
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.this$0:Lcom/oracle/truffle/polyglot/PolyglotEngineImpl;
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl.lock:Ljava/lang/Object;
dup
astore 1
monitorenter
1: aload 0
dup
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancellationUsers:I
iconst_1
isub
dup_x1
putfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancellationUsers:I
istore 2
start local 2 2: iload 2
ifgt 7
3: aload 0
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancellationBinding:Lcom/oracle/truffle/api/instrumentation/EventBinding;
astore 3
start local 3 4: aload 3
ifnull 6
5: aload 3
invokevirtual com.oracle.truffle.api.instrumentation.EventBinding.dispose:()V
6: StackMap locals: java.lang.Object int com.oracle.truffle.api.instrumentation.EventBinding
StackMap stack:
aload 0
aconst_null
putfield com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler.cancellationBinding:Lcom/oracle/truffle/api/instrumentation/EventBinding;
end local 3 end local 2 7: StackMap locals:
StackMap stack:
aload 1
monitorexit
8: goto 11
StackMap locals:
StackMap stack: java.lang.Throwable
9: aload 1
monitorexit
10: athrow
11: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/oracle/truffle/polyglot/PolyglotEngineImpl$CancelHandler;
2 7 2 usersLeft I
4 7 3 b Lcom/oracle/truffle/api/instrumentation/EventBinding<*>;
Exception table:
from to target type
1 8 9 any
9 10 9 any
}
SourceFile: "PolyglotEngineImpl.java"
NestHost: com.oracle.truffle.polyglot.PolyglotEngineImpl
InnerClasses:
public abstract InstrumentSupport = com.oracle.truffle.api.impl.Accessor$InstrumentSupport of com.oracle.truffle.api.impl.Accessor
final CancelHandler = com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler of com.oracle.truffle.polyglot.PolyglotEngineImpl
com.oracle.truffle.polyglot.PolyglotEngineImpl$CancelHandler$1