Daniel Grunwald
7b8389dca5
Fix #1078 : Eliminate redundant variable in fixed statements.
7 years ago
Daniel Grunwald
ae45665ff7
Improve pinned region detection to also handle the case where the pinned variable has array type. ( #1078 )
7 years ago
Siegfried Pammer
1a0052a345
Cache UsingScope during decompiler run.
8 years ago
Siegfried Pammer
a06a04d48b
#1080 : Add ILTransformContext.RequiredNamespacesSuperset
8 years ago
Daniel Grunwald
8a589b2fd2
Add DecompilerSettings constructor that takes a language version.
8 years ago
Siegfried Pammer
96ddabed57
Fix bug in AwaitInFinallyTransform
8 years ago
Siegfried Pammer
adda97cf84
Add AwaitInFinallyTransform
8 years ago
Siegfried Pammer
9b665b7cbc
Add AwaitInCatchTransform
8 years ago
Daniel Grunwald
eb6119eb7d
Only use mcs for the first compilation pass. Consistently run test cases using .NET 4.x runtime.
8 years ago
MikeFH
c299304034
Check that method is actually the entry point
8 years ago
MikeFH
66d806b2d9
Add support for async main method
8 years ago
Siegfried Pammer
9b13fe373a
Fix #914 : Exception when viewing an internal class in Roslyn assembly
8 years ago
Daniel Grunwald
568b3e2d91
Fix DetectPinnedRegions introducing stack type inconsistencies.
8 years ago
Daniel Grunwald
02db362838
Ensure that StLoc.Value.ResultType == StLoc.Variable.StackType
This introduce a new explicit conversion (StartGCTracking) when converting unmanaged pointers to managed references.
8 years ago
Daniel Grunwald
d6bc1ca762
#915 : Fix LoopDetection.FindExitPoint() incorrectly returning null (=multiple exit points; use heuristic) when there was only a single exit point that wasn't dominated by the loop head.
8 years ago
Daniel Grunwald
e6afe4bf98
Fix #915 : ensure that loops are nested correctly
8 years ago
Daniel Grunwald
7af15d27cd
Fix #905 : improve exit point detection for foreach loops.
8 years ago
Siegfried Pammer
154833b06c
Add ContainerKind
8 years ago
Daniel Grunwald
1528ff329f
#447 : Don't pick "return;" as exit point if there's another choice.
8 years ago
Daniel Grunwald
adb64514f8
Add some comments to SwitchDetection.UseCSharpSwitch
8 years ago
Siegfried Pammer
f8b27066a1
Remove ILInstructionExtensions.cs
8 years ago
Daniel Grunwald
8c5de98a39
Move UnsafeCode tests to pretty-tests (except for those that are not yet successful).
8 years ago
Siegfried Pammer
4ca4d97011
Improve SequencePointBuilder
8 years ago
Moritz
f4209947a0
Fix await calls not getting decompiled correctly ( #904 )
8 years ago
Siegfried Pammer
e33a010cc7
Remove compiler-generated variable in while (true) loops.
8 years ago
Siegfried Pammer
12e39cf63c
Fix switch exit points.
8 years ago
Daniel Grunwald
236c7c28b4
Remove redundant lambda casts.
8 years ago
Siegfried Pammer
f7f583056a
Fix order of switch blocks.
8 years ago
Daniel Grunwald
87b350e4eb
Fix SwitchAnalysis not recursing into the default-block of IL switches.
8 years ago
Daniel Grunwald
953c6a0929
Keep code dominated by a single switch section within the switch.
8 years ago
Daniel Grunwald
c7490ff2fe
[switch] Sort switch sections
8 years ago
Daniel Grunwald
de2c647114
Revert "Fix bug that could cause nodes reachable from the exit point to be moved into the loop/switch."
This reverts commit 105ff744b3
.
A correctly chosen single exit point should dominate all other code that
is dominated by the loop but not included in the body -- otherwise there
would be multiple exit points.
So this "bugfix" was only covering up for us not properly validating the
exit points from post-dominance.
8 years ago
Daniel Grunwald
cd993ad074
Property validate exit points determined using post-dominance.
8 years ago
Daniel Grunwald
9ef97703cd
[switch] consider loop back-edges to be exit points when looking for the switch body
8 years ago
Daniel Grunwald
105ff744b3
Fix bug that could cause nodes reachable from the exit point to be moved into the loop/switch.
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
f42d1a4b34
Fix crash in SwitchDetection.
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
66dc52c33c
Fix handling of 'leave' instruction in SwitchAnalysis.
This is necessary for detecting a sparse switch when the default case consists of "return;".
8 years ago
Daniel Grunwald
39bb6856b7
Fix various bugs with compound assignments.
8 years ago
Daniel Grunwald
846c8613b0
[async] Delete dead ldloc(cachedStateVar).
8 years ago
Daniel Grunwald
a6c6ddcea1
Fix #861 : Improved loop exit point heuristic.
8 years ago
Daniel Grunwald
7017c6f6e6
Replace LoopingBlockTransform with StatementTransform.
This transform interleaves statement-combining transforms so that nested structures can be detected better.
8 years ago
Daniel Grunwald
0008deb021
Fix handling of try-finally blocks in ReachingDefinitionsVisitor.
This was causing variables to get split incorrectly.
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
e266c634de
[nullables] Add support for lifted binary operators where one of the inputs is nullable.
8 years ago
Daniel Grunwald
6b3ab66300
Fix ExpectedResultType of main BlockContainer.
8 years ago
Daniel Grunwald
259e322e26
Fix typo in IsBranchOrLeave()
8 years ago
Siegfried Pammer
2d1692c72f
Add value parameter to Leave ctor.
8 years ago