Start rolling in LOAD_ARG for 3.7+

This commit is contained in:
rocky
2022-05-05 21:21:59 -04:00
parent 8576117d00
commit f5043408ec
7 changed files with 323 additions and 62 deletions

View File

@@ -367,7 +367,7 @@ class Python37BaseParser(PythonParser):
if opname == "BUILD_MAP_n":
# PyPy sometimes has no count. Sigh.
rule = (
"dict_comp_func ::= BUILD_MAP_n LOAD_FAST for_iter store "
"dict_comp_func ::= BUILD_MAP_n LOAD_ARG for_iter store "
"comp_iter JUMP_BACK RETURN_VALUE RETURN_LAST"
)
self.add_unique_rule(rule, "dict_comp_func", 1, customize)
@@ -644,7 +644,7 @@ class Python37BaseParser(PythonParser):
func_async_middle ::= POP_BLOCK JUMP_FORWARD COME_FROM_EXCEPT
DUP_TOP LOAD_GLOBAL COMPARE_OP POP_JUMP_IF_TRUE
END_FINALLY COME_FROM
genexpr_func_async ::= LOAD_FAST func_async_prefix
genexpr_func_async ::= LOAD_ARG func_async_prefix
store func_async_middle comp_iter
JUMP_BACK COME_FROM
POP_TOP POP_TOP POP_TOP POP_EXCEPT POP_TOP