You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Was missing some 3.7 and 3.7 semantic actions...
Possibly some as a result of the last refactor?
This commit is contained in:
BIN
test/bytecode_3.7/04_call_function.pyc
Normal file
BIN
test/bytecode_3.7/04_call_function.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.8/04_call_function.pyc
Normal file
BIN
test/bytecode_3.8/04_call_function.pyc
Normal file
Binary file not shown.
@@ -24,13 +24,14 @@ scanner routine for Python 3.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from uncompyle6.scanners.scanner36 import Scanner36
|
||||
from uncompyle6.scanners.scanner3 import Scanner3
|
||||
|
||||
# bytecode verification, verify(), uses JUMP_OPs from here
|
||||
from xdis.opcodes import opcode_37 as opc
|
||||
JUMP_OPs = opc.JUMP_OPS
|
||||
|
||||
class Scanner37(Scanner3):
|
||||
class Scanner37(Scanner36):
|
||||
|
||||
def __init__(self, show_asm=None):
|
||||
Scanner3.__init__(self, 3.7, show_asm)
|
||||
|
@@ -24,13 +24,14 @@ scanner routine for Python 3.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from uncompyle6.scanners.scanner37 import Scanner37
|
||||
from uncompyle6.scanners.scanner3 import Scanner3
|
||||
|
||||
# bytecode verification, verify(), uses JUMP_OPs from here
|
||||
from xdis.opcodes import opcode_38 as opc
|
||||
JUMP_OPs = opc.JUMP_OPS
|
||||
|
||||
class Scanner38(Scanner3):
|
||||
class Scanner38(Scanner37):
|
||||
|
||||
def __init__(self, show_asm=None):
|
||||
Scanner3.__init__(self, 3.8, show_asm)
|
||||
|
@@ -27,8 +27,10 @@ from uncompyle6.semantics.customize38 import customize_for_version38
|
||||
|
||||
def customize_for_version3(self, version):
|
||||
TABLE_DIRECT.update({
|
||||
'except_cond2': ( '%|except %c as %c:\n', 1, 5 ),
|
||||
'function_def_annotate': ( '\n\n%|def %c%c\n', -1, 0),
|
||||
'store_locals': ( '%|# inspect.currentframe().f_locals = __locals__\n', ),
|
||||
'withstmt': ( '%|with %c:\n%+%c%-', 0, 3),
|
||||
})
|
||||
|
||||
assert version >= 3.0
|
||||
|
@@ -46,8 +46,12 @@ def customize_for_version38(self, version):
|
||||
(0, 'expr'), (6, 'store'),
|
||||
(7, 'suite_stmts') ),
|
||||
|
||||
'except_handler38': (
|
||||
'%c', (2, 'except_stmts') ),
|
||||
|
||||
'except_handler38a': (
|
||||
'%c', (-2, 'stmts') ),
|
||||
|
||||
'except_ret38a': (
|
||||
'return %c', (4, 'expr') ),
|
||||
'except_ret38': ( '%|return %c\n', (1, 'expr') ),
|
||||
|
@@ -1825,7 +1825,6 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
# print(startnode)
|
||||
# print(entry[0])
|
||||
# print('======')
|
||||
|
||||
fmt = entry[0]
|
||||
arg = 1
|
||||
i = 0
|
||||
|
Reference in New Issue
Block a user