Daniel Grunwald
787621fb51
Revert "Use Nop instead of InvalidExpression to hold the "goto from catch-block to try-block" comment"
...
This reverts commit 77dcbbee86
.
4 years ago
Daniel Grunwald
77dcbbee86
Use Nop instead of InvalidExpression to hold the "goto from catch-block to try-block" comment
4 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
5 years ago
Daniel Grunwald
30da0b7525
Add some missing checks to MatchRoslynSwitchOnString
5 years ago
Daniel Grunwald
9659be0d55
#1946 : Fix IsBranchToReturnBlock() [was broken in c1265ad830
]
5 years ago
Daniel Grunwald
c1265ad830
Fix #1946 : Don't move `return` into `try` block when doing so changes the semantics of a `finally` block.
5 years ago
Siegfried Pammer
e4fda5c2e4
Rename HasILRange to ILRangeIsEmpty to properly reflect its implementation.
5 years ago
Daniel Grunwald
de33e79384
Add tests for 'async IAsyncEnumerable'.
...
Remove [AsyncIteratorStateMachine] attribute and left-over ldc.i4 instructions.
6 years ago
Siegfried Pammer
047f119e99
Add RemoveDeadStores option
6 years ago
Daniel Grunwald
b7f0e2e929
Be less aggressive when removing dead code -- some of it may still be interesting to users.
6 years ago
Daniel Grunwald
752f0de978
Further adjustments to transforms now that copy propagation no longer runs.
6 years ago
Daniel Grunwald
8117dfff4a
Fix #1242 : Discard unreachable code.
...
Unreachable code is not part of the dominator tree, which most of our transforms are based on.
In particular, dominance-based loop detection runs into the problem where unreachable code might have jumps into two independent loops. In that case, it's impossible to place the unreachable code in a way that avoids assertions / generating invalid C#.
We establish the invariant that all blocks in a BlockContainer must be statically reachable from the entry point (-> every block is part of the dominator tree). This means transforms no longer have to deal with special cases for unreachable code.
The "Remove dead and side effect free code" option still has an effect on dead stores, but unreachable code is now always removed (previously this also was dependent on this option).
6 years ago
Siegfried Pammer
c1fca21e8a
Make ILRange field private - introduce public API for IL range manipulation.
6 years ago
Chicken-Bones
e9b766d708
Improve persistence of IL offsets through various transforms.
7 years ago
Daniel Grunwald
eb6119eb7d
Only use mcs for the first compilation pass. Consistently run test cases using .NET 4.x runtime.
7 years ago
Siegfried Pammer
4ca4d97011
Improve SequencePointBuilder
8 years ago
Siegfried Pammer
e33a010cc7
Remove compiler-generated variable in while (true) loops.
8 years ago
Siegfried Pammer
206cdecf30
Merge Return instruction into Leave.
8 years ago
Daniel Grunwald
fac340965f
return statements are no longer forcibly moved into loops when the loops are within exception handling blocks.
8 years ago
Daniel Grunwald
bcdd34a9d0
More aggressively duplicate return blocks in MoveNext() methods.
...
This fixes 'yield return' decompilation of debug builds using legacy csc.
8 years ago
Daniel Grunwald
3e8ab77d52
Perform even less aggressive inlining of return blocks.
8 years ago
Daniel Grunwald
c239204c7f
Perform less aggressive inlining of return blocks. This tends to reconstruct control flow closer to the original code.
8 years ago
Daniel Grunwald
2207ab40f7
Check the CancellationToken a bit more frequently.
8 years ago
Daniel Grunwald
5621101436
Reconstruct try-finally blocks in yield return decompiler
9 years ago
Siegfried Pammer
840ec04fde
Namespace adjustments for Syntax classes
9 years ago
Daniel Grunwald
dd485b971d
Eliminate goto in conditional return in try block.
9 years ago
Daniel Grunwald
4a13491ff9
Improve switch simplifcation: combine case section with default block where possible
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
2730133f5f
Combine switch sections that branch to same label.
9 years ago
Siegfried Pammer
f781c0335a
replace IsSingleUse with IsSingleDefinition
9 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
1720fe5bba
First version of variable inlining.
...
Added ILAst SlotInfo.
10 years ago
Daniel Grunwald
06356512fa
Remove the evaluation stack from ILAst; the ILReader now directly introduces stack variables.
10 years ago
Daniel Grunwald
3a03415be4
Add ControlFlowSimplification pass
10 years ago
Daniel Grunwald
179b635185
Perform some control flow simplifications in OptimizingTransform
10 years ago
Daniel Grunwald
0cae30cce2
ILInstruction.Clone()
10 years ago