You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
2.6 and before COME_FROM handling...
also, add in some of the test bytecode from the python-2.4 branch
This commit is contained in:
@@ -1127,7 +1127,13 @@ class Scanner2(Scanner):
|
||||
source = self.setup_loops[label]
|
||||
else:
|
||||
source = offset
|
||||
targets[label] = targets.get(label, []) + [source]
|
||||
# FIXME: The grammar for 2.6 and before doesn't
|
||||
# handle COME_FROM's from a loop inside if's
|
||||
# It probably should.
|
||||
if (self.version > 2.6 or
|
||||
self.code[source] != self.opc.SETUP_LOOP or
|
||||
self.code[label] != self.opc.JUMP_FORWARD):
|
||||
targets[label] = targets.get(label, []) + [source]
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
|
Reference in New Issue
Block a user