Python 3.0 while1 if bug...

Is a workaround. We really need more tagging in of SETUP_LOOP and COME_FROM.
This commit is contained in:
rocky
2016-11-13 01:23:57 -05:00
parent 50c2e1bda9
commit 80a4ad4f1b
7 changed files with 33 additions and 7 deletions

View File

@@ -149,7 +149,7 @@ class Scanner3(Scanner):
"""
show_asm = self.show_asm if not show_asm else show_asm
# show_asm = 'before'
# show_asm = 'after'
if show_asm in ('both', 'before'):
bytecode = Bytecode(co, self.opc)
for instr in bytecode.get_instructions(co):
@@ -314,7 +314,9 @@ class Scanner3(Scanner):
if target <= inst.offset:
next_opname = self.opname[self.code[inst.offset+3]]
if (inst.offset in self.stmts and
next_opname not in ('END_FINALLY', 'POP_BLOCK')
next_opname not in ('END_FINALLY', 'POP_BLOCK',
# Python 3.0 only uses POP_TOP
'POP_TOP')
and inst.offset not in self.not_continue):
opname = 'CONTINUE'
else: