Improve Python 1.x decompiling

Still has bugs, but is much better.
This commit is contained in:
rocky
2022-04-30 05:00:49 -04:00
parent 5e1ba2baa1
commit eba0d37d0f
10 changed files with 267 additions and 24 deletions

View File

@@ -428,6 +428,7 @@ class Python26Parser(Python2Parser):
# since the operand can be a relative offset rather than
# an absolute offset.
setup_inst = self.insts[self.offset2inst_index[tokens[first].offset]]
last = min(len(tokens)-1, last)
if self.version <= (2, 2) and tokens[last] == "COME_FROM":
last += 1
return tokens[last-1].off2int() > setup_inst.argval