EXTENDED_ARG handling...

get_target() wasn't taking into account EXTENDED_ARG before opcode.

This is mostly relevant in Python 3.6 where the max size before needing
EXTENDED_ARG has been reduced to 256, but theoretically possible in earlier
versions.
This commit is contained in:
rocky
2017-05-19 07:13:20 -04:00
parent 94d1c6dfd3
commit b4efa62fad
2 changed files with 19 additions and 4 deletions

View File

@@ -61,6 +61,8 @@ class Python36Parser(Python35Parser):
continue_stmt ::= EXTENDED_ARG CONTINUE_LOOP
for_block ::= l_stmts_opt opt_come_from_loop jump_back
cmp_list1 ::= expr DUP_TOP ROT_THREE COMPARE_OP
EXTENDED_ARG JUMP_IF_FALSE_OR_POP cmp_list2 COME_FROM
# 3.6 redoes how return_closure works