You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
2.6.9 elif with multiple COME_FROMs
This commit is contained in:
BIN
test/bytecode_2.6/03_if_elif.pyc
Normal file
BIN
test/bytecode_2.6/03_if_elif.pyc
Normal file
Binary file not shown.
8
test/simple_source/stmts/03_if_elif.py
Normal file
8
test/simple_source/stmts/03_if_elif.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# 2.6.9 symbols.py
|
||||||
|
# Bug in 2.6 is having multple COME_FROMs due to the
|
||||||
|
# "and" in the "if" clause
|
||||||
|
if __name__:
|
||||||
|
if __file__ and name:
|
||||||
|
pass
|
||||||
|
elif name:
|
||||||
|
pass
|
@@ -79,7 +79,7 @@ class Python26Parser(Python2Parser):
|
|||||||
jb_cont ::= CONTINUE
|
jb_cont ::= CONTINUE
|
||||||
|
|
||||||
jb_cf_pop ::= JUMP_BACK come_froms POP_TOP
|
jb_cf_pop ::= JUMP_BACK come_froms POP_TOP
|
||||||
ja_cf_pop ::= JUMP_ABSOLUTE come_from_pop
|
ja_cf_pop ::= JUMP_ABSOLUTE come_froms POP_TOP
|
||||||
jf_cf_pop ::= JUMP_FORWARD come_froms POP_TOP
|
jf_cf_pop ::= JUMP_FORWARD come_froms POP_TOP
|
||||||
|
|
||||||
bp_come_from ::= POP_BLOCK COME_FROM
|
bp_come_from ::= POP_BLOCK COME_FROM
|
||||||
@@ -143,6 +143,7 @@ class Python26Parser(Python2Parser):
|
|||||||
return_stmt ::= ret_expr RETURN_VALUE come_from_pop
|
return_stmt ::= ret_expr RETURN_VALUE come_from_pop
|
||||||
return_if_stmt ::= ret_expr RETURN_END_IF come_from_pop
|
return_if_stmt ::= ret_expr RETURN_END_IF come_from_pop
|
||||||
|
|
||||||
|
iflaststmtc ::= testexpr c_stmts_opt JUMP_ABSOLUTE else_suitec COME_FROM
|
||||||
iflaststmtl ::= testexpr c_stmts_opt JUMP_BACK come_from_pop
|
iflaststmtl ::= testexpr c_stmts_opt JUMP_BACK come_from_pop
|
||||||
iflaststmt ::= testexpr c_stmts_opt JUMP_ABSOLUTE come_from_pop
|
iflaststmt ::= testexpr c_stmts_opt JUMP_ABSOLUTE come_from_pop
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user