You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
I said 3.4 compatibility!
This commit is contained in:
@@ -68,14 +68,15 @@ class Scanner38(Scanner37):
|
|||||||
if offset == next_end:
|
if offset == next_end:
|
||||||
loop_ends.pop()
|
loop_ends.pop()
|
||||||
if self.debug:
|
if self.debug:
|
||||||
print(f"{' ' * len(loop_ends)}remove loop offset {offset}")
|
print("%sremove loop offset %s" % (" " * len(loop_ends), offset))
|
||||||
pass
|
pass
|
||||||
next_end = loop_ends[-1] if len(loop_ends) else tokens[len(tokens)-1].off2int() + 10
|
next_end = loop_ends[-1] if len(loop_ends) else tokens[len(tokens)-1].off2int() + 10
|
||||||
|
|
||||||
if offset in jump_back_targets:
|
if offset in jump_back_targets:
|
||||||
next_end = off2int(jump_back_targets[offset], prefer_last=False)
|
next_end = off2int(jump_back_targets[offset], prefer_last=False)
|
||||||
if self.debug:
|
if self.debug:
|
||||||
print(f"{' ' * len(loop_ends)}adding loop offset {offset} ending at {next_end}")
|
print("%sadding loop offset %s ending at %s" %
|
||||||
|
(' ' * len(loop_ends), offset, next_end))
|
||||||
loop_ends.append(next_end)
|
loop_ends.append(next_end)
|
||||||
|
|
||||||
# Turn JUMP opcodes into "BREAK_LOOP" opcodes.
|
# Turn JUMP opcodes into "BREAK_LOOP" opcodes.
|
||||||
|
Reference in New Issue
Block a user