You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Allow PyPy 2.7 opcodes and magic and ...
disas.py: * more aggressive code checking magics.py: * Add PYPY magic opcodes_27.py: * Add PYPY opcodes
This commit is contained in:
2
NEWS
2
NEWS
@@ -1,4 +1,4 @@
|
||||
uncompyle6 2.4.0 2016-05-18
|
||||
uncompyle6 2.4.0 2016-05-18 (in memory of Lewis Bernstein)
|
||||
|
||||
- Many Python 3 bugs fixed:
|
||||
* Python 3.2 to 3.5 libaries largely
|
||||
|
@@ -61,6 +61,8 @@ def disco_loop(disasm, queue, real_out, use_uncompyle6_format):
|
||||
for t in tokens:
|
||||
if iscode(t.pattr):
|
||||
queue.append(t.pattr)
|
||||
elif iscode(t.attr):
|
||||
queue.append(t.attr)
|
||||
print(t.format(), file=real_out)
|
||||
pass
|
||||
pass
|
||||
|
@@ -53,6 +53,7 @@ versions = {
|
||||
__build_magic(62191): '2.7', # 2.7a0 (introduce SETUP_WITH)
|
||||
__build_magic(62201): '2.7', # 2.7a0 (introduce BUILD_SET)
|
||||
__build_magic(62211): '2.7', # 2.7a0 (introduce MAP_ADD and SET_ADD)
|
||||
__build_magic(62218): '2.7', # 2.7 pypy?
|
||||
__build_magic(3000): '3.0', # 3.000
|
||||
__build_magic(3010): '3.0', # 3.000 (removed UNARY_CONVERT)
|
||||
__build_magic(3020): '3.0', # 3.000 (added BUILD_SET)
|
||||
|
@@ -202,12 +202,12 @@ EXTENDED_ARG = 145
|
||||
def_op('SET_ADD', 146)
|
||||
def_op('MAP_ADD', 147)
|
||||
|
||||
from uncompyle6 import IS_PYPY
|
||||
if IS_PYPY:
|
||||
def_op('LOOKUP_METHOD', 201)
|
||||
def_op('CALL_METHOD', 202)
|
||||
def_op('BUILD_LIST_FROM_ARG', 203)
|
||||
def_op('JUMP_IF_NOT_DEBUG', 204)
|
||||
# PyPy magic opcodes
|
||||
# FIXME: see if we can conditionally add them
|
||||
def_op('LOOKUP_METHOD', 201)
|
||||
def_op('CALL_METHOD', 202)
|
||||
def_op('BUILD_LIST_FROM_ARG', 203)
|
||||
def_op('JUMP_IF_NOT_DEBUG', 204)
|
||||
|
||||
updateGlobal()
|
||||
del def_op, name_op, jrel_op, jabs_op
|
||||
|
Reference in New Issue
Block a user