Skip to content

Commit 1c57320

Browse files
committed
Copy variable state when cloning bytecode root node
1 parent 89e7cce commit 1c57320

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6160,7 +6160,10 @@ protected boolean isCloneUninitializedSupported() {
61606160

61616161
@Override
61626162
protected RootNode cloneUninitialized() {
6163-
return new PBytecodeRootNode(getLanguage(), getFrameDescriptor(), getSignature(), co, lazySource, internal, parserCallbacks);
6163+
// Note: the bytecode might be quickened already, it's not practical to undo it
6164+
PBytecodeRootNode rootNode = new PBytecodeRootNode(getLanguage(), getFrameDescriptor(), getSignature(), co, lazySource, internal, parserCallbacks);
6165+
rootNode.variableTypes = variableTypes;
6166+
return rootNode;
61646167
}
61656168

61666169
public void triggerDeferredDeprecationWarnings() {

0 commit comments

Comments
 (0)