Skip to content

Commit 174a25a

Browse files
committed
Don't adopt a root node
1 parent ad3a2f9 commit 174a25a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
import com.oracle.truffle.api.source.SourceSection;
5959

6060
public class PBytecodeGeneratorRootNode extends PRootNode implements BytecodeOSRNode {
61-
@Child private PBytecodeRootNode rootNode;
61+
private final PBytecodeRootNode rootNode;
6262
private final int resumeBci;
6363
private final int resumeStackTop;
6464

@@ -71,6 +71,7 @@ public class PBytecodeGeneratorRootNode extends PRootNode implements BytecodeOSR
7171
public PBytecodeGeneratorRootNode(PythonLanguage language, PBytecodeRootNode rootNode, int resumeBci, int resumeStackTop) {
7272
super(language, rootNode.getFrameDescriptor());
7373
this.rootNode = rootNode;
74+
rootNode.adoptChildren();
7475
this.resumeBci = resumeBci;
7576
this.resumeStackTop = resumeStackTop;
7677
frameSlotTypes = new byte[resumeStackTop - rootNode.stackoffset + 1];

0 commit comments

Comments
 (0)