diff --git a/test/bytecode_3.8/01_extended_arg.pyc b/test/bytecode_3.8/01_extended_arg.pyc new file mode 100644 index 00000000..54c33275 Binary files /dev/null and b/test/bytecode_3.8/01_extended_arg.pyc differ diff --git a/test/bytecode_3.8_run/04_for_no_jump_back.pyc b/test/bytecode_3.8_run/04_for_no_jump_back.pyc-notyet similarity index 100% rename from test/bytecode_3.8_run/04_for_no_jump_back.pyc rename to test/bytecode_3.8_run/04_for_no_jump_back.pyc-notyet diff --git a/uncompyle6/parsers/parse37.py b/uncompyle6/parsers/parse37.py index 00239333..cf1d3a61 100644 --- a/uncompyle6/parsers/parse37.py +++ b/uncompyle6/parsers/parse37.py @@ -818,7 +818,7 @@ class Python37Parser(Python37BaseParser): # This handles the case where a "JUMP_ABSOLUTE" is part # of an inner if in c_stmts_opt - ifelsestmt ::= testexpr c_stmts_opt come_froms + ifelsestmt ::= testexpr c_stmts come_froms else_suite come_froms # ifelsestmt ::= testexpr c_stmts_opt jump_forward_else diff --git a/uncompyle6/parsers/parse38.py b/uncompyle6/parsers/parse38.py index 7a481386..a8d7efad 100644 --- a/uncompyle6/parsers/parse38.py +++ b/uncompyle6/parsers/parse38.py @@ -88,6 +88,10 @@ class Python38Parser(Python37Parser): ifpoplaststmtl ::= testexpr POP_TOP c_stmts_opt JUMP_BACK ifelsestmtl ::= testexpr c_stmts_opt jb_cfs else_suitel JUMP_BACK come_froms + # Keep indices the same in ifelsestmtl + cf_pt ::= COME_FROM POP_TOP + ifelsestmtl ::= testexpr c_stmts cf_pt else_suite + for38 ::= expr get_iter store for_block JUMP_BACK for38 ::= expr get_for_iter store for_block JUMP_BACK for38 ::= expr get_for_iter store for_block JUMP_BACK POP_BLOCK