Skip to content

Commit

Permalink
Bump min xdis version
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Jul 21, 2024
1 parent cf3f7c3 commit c3c9f97
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion __pkginfo__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions decompyle3/parsers/reduce_check/ifstmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions decompyle3/scanners/scanner37base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions decompyle3/scanners/scanner38.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit c3c9f97

Please sign in to comment.