mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2024-11-23 05:00:07 +00:00
Fix some 2.6 bytecode bugs
scanner26: disassemble interface has changed make_function2: was missing ParserError2 import
This commit is contained in:
parent
3c6e378cc4
commit
b0b67e9f34
@ -81,9 +81,15 @@ class Scanner26(scan.Scanner2):
|
||||
# show_asm = 'after'
|
||||
if show_asm in ("both", "before"):
|
||||
print("\n# ---- disassembly:")
|
||||
for instr in bytecode.get_instructions(co):
|
||||
print(instr.disassemble(self.opc))
|
||||
|
||||
bytecode.disassemble_bytes(
|
||||
co.co_code,
|
||||
varnames=co.co_varnames,
|
||||
names=co.co_names,
|
||||
constants=co.co_consts,
|
||||
cells=bytecode._cell_names,
|
||||
line_starts=bytecode._linestarts,
|
||||
asm_format="extended",
|
||||
)
|
||||
# Container for tokens
|
||||
tokens = []
|
||||
|
||||
|
@ -22,6 +22,7 @@ from itertools import zip_longest
|
||||
|
||||
from xdis import code_has_star_arg, code_has_star_star_arg, iscode
|
||||
|
||||
from uncompyle6.parser import ParserError as ParserError2
|
||||
from uncompyle6.scanner import Code
|
||||
from uncompyle6.semantics.helper import (
|
||||
find_all_globals,
|
||||
|
Loading…
Reference in New Issue
Block a user