Siegfried Pammer
e4fda5c2e4
Rename HasILRange to ILRangeIsEmpty to properly reflect its implementation.
5 years ago
Daniel Grunwald
4b1f0b342c
Fix #1925 : Adjust AsyncAwaitDecompiler to changes in Roslyn 3.5.0-beta2
5 years ago
Siegfried Pammer
0b78a66fdb
Fix #1896 : Remove unreachable blocks
6 years ago
Daniel Grunwald
f0292808b3
#1852 : Handle fixed statement with null-safe GetPinnableReference call
6 years ago
Daniel Grunwald
bbb2397083
Fix #1853 : Detect pinning of multi-dimensional array
6 years ago
Daniel Grunwald
eb2a9e6b94
#1852 : Rename array.to.pointer opcode to get.pinnable.reference.
6 years ago
Shimon Magal
c06299b284
yield return moveNext
6 years ago
Daniel Grunwald
1b505b8c6d
Adjust async-streams decompiler for dotnet/roslyn#39436
6 years ago
Daniel Grunwald
eaecedd8ea
Fix #1782 : AsyncAwaitDecompiler for methods in struct
6 years ago
Daniel Grunwald
fc95f3056b
Fix #1788 : async/await decompilation fails with custom task type when the builder and/or awaiter is a reference type.
6 years ago
Siegfried Pammer
2e1306ec33
Split AwaitInCatchTransform.cs from AwaitInFinallyTransform.cs
6 years ago
Siegfried Pammer
cefefd0e6d
create AwaitInFinallyTransform.cs from AwaitInCatchTransform.cs
6 years ago
Daniel Grunwald
c88bd597df
Fix null checks.
6 years ago
Jane Doe
446ac06e38
candiate -> candidate
6 years ago
Jane Doe
37a801e3fb
Anaylsis -> Analysis
6 years ago
Daniel Grunwald
233f33f197
Handle 'yield break;' in async streams
6 years ago
Daniel Grunwald
de33e79384
Add tests for 'async IAsyncEnumerable'.
...
Remove [AsyncIteratorStateMachine] attribute and left-over ldc.i4 instructions.
6 years ago
Daniel Grunwald
13ec574dbd
Fix YieldReturnDecompiler.
6 years ago
Daniel Grunwald
be2731c6e6
Handle `if (disposeMode)` in async streams.
6 years ago
Daniel Grunwald
ef699c096b
Support parameters in IAsyncEnumerator methods
6 years ago
Daniel Grunwald
67fa24b09f
Improve async/await decompilation when reference assemblies are missing
6 years ago
Daniel Grunwald
f8ee7c2bf3
Initial support for `async IAsyncEnumerator<T>` methods
6 years ago
Daniel Grunwald
0d3a3bee82
Fix #1703 : Support async methods that never return normally.
...
Closes #1678 .
6 years ago
Siegfried Pammer
4db22c87e1
Implement detection of custom task implementations + tests.
6 years ago
Siegfried Pammer
def681ccdf
Fix #1621 : Add AllowUnreachableCases in switch analysis.
6 years ago
Siegfried Pammer
047f119e99
Add RemoveDeadStores option
6 years ago
Siegfried Pammer
9c06d5c924
Fix #1642 : Allow StackTypes I, I4, I8 and Unknown as switch value, convert Unknown and I to I8.
6 years ago
Siegfried Pammer
e5d603ced2
Fix #1632 : await pattern might use negated IsCompleted check.
6 years ago
Daniel Grunwald
5177c56d88
Reject MoveNext() methods with more than one cachedStateVar.
6 years ago
Daniel Grunwald
3f996ff2c0
Fix #1604 : async methods that had no 'await' but were capturing 'this' were not decompiled correctly
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
6c0216bbb9
Fix assertion in ReduceNestingTransform: after copying the exitInst, it was possible that the old copy of the exitInst became unreachable.
6 years ago
Daniel Grunwald
c4cb9df687
Fix switch in loops sometimes detecting an invalid switch body.
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
c51aea3601
Fix decompilation of yield return in local functions.
6 years ago
Daniel Grunwald
8cd8a90c22
Fix #1563 : `Unexpected return in MoveNext()` when mixed `using` and more than one `yield break`
...
Roslyn re-uses the same "this.Finally(); return v;" block for both "yield break;" instructions, so the yield break pattern needs to support multiple stores to the helper variable.
6 years ago
Daniel Grunwald
c56714c607
Fix assertion with async lambdas; fix async local functions.
6 years ago
Daniel Grunwald
beed6b5e24
Remove MarkGeneratedVariables() step in AsyncAwaitDecompiler.
...
This was left-over from earlier versions; but ILSpy stopped caring so much about variable vs. stack slot since Roslyn started to optimize more aggressively.
The change of variable type caused problems for debug information and could even cause an assertion.
Closes #1456 , closes #1562 .
6 years ago
Daniel Grunwald
ccdabf2325
Fix a bunch of XmlDoc compiler warnings.
6 years ago
Siegfried Pammer
bd77b8301f
Basic implementation of local functions.
6 years ago
Siegfried Pammer
29527b804e
Fix #1392 : LoopDetection should take switch block containers into account in IncludeNestedContainers.
6 years ago
Siegfried Pammer
ab55086cd7
Use ILRange API in AsyncAwaitDecompiler.
6 years ago
Siegfried Pammer
c1fca21e8a
Make ILRange field private - introduce public API for IL range manipulation.
6 years ago
Daniel Grunwald
f1c8142ce2
PDB generator now can emit "method stepping information" for async functions.
6 years ago
Daniel Grunwald
f6aae1f97d
Fix #1386 : MoveArrayToPointerToPinnedRegionInit: Only consider the pinned variable uses within the PinnedRegion
...
This also makes CleanUpTryFinallyAroundPinnedRegion() redundant as it is no longer necessary to trigger the array-to-pointer transform; so the normal elimination of pinned variable resets is sufficient.
6 years ago
Daniel Grunwald
1ab11ba7ce
DetectPinnedRegions: also add debug step for failed CreatePinnedRegion() calls
6 years ago
Daniel Grunwald
da5693e605
Fix #1339 : fixed statement not decompiled correctly when pinned variable is reset in finally block
6 years ago
Siegfried Pammer
d9952a7e10
#1388 : Fix ArgumentOutOfRangeException in AsyncAwaitDecompiler.AnalyzeAwaitBlock.
6 years ago
Daniel Grunwald
47ca51a769
Clarify the meaning of ILVariable.Index
6 years ago