You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Show line numbers in 2.6 "after" asm ..
start to understand some of the Python 2.6 bytecode parse failures.
This commit is contained in:
@@ -877,8 +877,13 @@ class Scanner2(scan.Scanner):
|
||||
and ((self.code[offset+3] == self.opc.END_FINALLY)
|
||||
or (self.code[offset+3] == self.opc.POP_TOP
|
||||
and self.code[offset+4] == self.opc.END_FINALLY))):
|
||||
|
||||
# FIXME: rocky: I think we need something like this...
|
||||
# if offset not in set(self.ignore_if):
|
||||
# targets[label] = targets.get(label, []) + [offset]
|
||||
targets[label] = targets.get(label, []) + [offset]
|
||||
pass
|
||||
|
||||
pass
|
||||
pass
|
||||
elif op == self.opc.END_FINALLY and offset in self.fixed_jumps and self.version == 2.7:
|
||||
|
@@ -279,9 +279,9 @@ class Scanner26(scan.Scanner2):
|
||||
pass
|
||||
pass
|
||||
|
||||
if show_asm:
|
||||
if show_asm in ('both', 'after'):
|
||||
for t in tokens:
|
||||
print(t)
|
||||
print(t.format(line_prefix='L.'))
|
||||
print()
|
||||
return tokens, customize
|
||||
|
||||
|
Reference in New Issue
Block a user