Daniel Grunwald
949e7c2378
Move decompiler code into ICSharpCode.Decompiler; add very simple integration with ILSpy.
15 years ago
Daniel Grunwald
6cadb0d669
Merge branch 'master' of github.com:icsharpcode/ILSpy
15 years ago
David Srbecký
56cbecb00b
Import of decompiler
15 years ago
David Srbecký
36f29f72e5
Moved everything into top-level directory
15 years ago
David Srbecký
1fb4685f86
Moved dissertation files
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ý
44e1258b5f
Updated decompiler to the new Cecil
15 years ago
David Srbecký
8ff03b14bd
Updated Cecil
15 years ago
David Srbecký
89c39bbb66
Show open dialog so that the executable to decompile can be chosen
17 years ago
David Srbecký
2eff4f0443
Dissertation
18 years ago
David Srbecký
a26fd6c0b2
Decompiling class 'ReversiForm'.
Initial support for the switch bytecode
18 years ago
David Srbecký
edc9e53590
Stack analysis for methods that include exception handlers
18 years ago
David Srbecký
7b93f5762b
Constructors of multidimensional arrays.
Typing for setting an element of multidimensional array.
18 years ago
David Srbecký
b89018a214
Added class constructors
18 years ago
David Srbecký
5adc88672a
Use the new representation to handle 'dup' instruction better.
The outputted code is now just 'count++;'. This access to field previously involved a temporary variable.
18 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.
18 years ago
David Srbecký
9f4dc8611d
Rename StackExpression to ByteCodeExpression
18 years ago
David Srbecký
8d22eb6b25
Include casting in precedence list
18 years ago
David Srbecký
22aa769433
Draft 1 of progress report is the final version
18 years ago
David Srbecký
f5a3052d23
generate code for dup
18 years ago
David Srbecký
15e2cd828a
Rename unknown bool variables to "flag".
18 years ago
David Srbecký
a87a9468e7
Track the type of expression.
Zero and One are tracked as special types so that they can be substituted with 'true' or 'false'.
18 years ago
David Srbecký
e252a7d1f2
Format of output: Joint bodies of if statement with single-line "} else {"
18 years ago
David Srbecký
9d1705486d
Generate property getters and setters.
Insert empty lines between generated methods.
18 years ago
David Srbecký
c3aedb0b3c
Preliminary support for multi-dimensional arrays
18 years ago
David Srbecký
bacab7a00b
Idioms "i++" and "i += k"
18 years ago
David Srbecký
3f268ec44f
ldsfld
stsfld
18 years ago
David Srbecký
059e91cdd9
Do not include explicit reference to 'this'
18 years ago
David Srbecký
10a96cf79f
Include member reference and method invocation in precedence list.
18 years ago
David Srbecký
a284dd920d
Remove parenthesis from: condition, assignment, variable definition
18 years ago
David Srbecký
109d3f8649
Remove parenthesis that are not needed due to C# left associativity.
18 years ago
David Srbecký
704a8c769e
Remove some parenthesis that are not needed due to C# operator precedence.
18 years ago
David Srbecký
0d3dd5de44
Apply the negation reduction twice.
Also handle expressions in from "!!a"
18 years ago
David Srbecký
f1c1d34cba
Simplify expressions by pushing negations inside.
Includes application of De Morgan's laws.
18 years ago
David Srbecký
dacfade7df
Remove parenthesis from primitive value, identifies and expression statements.
18 years ago
David Srbecký
6faf690899
Parenthesize all expression to ensure correctness.
18 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.
18 years ago
David Srbecký
7abcfaa3ed
Conditional jumps now alone in basic block so that they can be expressed as single bool expression.
18 years ago
David Srbecký
cefcba99d1
When conditional does not have any common reachable nodes, create only 'true' body. 'False' body is then implicitly the code after the conditional.
18 years ago
David Srbecký
a455a6be02
Increased the reduction max count to 10000
18 years ago
David Srbecký
5b997bd44d
Splitted the next statement finding algorithm to several reusable parts.
18 years ago
David Srbecký
110defad02
The next statement for the end of loop is start of loop
18 years ago
David Srbecký
ba59de34fb
When looking what follows a 'goto' statement, exit and enter code blocks.
This simplifies code like:
if (p) {
Code();
goto Label; // This goto is redundant
}
for(;;) {
Label:
Code();
}
18 years ago
David Srbecký
e6269f491b
Moved jump reduction to the Ast transform phase
18 years ago
David Srbecký
3643debd61
The Target of decompilation is now Board. It has plenty of nested 'for' loops and 'if's.
18 years ago
David Srbecký
eaa7a63343
castclass
18 years ago
David Srbecký
3ca49743ae
ldtoken
18 years ago
David Srbecký
49eeb49d1b
newobj
18 years ago
David Srbecký
6e7f51fad7
Property access. (Detect properties by naming convention; still needs to be done properly)
18 years ago