You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
PyPy support
* Use proper PYPY 32 opcodes * handle opcodes LOOKUP_METHOD and CALL_METHOD * Administrative stuff for PyPy
This commit is contained in:
@@ -1802,13 +1802,18 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
|
||||
def customize(self, customize):
|
||||
"""
|
||||
Special handling for opcodes that take a variable number
|
||||
Special handling for opcodes, such as those that take a variable number
|
||||
of arguments -- we add a new entry for each in TABLE_R.
|
||||
"""
|
||||
for k, v in list(customize.items()):
|
||||
if k in TABLE_R:
|
||||
continue
|
||||
op = k[ :k.rfind('_') ]
|
||||
|
||||
if k == 'CALL_METHOD':
|
||||
# This happens in PyPy only
|
||||
TABLE_R[k] = ('%c(%P)', 0, (1, -1, ', ', 100))
|
||||
|
||||
if op == 'CALL_FUNCTION':
|
||||
TABLE_R[k] = ('%c(%P)', 0, (1, -1, ', ', 100))
|
||||
elif op in ('CALL_FUNCTION_VAR',
|
||||
|
Reference in New Issue
Block a user