Jennifer Taylor
5761474bec
Enforce another invariant for dominator calculation that would have caught another hard-to-find bug.
2021-04-26 01:24:25 +00:00
Jennifer Taylor
a09ad70de5
Improve a lot of exception message, enforce several more invariants in
...
graph generation that would have caught previous bugs, fix possible
issue with loop/dominator code if the entry code chunk was the beginning
of a loop.
2021-04-26 01:23:54 +00:00
Jennifer Taylor
44f5e5cdcc
Fix control flow graph splitting function to handle functions that jump to the end offset as a way of exiting early.
2021-04-26 01:23:08 +00:00
Jennifer Taylor
6323ef9adf
Implment several more opcodes in actual decompilation step.
2021-04-26 01:22:39 +00:00
Jennifer Taylor
6052deed3c
Refactor code generation step to allow for nested function definitions, actually hook those up.
2021-04-26 01:22:14 +00:00
Jennifer Taylor
3a9b3a7b3c
Pass indentation context into expression rendering for upcoming function definition support.
2021-04-26 01:21:42 +00:00
Jennifer Taylor
51e27c0cff
Enhance goto eliminiation to remove all unneeded gotos.
2021-04-24 19:37:14 +00:00
Jennifer Taylor
964d6f082c
Clean up types on If statement, stop using strings to pass information.
2021-04-24 19:36:58 +00:00
Jennifer Taylor
534ab20f98
Add dead code eliminiation so dominators doesn't fail. Fix a tricky jump case with if statements.
2021-04-24 18:13:07 +00:00
Jennifer Taylor
de84379ad0
Implement a lot more opcodes for expressions, fix an if conditional, improve while display.
2021-04-24 18:11:20 +00:00
Jennifer Taylor
cc27d2418e
Fix register display on assignment, add a few optimizing passes to clean up code.
2021-04-24 18:10:27 +00:00
Jennifer Taylor
f1aea996c4
Handle if-goto pattern that I previously neglected.
2021-04-24 18:09:44 +00:00
Jennifer Taylor
6221d0273b
Overhauled statement eval system so we always get back a list of statements.
2021-04-24 18:08:04 +00:00
Jennifer Taylor
b0778e1110
Convert expression rendering to an explicit function so we can retain __repr__ for debugging.
2021-04-24 18:07:01 +00:00
Jennifer Taylor
f2761b90b0
Restructure a lot of types to fit an expression/statement model and making a lot of stuff make more sense.
2021-04-24 18:05:58 +00:00
Jennifer Taylor
19c6de1fcc
Actually decompile basic bytecode. There's much left to do, but some basics work!
2021-04-24 18:05:03 +00:00
Jennifer Taylor
aebc277b62
Add a graph walker at the very end to verify that we've handled all control paths correctly, fix an edge case in If detection.
2021-04-24 18:03:24 +00:00
Jennifer Taylor
6aa04b0c1b
Implement recursive if detection.
2021-04-24 18:02:26 +00:00
Jennifer Taylor
6e34d2647e
Implement loop break/continue/goto processing.
2021-04-24 18:01:25 +00:00
Jennifer Taylor
738fce36c9
Lots more implementation done on decompiler, including better control flow and loop detection.
2021-04-24 18:00:13 +00:00
Jennifer Taylor
b77ccdd5b9
Beginning of an AFP ByteCode decompiler, starting with a massive code reorg and a control flow graph analyzer.
2021-04-24 17:59:36 +00:00