More Python 3.0 for JUMP elimination ...

here, in except blocks.
This commit is contained in:
rocky 2019-11-11 13:50:48 -05:00
parent bdc24d7f51
commit 1419acf019
3 changed files with 13 additions and 0 deletions

View File

@ -7,3 +7,13 @@ def start_new_thread(function, args, kwargs={}):
pass
except:
args()
# Adapted from 3.0.1 code.py
# Bug is again JUMP_FORWARD elimination compared
# to earlier and later Pythons.
def interact():
while 1:
try:
more = 1
except KeyboardInterrupt:
more = 0

View File

@ -121,6 +121,9 @@ class Python30Parser(Python31Parser):
gen_comp_body ::= expr YIELD_VALUE COME_FROM POP_TOP
except_handler ::= jmp_abs COME_FROM_EXCEPT except_stmts
COME_FROM POP_TOP END_FINALLY
################################################################################
for_block ::= l_stmts_opt _come_froms POP_TOP JUMP_BACK