You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Another 2.6 return_stmt bug
This commit is contained in:
Binary file not shown.
@@ -8,3 +8,15 @@ def initiate_send(self):
|
|||||||
else:
|
else:
|
||||||
del self.producer_fifo[0]
|
del self.producer_fifo[0]
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# 2.6.9 contextlib.py
|
||||||
|
# Bug was in return exc, so added:
|
||||||
|
# return_stmt ::= ret_expr RETURN_VALUE_IF come_from_pop
|
||||||
|
|
||||||
|
def __exit__(self, type, value, traceback):
|
||||||
|
try:
|
||||||
|
raise RuntimeError
|
||||||
|
except StopIteration:
|
||||||
|
return exc
|
||||||
|
except:
|
||||||
|
raise
|
||||||
|
@@ -79,6 +79,8 @@ class Python26Parser(Python2Parser):
|
|||||||
ja_cf_pop ::= JUMP_ABSOLUTE come_from_pop
|
ja_cf_pop ::= JUMP_ABSOLUTE come_from_pop
|
||||||
jf_cf_pop ::= JUMP_FORWARD come_from_pop
|
jf_cf_pop ::= JUMP_FORWARD come_from_pop
|
||||||
|
|
||||||
|
jb_bp_come_from ::= JUMP_BACK POP_BLOCK COME_FROM
|
||||||
|
|
||||||
_ifstmts_jump ::= c_stmts_opt jf_pop COME_FROM
|
_ifstmts_jump ::= c_stmts_opt jf_pop COME_FROM
|
||||||
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD COME_FROM come_from_pop
|
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD COME_FROM come_from_pop
|
||||||
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD come_froms POP_TOP COME_FROM
|
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD come_froms POP_TOP COME_FROM
|
||||||
@@ -126,6 +128,7 @@ class Python26Parser(Python2Parser):
|
|||||||
while1stmt ::= SETUP_LOOP return_stmts POP_BLOCK COME_FROM
|
while1stmt ::= SETUP_LOOP return_stmts POP_BLOCK COME_FROM
|
||||||
|
|
||||||
return_stmt ::= ret_expr RETURN_END_IF come_from_pop
|
return_stmt ::= ret_expr RETURN_END_IF 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
|
||||||
|
|
||||||
iflaststmtl ::= testexpr c_stmts_opt JUMP_BACK come_from_pop
|
iflaststmtl ::= testexpr c_stmts_opt JUMP_BACK come_from_pop
|
||||||
@@ -145,13 +148,13 @@ class Python26Parser(Python2Parser):
|
|||||||
lc_body ::= LOAD_NAME expr LIST_APPEND
|
lc_body ::= LOAD_NAME expr LIST_APPEND
|
||||||
lc_body ::= LOAD_FAST expr LIST_APPEND
|
lc_body ::= LOAD_FAST expr LIST_APPEND
|
||||||
|
|
||||||
comp_for ::= SETUP_LOOP expr _for designator comp_iter JUMP_BACK POP_BLOCK COME_FROM
|
comp_for ::= SETUP_LOOP expr _for designator comp_iter jb_bp_come_from
|
||||||
|
|
||||||
|
|
||||||
# Make sure we keep indices the same as 2.7
|
# Make sure we keep indices the same as 2.7
|
||||||
setup_loop_lf ::= SETUP_LOOP LOAD_FAST
|
setup_loop_lf ::= SETUP_LOOP LOAD_FAST
|
||||||
genexpr_func ::= setup_loop_lf FOR_ITER designator comp_iter JUMP_BACK POP_BLOCK COME_FROM
|
genexpr_func ::= setup_loop_lf FOR_ITER designator comp_iter jb_bp_come_from
|
||||||
genexpr_func ::= setup_loop_lf FOR_ITER designator comp_iter JUMP_BACK come_from_pop JUMP_BACK POP_BLOCK COME_FROM
|
genexpr_func ::= setup_loop_lf FOR_ITER designator comp_iter JUMP_BACK come_from_pop jb_bp_come_from
|
||||||
genexpr ::= LOAD_GENEXPR MAKE_FUNCTION_0 expr GET_ITER CALL_FUNCTION_1 COME_FROM
|
genexpr ::= LOAD_GENEXPR MAKE_FUNCTION_0 expr GET_ITER CALL_FUNCTION_1 COME_FROM
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
Reference in New Issue
Block a user