Merge branch 'master' into python-2.4

This commit is contained in:
rocky
2018-05-01 03:17:49 -04:00
4 changed files with 17 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,9 @@
# Issue #173. Bug is that 2.7.5 omits POP_BLOCK in
# in later 2.7 grammar.
# while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK COME_FROM
# while1stmt ::= SETUP_LOOP l_stmts_opt CONTINUE COME_FROM
# which is included in later code generation
ms=0
if ms==1:
while 1:
pass

View File

@@ -33,6 +33,9 @@ class Python27Parser(Python2Parser):
set_comp_func ::= BUILD_SET_0 LOAD_FAST FOR_ITER store comp_iter
JUMP_BACK RETURN_VALUE RETURN_LAST
comp_iter ::= comp_if_not
comp_if_not ::= expr jmp_true comp_iter
comp_body ::= dict_comp_body
comp_body ::= set_comp_body
comp_for ::= expr for_iter store comp_iter JUMP_BACK
@@ -136,6 +139,11 @@ class Python27Parser(Python2Parser):
whilestmt ::= SETUP_LOOP testexpr returns
_come_froms POP_BLOCK COME_FROM
# 2.7.5 (and before to 2.7.0?)
while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK COME_FROM
while1stmt ::= SETUP_LOOP l_stmts_opt CONTINUE COME_FROM
while1stmt ::= SETUP_LOOP returns bp_come_from
while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK POP_BLOCK COME_FROM
whilestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK _come_froms