diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py index 413a954afd0..dc016560690 100644 --- a/Lib/compiler/pyassem.py +++ b/Lib/compiler/pyassem.py @@ -267,7 +267,7 @@ def addNext(self, 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 @@ def findDepth(self, insts): 'IMPORT_STAR': -1, 'IMPORT_NAME': 0, 'IMPORT_FROM': 1, + # close enough... + 'SETUP_EXCEPT': 3, + 'SETUP_FINALLY': 3, } # use pattern match patterns = [ diff --git a/Tools/compiler/compiler/pyassem.py b/Tools/compiler/compiler/pyassem.py index 413a954afd0..dc016560690 100644 --- a/Tools/compiler/compiler/pyassem.py +++ b/Tools/compiler/compiler/pyassem.py @@ -267,7 +267,7 @@ def addNext(self, 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 @@ def findDepth(self, insts): 'IMPORT_STAR': -1, 'IMPORT_NAME': 0, 'IMPORT_FROM': 1, + # close enough... + 'SETUP_EXCEPT': 3, + 'SETUP_FINALLY': 3, } # use pattern match patterns = [