Siegfried Pammer
f8b27066a1
Remove ILInstructionExtensions.cs
8 years ago
Daniel Grunwald
102729cfde
Put switch instructions into their own BlockContainer.
This removes the need for "goto case" in the ILAst as we can just branch to the appropriate block.
It also means we can support "break;" within switch using the "leave" instruction (otherwise we'd have to introduce yet another special kind of jump).
8 years ago
Daniel Grunwald
8a68a94d35
Simplify use of SwitchInstruction in ILAst
* the default case is now handled as a normal case
* when dealing with basic blocks, SwitchInstruction will be the last instruction in the block
* introduced ILAst instruction for 'goto case'
8 years ago
Siegfried Pammer
2d2ca893e9
ConditionDetection: Remove empty else-branches.
8 years ago
Daniel Grunwald
39bb6856b7
Fix various bugs with compound assignments.
8 years ago
Daniel Grunwald
919219524b
Eliminate the dedicated logic.not instruction, and treat it as syntax sugar similar to logic.and/logic.or.
'logic.not(arg)' is now represented using 'comp(arg == ldc.i4 0)'.
8 years ago
Daniel Grunwald
259e322e26
Fix typo in IsBranchOrLeave()
8 years ago
Daniel Grunwald
513a01e4dd
Ignore non-void leave in ConditionDetection.
This fixes a slight regression in control flow prettyness introduced in 206cdecf30
8 years ago
Daniel Grunwald
69c77d75a5
Try to get rid of some more gotos.
8 years ago
Daniel Grunwald
cc33c27d9c
ConditionDetection: Try to prefer 'break;' over other gotos
8 years ago
Daniel Grunwald
fe84ea9730
WIP: yield return decompiler
9 years ago
Daniel Grunwald
e871f7c05a
Convert LoopDetection into a block transform.
9 years ago
Daniel Grunwald
ed3d4aba9d
Run IntroduceExitPoints before loop detection, and let loop detection introduce its own exit points.
Warning: this commit creates broken branches that enter blocks.
9 years ago
Siegfried Pammer
840ec04fde
Namespace adjustments for Syntax classes
9 years ago
Christoph Wille
1ce8349dd9
Adjust namespaces
9 years ago
Daniel Grunwald
7273fe58fd
Add BlockTransform concept and apply a bunch of refactoring essentials suggestions.
9 years ago
Daniel Grunwald
dfe70d5366
Improve detection of short-circuiting operators.
9 years ago
Daniel Grunwald
dd485b971d
Eliminate goto in conditional return in try block.
9 years ago
Daniel Grunwald
5150cdce25
Improve handling of short-circuiting operators.
9 years ago
Daniel Grunwald
15b776faa2
Initial attempt at short-circuiting if conditions
9 years ago
Daniel Grunwald
0fade5cb0f
Add single-stepping support to some ILAst transforms.
9 years ago
Daniel Grunwald
11bb3060a7
Try a bit harder to find an exitInst for switch-case.
9 years ago
Daniel Grunwald
a6fc52a63f
ConditionDetection: move blocks into switch sections
9 years ago
Daniel Grunwald
0e118f0977
LoopDetection: in loops without any exit points, exclude the largest possible code block from the loop
9 years ago
Daniel Grunwald
449bbe2043
Move transforms to transforms namespace
9 years ago
Daniel Grunwald
7e50076671
Introduce array.to.pointer instruction.
This is necessary to construct pinned regions in all cases.
9 years ago
Daniel Grunwald
288bb928ce
Attempt to improve control flow detection
10 years ago
Daniel Grunwald
2509f27223
* Rename ControlFlowSimplification to ConditionDetection
* Rename OptimizingTransform to ControlFlowSimplification
* Move control flow transforms to separate namespace.
10 years ago
Daniel Grunwald
0d6424bd12
IntroduceExitPoints
10 years ago
Daniel Grunwald
06356512fa
Remove the evaluation stack from ILAst; the ILReader now directly introduces stack variables.
10 years ago
David Karlaš
fca29f68c4
Reenabled CustomerAttributes unit tests and fixed most problems
10 years ago
Daniel Grunwald
3a03415be4
Add ControlFlowSimplification pass
10 years ago