You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Merge pull request #339 from bloerwald/parsers-fix_expr32_emitted_when_used_by_expr1024
parsers: parse2: fix: also emit expr32 if count perfectly divisible by 1024
This commit is contained in:
@@ -319,7 +319,7 @@ class Python2Parser(PythonParser):
|
|||||||
build_count = token.attr
|
build_count = token.attr
|
||||||
thousands = build_count // 1024
|
thousands = build_count // 1024
|
||||||
thirty32s = (build_count // 32) % 32
|
thirty32s = (build_count // 32) % 32
|
||||||
if thirty32s > 0:
|
if thirty32s > 0 or thousands > 0:
|
||||||
rule = "expr32 ::=%s" % (" expr" * 32)
|
rule = "expr32 ::=%s" % (" expr" * 32)
|
||||||
self.add_unique_rule(rule, opname_base, build_count, customize)
|
self.add_unique_rule(rule, opname_base, build_count, customize)
|
||||||
if thousands > 0:
|
if thousands > 0:
|
||||||
|
@@ -844,7 +844,7 @@ class Python3Parser(PythonParser):
|
|||||||
build_count = token.attr
|
build_count = token.attr
|
||||||
thousands = build_count // 1024
|
thousands = build_count // 1024
|
||||||
thirty32s = (build_count // 32) % 32
|
thirty32s = (build_count // 32) % 32
|
||||||
if thirty32s > 0:
|
if thirty32s > 0 or thousands > 0:
|
||||||
rule = "expr32 ::=%s" % (" expr" * 32)
|
rule = "expr32 ::=%s" % (" expr" * 32)
|
||||||
self.add_unique_rule(rule, opname_base, build_count, customize)
|
self.add_unique_rule(rule, opname_base, build_count, customize)
|
||||||
pass
|
pass
|
||||||
|
Reference in New Issue
Block a user