Skip to content

Commit ae7f56f

Browse files
committed
Fix: ignore custom locals if it is a frame info object.
1 parent 5c735d6 commit ae7f56f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,8 @@ public static void enter(VirtualFrame frame, BranchProfile profile) {
141141
PArguments.setCurrentFrameInfo(frame, thisFrameRef);
142142
// tfel: If there are custom locals, write them into an (incomplete)
143143
// PFrame here
144-
if (customLocals != null) {
144+
if (customLocals != null && !(customLocals instanceof PFrame.Reference)) {
145145
profile.enter();
146-
assert !(customLocals instanceof PFrame.Reference);
147146
thisFrameRef.setCustomLocals(customLocals);
148147
}
149148
}
@@ -191,8 +190,6 @@ public void exit(VirtualFrame frame, PRootNode node) {
191190
callerInfo.markAsEscaped();
192191
info.setBackref(callerInfo);
193192
}
194-
// explicitly clear current frame info
195-
PArguments.setCurrentFrameInfo(frame, null);
196193
}
197194

198195
private MaterializeFrameNode ensureMaterializeNode() {

0 commit comments

Comments
 (0)