Skip to content

Commit 6daa642

Browse files
committed
Fix: Reset current frame info to avoid PFrame allocations.
1 parent 2d40a57 commit 6daa642

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/ExecutionContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ public static void enter(VirtualFrame frame, BranchProfile profile) {
143143
// PFrame here
144144
if (customLocals != null) {
145145
profile.enter();
146+
assert !(customLocals instanceof PFrame.Reference);
146147
thisFrameRef.setCustomLocals(customLocals);
147148
}
148149
}
@@ -190,6 +191,8 @@ public void exit(VirtualFrame frame, PRootNode node) {
190191
callerInfo.markAsEscaped();
191192
info.setBackref(callerInfo);
192193
}
194+
// explicitly clear current frame info
195+
PArguments.setCurrentFrameInfo(frame, null);
193196
}
194197

195198
private MaterializeFrameNode ensureMaterializeNode() {

0 commit comments

Comments
 (0)