You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
PyPy 3.2 bug confusing RETURN_END_IF for except
Also fix a instruction formatting bug
This commit is contained in:
@@ -735,6 +735,10 @@ class Scanner3(scan.Scanner):
|
|||||||
self.structs.append({'type': 'if-then',
|
self.structs.append({'type': 'if-then',
|
||||||
'start': start,
|
'start': start,
|
||||||
'end': rtarget})
|
'end': rtarget})
|
||||||
|
jump_prev = prev_op[offset]
|
||||||
|
if self.is_pypy and code[jump_prev] == self.opc.COMPARE_OP:
|
||||||
|
if self.opc.cmp_op[code[jump_prev+1]] == 'exception match':
|
||||||
|
return
|
||||||
self.return_end_ifs.add(prev_op[rtarget])
|
self.return_end_ifs.add(prev_op[rtarget])
|
||||||
|
|
||||||
elif op in self.jump_if_pop:
|
elif op in self.jump_if_pop:
|
||||||
|
@@ -69,8 +69,9 @@ class Token:
|
|||||||
pattr = "to " + str(self.pattr)
|
pattr = "to " + str(self.pattr)
|
||||||
pass
|
pass
|
||||||
elif self.op in self.opc.hascompare:
|
elif self.op in self.opc.hascompare:
|
||||||
pattr = self.opc.cmp_op[self.attr]
|
if isinstance(self.attr, int):
|
||||||
# And so on. See xdis/bytecode.py get_instructions_bytes
|
pattr = self.opc.cmp_op[self.attr]
|
||||||
|
# And so on. See xdis/bytecode.py get_instructions_bytes
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
pattr = ''
|
pattr = ''
|
||||||
|
Reference in New Issue
Block a user