Use LOAD_ARG in 3.6

This commit is contained in:
rocky
2022-05-06 12:41:57 -04:00
parent cc47d61efa
commit cca015c5d6
5 changed files with 133 additions and 6 deletions

View File

@@ -601,6 +601,10 @@ class Scanner3(Scanner):
# other parts like n_LOAD_CONST in pysource.py for example.
pattr = const
pass
elif opname == "LOAD_FAST" and argval == ".0":
# Used as the parameter of a list expression
opname = "LOAD_ARG"
elif opname in ("MAKE_FUNCTION", "MAKE_CLOSURE"):
if self.version >= (3, 6):
# 3.6+ doesn't have MAKE_CLOSURE, so opname == 'MAKE_FUNCTION'