@@ -1062,8 +1062,6 @@ private Object executeUncached(VirtualFrame virtualFrame, Frame localFrame, Byte
1062
1062
return bytecodeLoop (virtualFrame , localFrame , osrNode , initialBci , initialStackTop , false , false );
1063
1063
}
1064
1064
1065
- @ CompilationFinal private PythonLanguage cachedLanguage = null ;
1066
-
1067
1065
@ ExplodeLoop (kind = ExplodeLoop .LoopExplosionKind .MERGE_EXPLODE )
1068
1066
@ SuppressWarnings ("fallthrough" )
1069
1067
@ BytecodeInterpreterSwitch
@@ -1078,13 +1076,7 @@ private Object bytecodeLoop(VirtualFrame virtualFrame, Frame localFrame, Bytecod
1078
1076
unboxVariables (localFrame );
1079
1077
}
1080
1078
1081
- final PythonLanguage language ;
1082
- if (cachedLanguage == null ) {
1083
- CompilerDirectives .transferToInterpreterAndInvalidate ();
1084
- language = cachedLanguage = PythonLanguage .get (this );
1085
- } else {
1086
- language = cachedLanguage ;
1087
- }
1079
+ final PythonLanguage language = PythonLanguage .get (this );
1088
1080
final Assumption noTrace = language .noTracingAssumption ;
1089
1081
final PythonContext pythonContext = PythonContext .get (this );
1090
1082
final PythonContext .PythonThreadState threadState = pythonContext .getThreadState (language );
@@ -2254,7 +2246,7 @@ private void invokeTraceFunction(VirtualFrame virtualFrame, Object arg, PythonCo
2254
2246
Object realResult = result == PNone .NONE ? null : result ;
2255
2247
pyFrame .setLocalTraceFun (realResult );
2256
2248
} catch (Throwable e ) {
2257
- threadState .setTraceFun (null , cachedLanguage );
2249
+ threadState .setTraceFun (null , PythonLanguage . get ( this ) );
2258
2250
throw e ;
2259
2251
} finally {
2260
2252
if (line != -1 ) {
0 commit comments