You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Get ready for release 2.9.0 ...
- Use xdis 3.0.0 protocol load_module. Needs bump in requirements.txt and _pkg_info_.py - Start Python 1.5 decompiling - another round of work is needed to remove bugs - small cleanups
This commit is contained in:
@@ -410,7 +410,7 @@ class Scanner2(scan.Scanner):
|
||||
j = self.prev[s]
|
||||
while code[j] in self.designator_ops:
|
||||
j = self.prev[j]
|
||||
if code[j] == self.opc.FOR_ITER:
|
||||
if self.version >= 2.1 and code[j] == self.opc.FOR_ITER:
|
||||
stmts.remove(s)
|
||||
continue
|
||||
last_stmt = s
|
||||
@@ -564,7 +564,8 @@ class Scanner2(scan.Scanner):
|
||||
|
||||
target = self.get_target(jump_back, self.opc.JUMP_ABSOLUTE)
|
||||
|
||||
if code[target] in (self.opc.FOR_ITER, self.opc.GET_ITER):
|
||||
if (self.version >= 2.0 and
|
||||
code[target] in (self.opc.FOR_ITER, self.opc.GET_ITER)):
|
||||
loop_type = 'for'
|
||||
else:
|
||||
loop_type = 'while'
|
||||
@@ -837,7 +838,8 @@ class Scanner2(scan.Scanner):
|
||||
oparg = self.get_argument(offset)
|
||||
|
||||
if label is None:
|
||||
if op in self.opc.hasjrel and op != self.opc.FOR_ITER:
|
||||
if (op in self.opc.hasjrel and
|
||||
(self.version < 2.0 or op != self.opc.FOR_ITER)):
|
||||
label = offset + 3 + oparg
|
||||
elif self.version == 2.7 and op in self.opc.hasjabs:
|
||||
if op in (self.opc.JUMP_IF_FALSE_OR_POP,
|
||||
|
Reference in New Issue
Block a user