diff --git a/__pkginfo__.py b/__pkginfo__.py index 0b8d19f0..926835af 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -51,7 +51,7 @@ ] } ftp_url = None -install_requires = ["click", "spark-parser >= 1.8.9, < 1.9.0", "xdis > 6.0.4,<6.2.0"] +install_requires = ["click", "spark-parser >= 1.8.9, < 1.9.0", "xdis >= 6.1.1,<6.2.0"] license = "GPL3" mailing_list = "python-debugger@googlegroups.com" diff --git a/decompyle3/parsers/reduce_check/ifstmt.py b/decompyle3/parsers/reduce_check/ifstmt.py index e228274c..8d637df6 100644 --- a/decompyle3/parsers/reduce_check/ifstmt.py +++ b/decompyle3/parsers/reduce_check/ifstmt.py @@ -123,6 +123,8 @@ def ifstmt( return True pass + print("XXX", self) + print("XXX1", dir(self)) endif_inst_index = self.offset2inst_index[ltm1.off2int(prefer_last=False)] # FIXME: RAISE_VARARGS is an instance of a no-follow instruction. diff --git a/decompyle3/scanners/scanner37base.py b/decompyle3/scanners/scanner37base.py index 7fdaa35c..a4706803 100644 --- a/decompyle3/scanners/scanner37base.py +++ b/decompyle3/scanners/scanner37base.py @@ -302,7 +302,7 @@ def tokens_append(j, token): if show_asm in ("both", "before"): print("\n# ---- disassembly:") - self.insts = bytecode.disassemble_bytes( + bytecode.disassemble_bytes( co.co_code, varnames=co.co_varnames, names=co.co_names, @@ -613,7 +613,6 @@ def tokens_append(j, token): # return # break # A "continue" but not the innermost one - # CONTINUE as well. if tokens[-1].kind == "JUMP_LOOP" and tokens[-1].attr <= argval: if tokens[-2].kind == "BREAK_LOOP": del tokens[-1] @@ -687,9 +686,10 @@ def tokens_append(j, token): pass - if show_asm in ("both", "after"): + if show_asm in ("both", "after") and self.version < (3, 8): print("\n# ---- tokenization:") - for t in tokens: + # FIXME: t.format() is changing tokens! + for t in tokens.copy(): print(t.format(line_prefix="")) print() return tokens, customize diff --git a/decompyle3/scanners/scanner38.py b/decompyle3/scanners/scanner38.py index 56444f53..cf626b99 100644 --- a/decompyle3/scanners/scanner38.py +++ b/decompyle3/scanners/scanner38.py @@ -167,6 +167,14 @@ def ingest( pass pass new_tokens.append(token) + + if show_asm in ("both", "after"): + print("\n# ---- tokenization:") + # FIXME: t.format() is changing tokens! + for t in new_tokens.copy(): + print(t.format(line_prefix="")) + print() + return new_tokens, customize