You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
LOAD_CONST -> LOAD_CODE where appropriate
This commit is contained in:
@@ -1015,19 +1015,19 @@ class Python3Parser(PythonParser):
|
||||
|
||||
# Note order of kwargs and pos args changed between 3.3-3.4
|
||||
if self.version <= 3.2:
|
||||
rule = "mkfunc ::= %s%sload_closure LOAD_CONST %s" % (
|
||||
rule = "mkfunc ::= %s%sload_closure LOAD_CODE %s" % (
|
||||
kwargs_str,
|
||||
"expr " * args_pos,
|
||||
opname,
|
||||
)
|
||||
elif self.version == 3.3:
|
||||
rule = "mkfunc ::= %s%sload_closure LOAD_CONST LOAD_STR %s" % (
|
||||
rule = "mkfunc ::= %s%sload_closure LOAD_CODE LOAD_STR %s" % (
|
||||
kwargs_str,
|
||||
"expr " * args_pos,
|
||||
opname,
|
||||
)
|
||||
elif self.version >= 3.4:
|
||||
rule = "mkfunc ::= %s%s load_closure LOAD_CONST LOAD_STR %s" % (
|
||||
rule = "mkfunc ::= %s%s load_closure LOAD_CODE LOAD_STR %s" % (
|
||||
"expr " * args_pos,
|
||||
kwargs_str,
|
||||
opname,
|
||||
@@ -1043,7 +1043,7 @@ class Python3Parser(PythonParser):
|
||||
self.add_unique_rule(rule, opname, token.attr, customize)
|
||||
|
||||
if self.version < 3.4:
|
||||
rule = "mkfunc ::= %sload_closure LOAD_CONST %s" % (
|
||||
rule = "mkfunc ::= %sload_closure LOAD_CODE %s" % (
|
||||
"expr " * args_pos,
|
||||
opname,
|
||||
)
|
||||
@@ -1083,7 +1083,7 @@ class Python3Parser(PythonParser):
|
||||
rule = "mkfunc ::= %s%s%s%s" % (
|
||||
"expr " * stack_count,
|
||||
"load_closure " * closure,
|
||||
"LOAD_CONST LOAD_STR ",
|
||||
"LOAD_CODE LOAD_STR ",
|
||||
opname,
|
||||
)
|
||||
self.add_unique_rule(rule, opname, token.attr, customize)
|
||||
@@ -1186,13 +1186,13 @@ class Python3Parser(PythonParser):
|
||||
rule = "mkfunc ::= %s %s%s%s" % (
|
||||
kwargs,
|
||||
"pos_arg " * args_pos,
|
||||
"LOAD_CONST ",
|
||||
"LOAD_CODE ",
|
||||
opname,
|
||||
)
|
||||
self.add_unique_rule(rule, opname, token.attr, customize)
|
||||
rule = "mkfunc ::= %s%s%s" % (
|
||||
"pos_arg " * args_pos,
|
||||
"LOAD_CONST ",
|
||||
"LOAD_CODE ",
|
||||
opname,
|
||||
)
|
||||
elif self.version == 3.3:
|
||||
@@ -1200,7 +1200,7 @@ class Python3Parser(PythonParser):
|
||||
rule = "mkfunc ::= %s %s%s%s" % (
|
||||
kwargs,
|
||||
"pos_arg " * args_pos,
|
||||
"LOAD_CONST LOAD_STR ",
|
||||
"LOAD_CODE LOAD_STR ",
|
||||
opname,
|
||||
)
|
||||
elif self.version > 3.5:
|
||||
@@ -1208,7 +1208,7 @@ class Python3Parser(PythonParser):
|
||||
rule = "mkfunc ::= %s%s %s%s" % (
|
||||
"pos_arg " * args_pos,
|
||||
kwargs,
|
||||
"LOAD_CONST LOAD_STR ",
|
||||
"LOAD_CODE LOAD_STR ",
|
||||
opname,
|
||||
)
|
||||
elif self.version > 3.3:
|
||||
@@ -1216,7 +1216,7 @@ class Python3Parser(PythonParser):
|
||||
rule = "mkfunc ::= %s%s %s%s" % (
|
||||
"pos_arg " * args_pos,
|
||||
kwargs,
|
||||
"LOAD_CONST LOAD_STR ",
|
||||
"LOAD_CODE LOAD_STR ",
|
||||
opname,
|
||||
)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user