diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-29 22:27:14 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-29 22:27:14 (GMT) |
commit | 9263848fa154ad2ba5288bf5adeda22d7c90f8a2 (patch) | |
tree | 96a0fcf0d67042f80c7bb089e3ceb294e6b95122 /Lib/compiler/pyassem.py | |
parent | 4bd4dddd55787126857b76410cadd986df3ce7b7 (diff) | |
download | cpython-9263848fa154ad2ba5288bf5adeda22d7c90f8a2.zip cpython-9263848fa154ad2ba5288bf5adeda22d7c90f8a2.tar.gz cpython-9263848fa154ad2ba5288bf5adeda22d7c90f8a2.tar.bz2 |
Improve stack depth computation for try/except and try/finally
Add CONTINUE_LOOP to the list of unconditional transfers
Diffstat (limited to 'Lib/compiler/pyassem.py')
-rw-r--r-- | Lib/compiler/pyassem.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py index 413a954..dc01656 100644 --- a/Lib/compiler/pyassem.py +++ b/Lib/compiler/pyassem.py @@ -267,7 +267,7 @@ class Block: assert len(self.next) == 1, map(str, self.next) _uncond_transfer = ('RETURN_VALUE', 'RAISE_VARARGS', - 'JUMP_ABSOLUTE', 'JUMP_FORWARD') + 'JUMP_ABSOLUTE', 'JUMP_FORWARD', 'CONTINUE_LOOP') def pruneNext(self): """Remove bogus edge for unconditional transfers @@ -753,6 +753,9 @@ class StackDepthTracker: 'IMPORT_STAR': -1, 'IMPORT_NAME': 0, 'IMPORT_FROM': 1, + # close enough... + 'SETUP_EXCEPT': 3, + 'SETUP_FINALLY': 3, } # use pattern match patterns = [ |