You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Small formating changes ...
and premonition of 2.6 byteocde work
This commit is contained in:
@@ -184,8 +184,10 @@ class Scanner2(scan.Scanner):
|
|||||||
elif op == self.opc.JA:
|
elif op == self.opc.JA:
|
||||||
target = self.get_target(offset)
|
target = self.get_target(offset)
|
||||||
if target < offset:
|
if target < offset:
|
||||||
if offset in self.stmts and self.code[offset+3] not in (self.opc.END_FINALLY, self.opc.POP_BLOCK) \
|
if (offset in self.stmts
|
||||||
and offset not in self.not_continue:
|
and self.code[offset+3] not in (self.opc.END_FINALLY,
|
||||||
|
self.opc.POP_BLOCK)
|
||||||
|
and offset not in self.not_continue):
|
||||||
opname = 'CONTINUE'
|
opname = 'CONTINUE'
|
||||||
else:
|
else:
|
||||||
opname = 'JUMP_BACK'
|
opname = 'JUMP_BACK'
|
||||||
@@ -366,7 +368,9 @@ class Scanner2(scan.Scanner):
|
|||||||
op = self.code[i]
|
op = self.code[i]
|
||||||
if op == self.opc.END_FINALLY:
|
if op == self.opc.END_FINALLY:
|
||||||
if count_END_FINALLY == count_SETUP_:
|
if count_END_FINALLY == count_SETUP_:
|
||||||
assert self.code[self.prev[i]] in (self.opc.JA, self.opc.JF, self.opc.RETURN_VALUE)
|
if self.version == 2.7:
|
||||||
|
assert self.code[self.prev[i]] in \
|
||||||
|
self.jump_forward | {self.opc.RETURN_VALUE}
|
||||||
self.not_continue.add(self.prev[i])
|
self.not_continue.add(self.prev[i])
|
||||||
return self.prev[i]
|
return self.prev[i]
|
||||||
count_END_FINALLY += 1
|
count_END_FINALLY += 1
|
||||||
|
Reference in New Issue
Block a user