Skip to content

Commit d9e96e3

Browse files
committed
Fix potential deopt loop in CheckAndLoadLocal
1 parent 6f89d2d commit d9e96e3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode_dsl/PBytecodeDSLRootNode.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3607,11 +3607,10 @@ public static Object doObject(VirtualFrame frame, LocalAccessor accessor, int in
36073607
@Specialization(replaces = "doObject")
36083608
public static Object doObjectOrUnbound(VirtualFrame frame, LocalAccessor accessor, int index,
36093609
@Bind BytecodeNode bytecodeNode) {
3610-
try {
3611-
return accessor.getObject(bytecodeNode, frame);
3612-
} catch (FrameSlotTypeException e) {
3610+
if (accessor.isCleared(bytecodeNode, frame)) {
36133611
throw raiseUnbound(bytecodeNode, index);
36143612
}
3613+
return accessor.getObject(bytecodeNode, frame);
36153614
}
36163615
}
36173616

0 commit comments

Comments
 (0)