PyPy 3.2 bug confusing RETURN_END_IF for except

Also fix a instruction formatting bug
This commit is contained in:
rocky
2016-07-28 00:40:01 -04:00
parent ac121076e6
commit 5c9c0228ee
3 changed files with 7 additions and 2 deletions

View File

@@ -735,6 +735,10 @@ class Scanner3(scan.Scanner):
self.structs.append({'type': 'if-then',
'start': start,
'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])
elif op in self.jump_if_pop: