final class com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile
super_class: java.lang.Object
{
private final com.oracle.truffle.api.Assumption singleContext;
descriptor: Lcom/oracle/truffle/api/Assumption;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile java.lang.ref.WeakReference<java.lang.Object> cachedSingleContext;
descriptor: Ljava/lang/ref/WeakReference;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
Signature: Ljava/lang/ref/WeakReference<Ljava/lang/Object;>;
RuntimeVisibleAnnotations:
com.oracle.truffle.api.CompilerDirectives$CompilationFinal()
private volatile java.lang.ref.WeakReference<com.oracle.truffle.polyglot.PolyglotLanguageContext> cachedSingleLanguageContext;
descriptor: Ljava/lang/ref/WeakReference;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
Signature: Ljava/lang/ref/WeakReference<Lcom/oracle/truffle/polyglot/PolyglotLanguageContext;>;
RuntimeVisibleAnnotations:
com.oracle.truffle.api.CompilerDirectives$CompilationFinal()
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lcom/oracle/truffle/polyglot/PolyglotLanguage;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(com.oracle.truffle.polyglot.PolyglotLanguage);
descriptor: (Lcom/oracle/truffle/polyglot/PolyglotLanguage;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
getfield com.oracle.truffle.polyglot.PolyglotLanguage.engine:Lcom/oracle/truffle/polyglot/PolyglotEngineImpl;
getfield com.oracle.truffle.polyglot.PolyglotEngineImpl.singleContext:Lcom/oracle/truffle/api/Assumption;
invokeinterface com.oracle.truffle.api.Assumption.isValid:()Z
ifeq 2
invokestatic com.oracle.truffle.api.Truffle.getRuntime:()Lcom/oracle/truffle/api/TruffleRuntime;
ldc "Language single context."
invokeinterface com.oracle.truffle.api.TruffleRuntime.createAssumption:(Ljava/lang/String;)Lcom/oracle/truffle/api/Assumption;
goto 3
StackMap locals: com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile com.oracle.truffle.polyglot.PolyglotLanguage
StackMap stack: com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile
2: getstatic com.oracle.truffle.api.utilities.NeverValidAssumption.INSTANCE:Lcom/oracle/truffle/api/utilities/NeverValidAssumption;
StackMap locals: com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile com.oracle.truffle.polyglot.PolyglotLanguage
StackMap stack: com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile com.oracle.truffle.api.Assumption
3: putfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.singleContext:Lcom/oracle/truffle/api/Assumption;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/oracle/truffle/polyglot/PolyglotLanguage$ContextProfile;
0 5 1 language Lcom/oracle/truffle/polyglot/PolyglotLanguage;
MethodParameters:
Name Flags
language
public com.oracle.truffle.api.Assumption getSingleContext();
descriptor: ()Lcom/oracle/truffle/api/Assumption;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.singleContext:Lcom/oracle/truffle/api/Assumption;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/oracle/truffle/polyglot/PolyglotLanguage$ContextProfile;
com.oracle.truffle.polyglot.PolyglotLanguageContext profile(java.lang.Object);
descriptor: (Ljava/lang/Object;)Lcom/oracle/truffle/polyglot/PolyglotLanguageContext;
flags: (0x0000)
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.singleContext:Lcom/oracle/truffle/api/Assumption;
invokeinterface com.oracle.truffle.api.Assumption.isValid:()Z
ifeq 8
1: aload 0
getfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.cachedSingleLanguageContext:Ljava/lang/ref/WeakReference;
astore 2
start local 2 2: aload 2
ifnonnull 3
aconst_null
goto 4
StackMap locals: java.lang.ref.WeakReference
StackMap stack:
3: aload 2
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
checkcast com.oracle.truffle.polyglot.PolyglotLanguageContext
StackMap locals:
StackMap stack: com.oracle.truffle.polyglot.PolyglotLanguageContext
4: astore 3
start local 3 5: aload 0
getfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.singleContext:Lcom/oracle/truffle/api/Assumption;
invokeinterface com.oracle.truffle.api.Assumption.isValid:()Z
ifeq 8
6: getstatic com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.$assertionsDisabled:Z
ifne 7
aload 3
aload 1
if_acmpeq 7
new java.lang.AssertionError
dup
aload 3
aload 1
invokestatic com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.assertionError:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
7: StackMap locals: com.oracle.truffle.polyglot.PolyglotLanguageContext
StackMap stack:
aload 3
areturn
end local 3 end local 2 8: StackMap locals:
StackMap stack:
aload 1
checkcast com.oracle.truffle.polyglot.PolyglotLanguageContext
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lcom/oracle/truffle/polyglot/PolyglotLanguage$ContextProfile;
0 9 1 context Ljava/lang/Object;
2 8 2 ref Ljava/lang/ref/WeakReference<Lcom/oracle/truffle/polyglot/PolyglotLanguageContext;>;
5 8 3 cachedSingle Lcom/oracle/truffle/polyglot/PolyglotLanguageContext;
MethodParameters:
Name Flags
context
static java.lang.String assertionError(java.lang.Object, java.lang.Object);
descriptor: (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String;
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " != "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 cachedContext Ljava/lang/Object;
0 1 1 currentContext Ljava/lang/Object;
MethodParameters:
Name Flags
cachedContext
currentContext
void notifyContextCreate(com.oracle.truffle.polyglot.PolyglotLanguageContext, com.oracle.truffle.api.TruffleLanguage$Env);
descriptor: (Lcom/oracle/truffle/polyglot/PolyglotLanguageContext;Lcom/oracle/truffle/api/TruffleLanguage$Env;)V
flags: (0x0000)
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.singleContext:Lcom/oracle/truffle/api/Assumption;
invokeinterface com.oracle.truffle.api.Assumption.isValid:()Z
ifeq 12
1: aload 0
getfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.cachedSingleContext:Ljava/lang/ref/WeakReference;
astore 3
start local 3 2: aload 3
ifnonnull 3
aconst_null
goto 4
StackMap locals: java.lang.ref.WeakReference
StackMap stack:
3: aload 3
invokevirtual java.lang.ref.WeakReference.get:()Ljava/lang/Object;
StackMap locals:
StackMap stack: java.lang.Object
4: astore 4
start local 4 5: getstatic com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.$assertionsDisabled:Z
ifne 6
aload 4
getstatic com.oracle.truffle.polyglot.EngineAccessor.LANGUAGE:Lcom/oracle/truffle/api/impl/Accessor$LanguageSupport;
aload 2
invokevirtual com.oracle.truffle.api.impl.Accessor$LanguageSupport.getContext:(Lcom/oracle/truffle/api/TruffleLanguage$Env;)Ljava/lang/Object;
if_acmpne 6
aload 4
ifnull 6
new java.lang.AssertionError
dup
ldc "Non-null context objects should be distinct"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
6: StackMap locals: java.lang.Object
StackMap stack:
aload 3
ifnonnull 11
7: aload 0
getfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.singleContext:Lcom/oracle/truffle/api/Assumption;
invokeinterface com.oracle.truffle.api.Assumption.isValid:()Z
ifeq 12
8: aload 0
new java.lang.ref.WeakReference
dup
getstatic com.oracle.truffle.polyglot.EngineAccessor.LANGUAGE:Lcom/oracle/truffle/api/impl/Accessor$LanguageSupport;
aload 2
invokevirtual com.oracle.truffle.api.impl.Accessor$LanguageSupport.getContext:(Lcom/oracle/truffle/api/TruffleLanguage$Env;)Ljava/lang/Object;
invokespecial java.lang.ref.WeakReference.<init>:(Ljava/lang/Object;)V
putfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.cachedSingleContext:Ljava/lang/ref/WeakReference;
9: aload 0
new java.lang.ref.WeakReference
dup
aload 1
invokespecial java.lang.ref.WeakReference.<init>:(Ljava/lang/Object;)V
putfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.cachedSingleLanguageContext:Ljava/lang/ref/WeakReference;
10: goto 12
11: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.prepareForMultiContext:()V
end local 4 end local 3 12: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/oracle/truffle/polyglot/PolyglotLanguage$ContextProfile;
0 13 1 context Lcom/oracle/truffle/polyglot/PolyglotLanguageContext;
0 13 2 env Lcom/oracle/truffle/api/TruffleLanguage$Env;
2 12 3 ref Ljava/lang/ref/WeakReference<Ljava/lang/Object;>;
5 12 4 cachedSingle Ljava/lang/Object;
MethodParameters:
Name Flags
context
env
public void prepareForMultiContext();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.singleContext:Lcom/oracle/truffle/api/Assumption;
invokeinterface com.oracle.truffle.api.Assumption.invalidate:()V
1: aload 0
aconst_null
putfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.cachedSingleContext:Ljava/lang/ref/WeakReference;
2: aload 0
aconst_null
putfield com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile.cachedSingleLanguageContext:Ljava/lang/ref/WeakReference;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/oracle/truffle/polyglot/PolyglotLanguage$ContextProfile;
}
SourceFile: "PolyglotLanguage.java"
NestHost: com.oracle.truffle.polyglot.PolyglotLanguage
InnerClasses:
public abstract CompilationFinal = com.oracle.truffle.api.CompilerDirectives$CompilationFinal of com.oracle.truffle.api.CompilerDirectives
public final Env = com.oracle.truffle.api.TruffleLanguage$Env of com.oracle.truffle.api.TruffleLanguage
public abstract LanguageSupport = com.oracle.truffle.api.impl.Accessor$LanguageSupport of com.oracle.truffle.api.impl.Accessor
final ContextProfile = com.oracle.truffle.polyglot.PolyglotLanguage$ContextProfile of com.oracle.truffle.polyglot.PolyglotLanguage