You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
2.6.9 bug: multiple COME_FROMs via "or"/"assert"
This commit is contained in:
Binary file not shown.
@@ -6,3 +6,13 @@ if __name__:
|
||||
pass
|
||||
elif name:
|
||||
pass
|
||||
|
||||
# 2.6.9 transformer.py
|
||||
# Bug in 2.6 is multple COME_FROMs as a result
|
||||
# of the "or" in the "assert"
|
||||
if __name__:
|
||||
pass
|
||||
elif __file__:
|
||||
assert __name__ or __file__
|
||||
else:
|
||||
pass
|
||||
|
@@ -93,6 +93,7 @@ class Python26Parser(Python2Parser):
|
||||
# we start a new block. For reasons I don't fully
|
||||
# understand, there is also a value on the top of the stack
|
||||
come_from_pop ::= COME_FROM POP_TOP
|
||||
come_froms_pop ::= come_froms POP_TOP
|
||||
|
||||
"""
|
||||
|
||||
@@ -103,8 +104,8 @@ class Python26Parser(Python2Parser):
|
||||
# can be used
|
||||
filler ::=
|
||||
|
||||
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 come_from_pop
|
||||
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr RAISE_VARARGS_2 come_from_pop
|
||||
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 come_froms_pop
|
||||
assert2 ::= assert_expr jmp_true LOAD_ASSERT expr RAISE_VARARGS_2 come_froms_pop
|
||||
|
||||
break_stmt ::= BREAK_LOOP JUMP_BACK
|
||||
|
||||
@@ -143,7 +144,6 @@ class Python26Parser(Python2Parser):
|
||||
return_stmt ::= ret_expr RETURN_VALUE 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
|
||||
iflaststmt ::= testexpr c_stmts_opt JUMP_ABSOLUTE come_from_pop
|
||||
"""
|
||||
|
Reference in New Issue
Block a user