Daniel Grunwald
f1021cb300
Fix #1643 : Handle unbox.any in TransformCatchVariable.
7 years ago
Siegfried Pammer
03151bf37b
Remove redundant code in ExpressionTransforms.VisitBlockContainer
7 years ago
Siegfried Pammer
9c06d5c924
Fix #1642 : Allow StackTypes I, I4, I8 and Unknown as switch value, convert Unknown and I to I8.
7 years ago
Siegfried Pammer
7502e521c1
Improve documentation of ExpressionTransforms.TransformCatchVariable
7 years ago
Siegfried Pammer
72c3e828f3
Check IsPure before Match.
7 years ago
Siegfried Pammer
c477ccf68e
Add SemanticHelper.IsPure check as per code-review.
7 years ago
Siegfried Pammer
ec18094c65
Implement transformation of delegate construction with ldvirtftn.
7 years ago
Daniel Grunwald
752f0de978
Further adjustments to transforms now that copy propagation no longer runs.
7 years ago
Siegfried Pammer
adc443e4e2
Fix dynamic compound assignments
7 years ago
Daniel Grunwald
539e3a906d
Fix #1552 : user-defined and decimal increments
...
For user-defined increments, there were problems with Roslyn was optimizing out one of the stores.
The new transform FixRemainingIncrements now takes increments/decrements that were not detected by TransformAssignment and introduces a temporary variable that can be incremented.
This sometimes requires un-inlining via the new ILInstruction.Extract() operation.
Extract() is not supported in all possible contexts, so it is possible but unlikely that some op_Increment calls remain.
For decimals, the situation is different: legacy csc actually was optimizing "d + 1m" to "op_Increment(d)", so we can get rid of any left-over increments by undoing this optimization. This now happens in ReplaceMethodCallsWithOperators.
7 years ago
Siegfried Pammer
19a7898786
Add addressof(ldloc) => ldloca transform to EarlyExpressionTransforms
7 years ago
Siegfried Pammer
119c679fad
Add addressof(ldloc V) => ldloca V transform for read access on value types.
7 years ago
Daniel Grunwald
3314f3f37a
Fix #1571 : Expression transforms not running for values of inline assignments.
7 years ago
Siegfried Pammer
6a1229028c
Only try to inline stackalloc Span<T> if the next statement is a plain assignment.
7 years ago
Siegfried Pammer
9590cfbf59
Update tests to latest Roslyn implementation.
7 years ago
Daniel Grunwald
961923f4fd
#1499 , #1240 : Translate pointer arithmetic on managed pointers (ref T) using the System.Runtime.CompilerServices.Unsafe intrinsics
7 years ago
Siegfried Pammer
d42cf99a8c
Fix dynamic transforms because https://github.com/dotnet/roslyn/issues/27800 was fixed.
7 years ago
Siegfried Pammer
94cd891609
Add support for ReadOnlySpan<T> initialization pattern.
7 years ago
Siegfried Pammer
c1fca21e8a
Make ILRange field private - introduce public API for IL range manipulation.
7 years ago
Daniel Grunwald
47ca51a769
Clarify the meaning of ILVariable.Index
7 years ago
Siegfried Pammer
112719efaf
Extend safety-checks in TransformSpanTCtorContainingStackAlloc.
7 years ago
Siegfried Pammer
0dac55d584
Add transformation for stackalloc to Span<T>.
7 years ago
Daniel Grunwald
ef866040b4
Update to SRM 1.6.0 and Roslyn 2.9. Adjust decompiler to new code pattern used for lifted nullable comparisons.
7 years ago
Daniel Grunwald
12e74daf48
Handle Comp in InferType().
7 years ago
Daniel Grunwald
2f54eee5db
#1195 : Fix comparison of object reference with ldc.i4 0.
8 years ago
Daniel Grunwald
dd5845e83d
Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic)
8 years ago
Daniel Grunwald
9479e8af13
Support overloaded operator &&/||.
8 years ago
Chicken-Bones
f539bee362
Move binary->logical AND to ExpressionTransforms and use SemanticHelper.IsPure
8 years ago
Daniel Grunwald
4b96f48d87
Cosmetic changes during review of PR #1176
8 years ago
Siegfried Pammer
a30c628e1f
Remove hack from ExpressionTransforms.TransformDynamicAddAssignOrRemoveAssign, implement VisitDynamicSetIndexInstruction
8 years ago
Siegfried Pammer
c4f41f459f
Add support for more dynamic binary operators.
8 years ago
Siegfried Pammer
2c7e3c2c37
Add hack to allow inlining of compiler-generated variable after dynamic.isevent pattern transform.
8 years ago
Siegfried Pammer
273a1c24ff
Add dynamic compound assignment transforms
8 years ago
Siegfried Pammer
5e4b571a62
Add DynamicCallSiteTransform
8 years ago
Daniel Grunwald
3956fa685d
Refactor TransformAssignment to reduce code duplication.
8 years ago
Siegfried Pammer
845c620a9f
Implement UserDefinedCompoundAssign
...
rename CompoundAssignmentInstruction -> NumericCompoundAssign
8 years ago
Daniel Grunwald
a46ac9dc84
Also combine 'ldlen; conv.i4.ovf' to 'ldlen.i4'.
...
The VB compiler emits overflow checks when accessing the array length. (#1097 )
8 years ago
Daniel Grunwald
1dfda502ea
Remove redundant 'box' opcodes. This eliminates some unnecessary (object)-casts in generic code.
8 years ago
Siegfried Pammer
33c5e2d3ed
Add StackType.F4 and StackType.F8, and instructions LdcF4 and LdcF8.
8 years ago
Siegfried Pammer
69f2609bff
Fix #861 : Failure to decompile for loop with conditional early return
8 years ago
Daniel Grunwald
40a4f08a8d
Add support for compound assignment of short integers.
8 years ago
Daniel Grunwald
248a9ad76f
Fix #954 : don't use invalid compound assignments on enums
8 years ago
Daniel Grunwald
255fab7bd6
Fix short-circuiting operators when the rhs is a comparison with 0.
8 years ago
Siegfried Pammer
9e5d4c10f7
Fix array.Length == 0 in Roslyn.
8 years ago
Daniel Grunwald
f6ab796ba7
Add ldobj(ldloca) -> ldloc transform; and remove special case in ProxyCallReplacer.
8 years ago
Daniel Grunwald
39bb6856b7
Fix various bugs with compound assignments.
8 years ago
Daniel Grunwald
61900e33c3
[nullables] Lifted compound assignments
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
Siegfried Pammer
48b77d4742
ExpressionTransform: comp(box T(..) [!=]= ldnull) -> comp(.. [!=]= ldnull) where T.Kind == TypeParameter
8 years ago
Daniel Grunwald
735f8e070d
Compound assignment doesn't support lifting yet.
8 years ago