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
Siegfried Pammer
679623e4c3
Fix #1609 : Decompilation of cached delegate-construction with unknown delegate type.
6 years ago
Daniel Grunwald
fc73851bb4
#1610 : Slightly more aggressive copy propagation.
...
This helps clean up the mess left behind when stack slots are not eliminated by the normal transforms.
We previously didn't do this because aggressive copy propagation could confuse the normal transforms; but this is no longer an issue with the new pass ordering.
6 years ago
Siegfried Pammer
423e553c6a
Fix #545 : Add hyperlink to ctor method on parentheses in attributes
6 years ago
Siegfried Pammer
65f9fe1076
Remove unused code.
6 years ago
Siegfried Pammer
fd24b5ea26
Simplify check for addresses
6 years ago
Siegfried Pammer
c0f954aaa6
Simplify nullable value types throw expression pattern.
6 years ago
Daniel Grunwald
e4b15256ab
#1025 : Fix method groups not being clickable.
6 years ago
Siegfried Pammer
2e6a4988d3
Fix #1594 : Use Equals to compare generic IMethods.
6 years ago
Siegfried Pammer
50c4fa1c13
Add two more patterns with throw expressions.
6 years ago
Siegfried Pammer
1e3e8fdac1
Allow ref-locals to be initialized from nested field addresses.
6 years ago
Daniel Grunwald
df13f0ce01
Fix #1605 : Inline ref locals more aggressively; this is necessary for VB compound assignments.
6 years ago
Daniel Grunwald
5c18c9e945
Floating-point arithmetic isn't affected by checked/unchecked blocks; so avoid forcing it into an unchecked block.
6 years ago
Siegfried Pammer
ddf4053a45
Fix merge conflict in Conversion.cs
6 years ago
Daniel Grunwald
0e0179edff
Improve NullPropagation (?.) when fields of value-type are involved.
6 years ago
Daniel Grunwald
7f8689c464
Allow inlining of compiler-generated value-type-temporaries when field accesses are involved.
6 years ago
Daniel Grunwald
903544598a
Add comments about expected result after a ConvertTo() call.
...
This method has grown a few cases where it doesn't actually convert.
6 years ago
Siegfried Pammer
7d4b4c6433
Implement NullCoalescingTransform with value types.
6 years ago
Siegfried Pammer
2b6c0c3892
Fix formatting in ExpressionBuilder.
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
Siegfried Pammer
2ca8c31d8e
Fix ArgumentException: ignore duplicate keys after variable splitting in TransformDisplayClassUsage
6 years ago
Daniel Grunwald
60422a0f7e
Fix ResolveResult on typeof() expression.
6 years ago
Daniel Grunwald
18ee984ade
Add support for "definitely assigned if true/false" to data flow analysis.
6 years ago
Siegfried Pammer
adc443e4e2
Fix dynamic compound assignments
6 years ago
Daniel Grunwald
97d490a3df
Slightly generalize the post-increment transform so that it no longer depends on copy propagation.
6 years ago
Daniel Grunwald
afde03a04d
Fix #1597 : Incorrect handling of nullability annotations during generic type substitution.
6 years ago
Daniel Grunwald
8cfc21dfab
Fix DefiniteAssignmentVisitor bugs handling ILFunction, and add some comments.
6 years ago
Siegfried Pammer
25f625af99
Move copy propagation after expression and statement transforms.
6 years ago
Siegfried Pammer
7d62a7e032
Reset HasInitialValue flag after TransformDisplayClassUsage.
6 years ago
Siegfried Pammer
e5f95143cf
TransformDisplayClassUsage: set HasInitialValue = true for newly introduced locals.
6 years ago
Siegfried Pammer
3067aa5519
FlattenSwitchBlocks: include local function and out var declarations in the list of exceptions.
6 years ago
Siegfried Pammer
91af32ef94
Do not wrap local functions in checked blocks.
6 years ago
Siegfried Pammer
129fd876d4
Use extension method syntax only if the extension method is eligible.
6 years ago
Siegfried Pammer
470cd1ec23
Fix SolutionCreator.GetRelativePath so that it properly handles directories with '.' in the name.
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
Siegfried Pammer
911a92f3f9
Basic test for ref reassignment.
6 years ago
Daniel Grunwald
d99f6c81a5
Fix #1595 : preserve C# type for field and tuple element access
6 years ago
Siegfried Pammer
36afa0857d
Add tests for ref, out and in parameters.
6 years ago
Daniel Grunwald
c3037afa70
Fix #1352 : Assertion in NullableLiftingTransform.DoLift
6 years ago
Siegfried Pammer
9c1bf7fbdf
Introduce ReferenceKind in IParameter and ByReferenceResolveResult.
6 years ago
Daniel Grunwald
c366235246
#1349 : Fix type substitution for members of unknown generic types (due to unresolved references)
...
Also, assume that unknown inputs to ldfld are temporaries, not unmanaged pointers.
This avoids emitting weird pointer casts when accessing fields on unresolved value types.
6 years ago
Siegfried Pammer
860f9db950
Extend type inference to allow ref return types.
6 years ago
Daniel Grunwald
42eafb587f
Fix #684 : Improve detection of variable type for stack slots.
6 years ago
Daniel Grunwald
abcef43dba
Fix #1532 : Display metadata token in DecompilerException error message
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