You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
disassemble -> ingest where appropriate
As part of tokenization for (de)parsing, we need to do something like a disassembly, but is is really a little different. Disassembly, strictly speaking, is done by the xdis module now. What "ingestion" does is massage the instruction tokens to a form that is more amenable for parsing. In sum, ingestion is different than disassembly, although disassembly is generally the first part of ingestion.
This commit is contained in:
@@ -18,7 +18,7 @@ want to run on Python 2.7.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os, sys
|
||||
import sys
|
||||
from collections import deque
|
||||
|
||||
import uncompyle6
|
||||
@@ -45,7 +45,7 @@ def disco(version, co, out=None, is_pypy=False):
|
||||
scanner = get_scanner(version, is_pypy=is_pypy)
|
||||
|
||||
queue = deque([co])
|
||||
disco_loop(scanner.disassemble, queue, real_out)
|
||||
disco_loop(scanner.ingest, queue, real_out)
|
||||
|
||||
|
||||
def disco_loop(disasm, queue, real_out):
|
||||
|
Reference in New Issue
Block a user