Skip to content

Commit 17047aa

Browse files
committed
pyassem: StackDepthTracker: Add stack effect approximation for JUMP_IF_*_OR_POP
1 parent 03966dd commit 17047aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/pyassem.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ def findDepth(self, insts, debug=0):
748748
'SETUP_FINALLY': 3,
749749
'FOR_ITER': 1,
750750
'WITH_CLEANUP': -1,
751+
'JUMP_IF_TRUE_OR_POP': -1, # approximation
752+
'JUMP_IF_FALSE_OR_POP': -1, # approximation
751753
}
752754
# use pattern match
753755
patterns = [

0 commit comments

Comments
 (0)