You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
extend use of EXTENDED_ARGS in 3.6
switching to a wordcode seems to have made opcode fields smaller so we need EXTENDED_ARG more?
This commit is contained in:
@@ -16,6 +16,19 @@ class Python36Parser(Python35Parser):
|
||||
|
||||
def p_36misc(self, args):
|
||||
"""
|
||||
# For reasons I don't understnad the range of values in POP_JUMP_IF_FALSE
|
||||
# got smaller and so EXTENDED_ARG needs to be used where it didn't before.
|
||||
# Is this relevant to < 3.6 as well?
|
||||
|
||||
jmp_false ::= EXTENDED_ARG POP_JUMP_IF_FALSE
|
||||
jmp_true ::= EXTENDED_ARG POP_JUMP_IF_TRUE
|
||||
_jump ::= EXTENDED_ARG JUMP_BACK
|
||||
jump_back ::= EXTENDED_ARG JUMP_BACK
|
||||
|
||||
for_block ::= l_stmts_opt opt_come_from_loop jump_back
|
||||
|
||||
|
||||
# 3.6 redoes how return_closure works
|
||||
return_closure ::= LOAD_CLOSURE DUP_TOP STORE_NAME RETURN_VALUE RETURN_LAST
|
||||
|
||||
expr ::= LOAD_NAME EXTENDED_ARG
|
||||
|
Reference in New Issue
Block a user