Skip to content

Commit fbc2ad2

Browse files
committed
fix condition for closure caching
1 parent 44dfead commit fbc2ad2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/PClosureRootNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected void addClosureCellsToLocals(Frame frame) {
7171
if (singleContextAssumption.isValid() && closure == null) {
7272
CompilerDirectives.transferToInterpreterAndInvalidate();
7373
closure = frameClosure;
74-
} else if ((!singleContextAssumption.isValid() && closure != null && closure != NO_CLOSURE) || closure != frameClosure) {
74+
} else if (closure != NO_CLOSURE && ((!singleContextAssumption.isValid() && closure != null) || closure != frameClosure)) {
7575
CompilerDirectives.transferToInterpreterAndInvalidate();
7676
closure = NO_CLOSURE;
7777
}

0 commit comments

Comments
 (0)