David Srbecký
9387dadfc8
Fixed conditional loops
15 years ago
David Srbecký
0d522ba136
Fixed some missing gotos and labels
15 years ago
Daniel Grunwald
949e7c2378
Move decompiler code into ICSharpCode.Decompiler; add very simple integration with ILSpy.
15 years ago
David Srbecký
36f29f72e5
Moved everything into top-level directory
15 years ago
David Srbecký
69753642eb
Support for try-catch blocks
15 years ago
David Srbecký
eed0f0af6c
Refactoring the data model
15 years ago
David Srbecký
edc9e53590
Stack analysis for methods that include exception handlers
15 years ago
David Srbecký
4beea5c6a1
Completely rewritten ByteCodeExpressions.
...
It is now new representation of the code - that is, an extra stage in the decompilation process.
It is independent of the previous representation and thus it can be much more easily transformed.
15 years ago
David Srbecký
9f4dc8611d
Rename StackExpression to ByteCodeExpression
15 years ago
David Srbecký
459742f3ca
Simplify short-circuit branches ("a && b" or "a || b").
...
Two new node types were created for this: SimpleBranch and ShortCircuitBranch.
The short-circuit branches are found by pattern finding - single short-circuit branch forms a specific triangular pattern in the control flow graph. Nested short-circuit branches are found by doing this node reduction repeatedly.
15 years ago
David Srbecký
7abcfaa3ed
Conditional jumps now alone in basic block so that they can be expressed as single bool expression.
15 years ago
David Srbecký
45bedc8d1d
Try to reconstruct if statements. The following logic is used: Depending on the value of the condition, the control flow will branch to one of two locations - let's call then 'true entry' and 'false entry'. Nodes reachable *only* from the 'true entry' are assumed to be the 'true' body of the if statement. Similarly, nodes reachable only from the 'false entry' are the 'false' body. Nodes reachable from both 'true entry' and 'false entry' and not part of the if statement and are placed after it.
15 years ago
David Srbecký
356c0b0d2f
Completely rewritten the Node tree structure. It became increasingly difficult to maintain the node links (Predecessors, Successors) consistent during transformations. So rather then keeping them consistent I have implemented an algorithm that can calculate the Predecessors or Successors for any given node. There are a few caches on the way so that the calculation does not calculate everything again every time. Affected caches are automatically flushed when a tree structure changes. This is implemented using 'collection with events'.
15 years ago
David Srbecký
dda481d0fe
Maintain node links at all levels, not just at the top one.
15 years ago
David Srbecký
7df6c364c6
Non-conditional branch does not have 'fall-through' node as successor.
...
Add explicit 'goto' statement after each basic black.
More GUI debugging options.
15 years ago
David Srbecký
b310187433
GUI debugging controls
15 years ago
David Srbecký
693bb16488
Generate the initial graph.
...
Output the graph as nested blocks.
15 years ago
David Srbecký
0bff44d922
Create class for each node type
15 years ago