Daniel Grunwald
fb70a2861e
Fix #1656 : Disable CopyPropagation for split variables.
...
The code reordering done by copy propagation could cause the lifetimes of different parts of a split variable to start overlapping. This caused incorrect C# to be generated when the variable was recombined.
6 years ago
Siegfried Pammer
c3e61b39fc
#1681 : Include fields from base types in AssignVariableNames.CollectReservedVariableNames
6 years ago
Siegfried Pammer
76a8a4449c
#1671 : Do not crash if a generic local function is encountered. Emit warning instead.
6 years ago
Daniel Grunwald
251f8c5a84
Fix flags+ILRange in ProxyCallReplacer.
6 years ago
Siegfried Pammer
f5185d5697
Fix #1660 : Generic proxy calls should use the callee's type parameter substitution, not the caller's.
6 years ago
Daniel Grunwald
57b725df79
Fix #1655 : Incorrect pointer cast when calling method on integer constant
6 years ago
Siegfried Pammer
05454bd741
Fix SwitchOnStringTransform.SimplifyCascadingIfStatements: do not remove statements unrelated to switch pattern.
6 years ago
Siegfried Pammer
bbb40ecb32
Fix #1602 : Recognize Roslyn empty string case block.
6 years ago
Siegfried Pammer
047f119e99
Add RemoveDeadStores option
6 years ago
Daniel Grunwald
f1021cb300
Fix #1643 : Handle unbox.any in TransformCatchVariable.
6 years ago
Siegfried Pammer
03151bf37b
Remove redundant code in ExpressionTransforms.VisitBlockContainer
6 years ago
Siegfried Pammer
81e702f840
#1638 : Make TransformDisplayClassUsage.IsPotentialClosure less aggressive
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
7502e521c1
Improve documentation of ExpressionTransforms.TransformCatchVariable
6 years ago
Siegfried Pammer
44c044aa33
Fix #1635 : DynamicInvokeConstructorInstruction Did report the wrong StackType for value types and unknown types.
6 years ago
Siegfried Pammer
85d1d21b35
Fix possible NRE in DynamicCallSiteTransform.ExtractArgumentInfo.
6 years ago
Siegfried Pammer
587f61be19
Fix #1280 : Transform RuntimeHelpersInitializeArray calls without receiving assignments.
6 years ago
Siegfried Pammer
87353aac5a
Fix #1624 : Stack type mismatch in expression trees.
6 years ago
Siegfried Pammer
4246a178f4
Remove unused parameter.
6 years ago
Siegfried Pammer
fdf4228a17
Fix #1623 : Nest local functions correctly, if captured variables are used.
6 years ago
Siegfried Pammer
3ad8c88d39
Fix #1622 : Transform local functions calls with named arguments correctly
6 years ago
Siegfried Pammer
72c3e828f3
Check IsPure before Match.
6 years ago
Daniel Grunwald
2b9a40371b
Remove the dead LoopingTransform.
...
Make ILInstruction.IsDirty debug-only, as it is only used for assertions now.
6 years ago
Siegfried Pammer
c477ccf68e
Add SemanticHelper.IsPure check as per code-review.
6 years ago
Siegfried Pammer
0d92ee805c
#1349 : Insert conv instruction in expression tree, if inst.ResultType != typeHint.GetStackType()
6 years ago
Siegfried Pammer
0ca5ace524
#1349 : Fix assertions triggered by incorrect local function decompilation.
6 years ago
Siegfried Pammer
667ac1a980
Fix #1538 : Insert expression.tree.cast instructions to coerce references to outer expression tree parameter definitions to their actual type.
6 years ago
Siegfried Pammer
a3dbc27f76
Fix #1573 : if the expected type of the this argument of an expression tree call is unknown, insert an explicit conv *->unknown instruction
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
ec18094c65
Implement transformation of delegate construction with ldvirtftn.
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
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
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
Siegfried Pammer
7d4b4c6433
Implement NullCoalescingTransform with value types.
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
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
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
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
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
Daniel Grunwald
c3037afa70
Fix #1352 : Assertion in NullableLiftingTransform.DoLift
6 years ago