You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Continue parse2/scanner2 refactor
This commit is contained in:
@@ -250,23 +250,23 @@ class Python2Parser(PythonParser):
|
||||
JUMP_BACK
|
||||
""", nop_func)
|
||||
|
||||
# # For a rough break out on the first word. This may
|
||||
# # include instructions that don't need customization,
|
||||
# # but we'll do a finer check after the rough breakout.
|
||||
# customize_instruction_basenames = frozenset(
|
||||
# ('BUILD', 'CALL', 'CONTINUE',
|
||||
# 'DELETE', 'DUP', 'EXEC', 'JUMP',
|
||||
# 'LOAD', 'LOOKUP', 'MAKE', 'SETUP',
|
||||
# 'RAISE', 'UNPACK'))
|
||||
# For a rough break out on the first word. This may
|
||||
# include instructions that don't need customization,
|
||||
# but we'll do a finer check after the rough breakout.
|
||||
customize_instruction_basenames = frozenset(
|
||||
('BUILD', 'CALL', 'CONTINUE',
|
||||
'DELETE', 'DUP', 'EXEC', 'JUMP',
|
||||
'LOAD', 'LOOKUP', 'MAKE', 'SETUP',
|
||||
'RAISE', 'UNPACK'))
|
||||
|
||||
for i, token in enumerate(tokens):
|
||||
opname = token.kind
|
||||
|
||||
# FIXME
|
||||
# if (opname[:opname.find('_')]
|
||||
# not in customize_instruction_basenames):
|
||||
if (opname[:opname.find('_')]
|
||||
not in customize_instruction_basenames):
|
||||
|
||||
if opname not in customize:
|
||||
# if opname not in customize:
|
||||
continue
|
||||
|
||||
opname_base = opname[:opname.rfind('_')]
|
||||
|
Reference in New Issue
Block a user