Skip to content

Commit e48e009

Browse files
author
Adam Hrbac
committed
Remove cachedLanguage
1 parent 856a3c3 commit e48e009

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode/PBytecodeRootNode.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,6 @@ private Object executeUncached(VirtualFrame virtualFrame, Frame localFrame, Byte
10621062
return bytecodeLoop(virtualFrame, localFrame, osrNode, initialBci, initialStackTop, false, false);
10631063
}
10641064

1065-
@CompilationFinal private PythonLanguage cachedLanguage = null;
1066-
10671065
@ExplodeLoop(kind = ExplodeLoop.LoopExplosionKind.MERGE_EXPLODE)
10681066
@SuppressWarnings("fallthrough")
10691067
@BytecodeInterpreterSwitch
@@ -1078,13 +1076,7 @@ private Object bytecodeLoop(VirtualFrame virtualFrame, Frame localFrame, Bytecod
10781076
unboxVariables(localFrame);
10791077
}
10801078

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);
10881080
final Assumption noTrace = language.noTracingAssumption;
10891081
final PythonContext pythonContext = PythonContext.get(this);
10901082
final PythonContext.PythonThreadState threadState = pythonContext.getThreadState(language);
@@ -2254,7 +2246,7 @@ private void invokeTraceFunction(VirtualFrame virtualFrame, Object arg, PythonCo
22542246
Object realResult = result == PNone.NONE ? null : result;
22552247
pyFrame.setLocalTraceFun(realResult);
22562248
} catch (Throwable e) {
2257-
threadState.setTraceFun(null, cachedLanguage);
2249+
threadState.setTraceFun(null, PythonLanguage.get(this));
22582250
throw e;
22592251
} finally {
22602252
if (line != -1) {

0 commit comments

Comments
 (0)