You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
In verify, JUMP_BACK is the same as CONTINUE...
at least for now. See FIXME in verify
This commit is contained in:
@@ -308,6 +308,11 @@ def cmp_code_objects(version, is_pypy, code_obj1, code_obj2,
|
|||||||
and int(tokens1[i1].offset) not in targets1:
|
and int(tokens1[i1].offset) not in targets1:
|
||||||
i1 += 1
|
i1 += 1
|
||||||
continue
|
continue
|
||||||
|
elif tokens1[i1].kind == 'JUMP_BACK' and tokens2[i2].kind == 'CONTINUE':
|
||||||
|
# FIXME: should make sure that offset is inside loop, not outside of it
|
||||||
|
i1 += 2
|
||||||
|
i2 += 2
|
||||||
|
continue
|
||||||
elif tokens1[i1].kind == 'JUMP_FORWARD' and tokens2[i2].kind == 'JUMP_BACK' \
|
elif tokens1[i1].kind == 'JUMP_FORWARD' and tokens2[i2].kind == 'JUMP_BACK' \
|
||||||
and tokens1[i1+1].kind == 'JUMP_BACK' and tokens2[i2+1].kind == 'JUMP_BACK' \
|
and tokens1[i1+1].kind == 'JUMP_BACK' and tokens2[i2+1].kind == 'JUMP_BACK' \
|
||||||
and int(tokens1[i1].pattr) == int(tokens1[i1].offset) + 3:
|
and int(tokens1[i1].pattr) == int(tokens1[i1].offset) + 3:
|
||||||
|
Reference in New Issue
Block a user