You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Tidy assembly output a little more
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
|
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||||
# Copyright (c) 1999 John Aycock
|
# Copyright (c) 1999 John Aycock
|
||||||
|
|
||||||
import sys
|
import re, sys
|
||||||
from uncompyle6 import PYTHON3
|
from uncompyle6 import PYTHON3
|
||||||
|
|
||||||
if PYTHON3:
|
if PYTHON3:
|
||||||
@@ -71,8 +71,10 @@ class Token:
|
|||||||
elif self.op in self.opc.hascompare:
|
elif self.op in self.opc.hascompare:
|
||||||
if isinstance(self.attr, int):
|
if isinstance(self.attr, int):
|
||||||
pattr = self.opc.cmp_op[self.attr]
|
pattr = self.opc.cmp_op[self.attr]
|
||||||
# And so on. See xdis/bytecode.py get_instructions_bytes
|
# And so on. See xdis/bytecode.py get_instructions_bytes
|
||||||
pass
|
pass
|
||||||
|
elif re.search('_\d+$', self.type):
|
||||||
|
return "%s%s%s" % (prefix, offset_opname, argstr)
|
||||||
else:
|
else:
|
||||||
pattr = ''
|
pattr = ''
|
||||||
return "%s%s%s %r" % (prefix, offset_opname, argstr, pattr)
|
return "%s%s%s %r" % (prefix, offset_opname, argstr, pattr)
|
||||||
|
Reference in New Issue
Block a user