Siegfried Pammer
ac6a2e54ca
Use IsAccessor again.
3 years ago
Siegfried Pammer
927b46b17d
Fix #2787 : Enable NRT in TransformCollectionAndObjectInitializers and fix problems.
3 years ago
Siegfried Pammer
1ac1bd6eab
Remove context field from TransformCollectionAndObjectInitializers, inline DoTransform.
3 years ago
Siegfried Pammer
a3191f19e2
Fix #2763 : Improve decompilation of switch-on-enum by preserving enum type information when inlining local variables into SwitchInstruction.Value.
3 years ago
Siegfried Pammer
948da3f9ee
ILInlining: IStatementTransform.Run repeatedly inline all possible statements.
3 years ago
Daniel Grunwald
503048b314
Prevent the early ILInlining pass from creating `addressof` instructions
3 years ago
Siegfried Pammer
c5ff0cafc5
TransformInlineAssignmentStObjOrCall: Make sure no dead store is produced by the transform.
3 years ago
Daniel Grunwald
b4b070468f
Revert "Performance Optimization: Do no longer collect all lower case type and member names."
...
This reverts commit 6584a2f576
.
3 years ago
Siegfried Pammer
6584a2f576
Performance Optimization: Do no longer collect all lower case type and member names.
3 years ago
Daniel Grunwald
08ceffc3ad
Upgrade dotnet-format from version 5 to the version included with the .NET (6) SDK.
3 years ago
Siegfried Pammer
f695bbcf3a
Add support for DefaultInterpolatedStringHandler
3 years ago
ElektroKill
760a6a653e
Reduce allocations in TransformArrayInitializers
...
DecodeArrayInitializer - Instead of relying on the Add method of a list to expand the underlying array when necessary, the code now allocates a big enough array to fit all the elements removing the need for the Add method to expand the array several times.
BlockFromInitializer now reuses a single instance of List<ILInstruction> instead of reallocating a new one every time and clears it when necessary. The same pre-allocation approach mentioned above has been implemented here too.
3 years ago
Siegfried Pammer
d3f8912d53
Handle special-cases with addressof:
...
- Never introduce casts for ldobj-address-chains
- Add special-case to TransformExpressionTrees: transform addressof(ldloc) to ldloca
- Classify foreach and using variables as readonly lvalues
3 years ago
Siegfried Pammer
702a7da2c3
Fix #2714 : Force inlining of call targets in ctor initializers.
3 years ago
Siegfried Pammer
874ac9ac0b
Fix #2712 : TransformCollectionAndObjectInitializers fails to properly detect set-accessors of FakeProperties.
...
Bug likely introduced due to an oversight in #2677 .
3 years ago
Siegfried Pammer
d248867302
Add support for C# 10 record structs.
3 years ago
Siegfried Pammer
39992161b6
Fix #2692 : NRE in DeconstructionTransform.IsCompatibleImplicitConversion
3 years ago
Siegfried Pammer
6a3bb2bbf1
Fix #2655 : TranslateArrayInitializer crashes with out of order array init
3 years ago
Siegfried Pammer
9e462b53ad
Add support for C# 11 parameter null checks
3 years ago
Daniel Grunwald
ced6ed445a
Fix #2582 : Assertion when using named arguments in a constrained call
3 years ago
Siegfried Pammer
a9c8f86abc
Make TypeDef-ctor of FindTypeDecoder internal.
3 years ago
Siegfried Pammer
8cc0bf8b49
Generalize FindTypeDecoder
3 years ago
Siegfried Pammer
5f73bfbb01
Fix Deconstruction for Deconstruct instance methods of value-types.
3 years ago
Siegfried Pammer
e726ae28a5
Fix type equality check in TransformCollectionAndObjectInitializers
3 years ago
Siegfried Pammer
d98ff730a0
Fix build.
3 years ago
Siegfried Pammer
4aa7f5fc38
Fix #2612 decompilation of newarr with int.MaxValue causes OOME in decompiler.
3 years ago
Daniel Grunwald
d0012bf7d8
StatementTransform: Run an expensive invariant check slightly less often.
4 years ago
Siegfried Pammer
f801059659
TDCU: make sure that copies of display-class variables are validated as well.
4 years ago
Daniel Grunwald
17d323c943
Fix #2557 : Remove incorrect assertion from `ReduceNestingTransform`
...
ILFunctions can appear as statements when the source code has a lambda expression which is immediately discarded.
```
_ = (Action)delegate { ... };
```
4 years ago
Siegfried Pammer
35aea3eea7
Slight pattern changes in mcs 5 switch-on-string with case null.
4 years ago
Siegfried Pammer
6bc0abc336
Fix #2378 : DeconstructionTransform produced invalid ILAst with some optimized deconstruction patterns.
4 years ago
Siegfried Pammer
22c98016a9
Fix #2530 : ArgumentOutOfRangeException in PatternMatchRefTypes
4 years ago
Siegfried Pammer
0ed191617e
Fix #2528 : arbitrary stores preceding switch-on-string confuse the transform, making it pick the wrong variable as switch variable.
4 years ago
Siegfried Pammer
15d74751f4
Fix #2459 , fix #2460 : Make sure that LdObjToLdLoc and StObjToStLoc preserve the result type, if the source variable has an unknown type.
4 years ago
Siegfried Pammer
936388ba18
Fix #2458 : ILExtraction.Extract handles BlockContainer.Kind != Normal.
4 years ago
Siegfried Pammer
e1ca4db851
Fix #2527 : Support skip locals init
4 years ago
Siegfried Pammer
96db0a5472
Add support for pattern matching in UsingTransform.
4 years ago
Siegfried Pammer
665c731cfc
Move PatternMatchingTransform after LoopDetection.
4 years ago
Siegfried Pammer
55f1125f94
Ensure that pattern locals get distinct variable names.
4 years ago
Siegfried Pammer
1568aeca3e
Fix #2506 : NamedArgumentTransform loses information, if the original variable is of StackType.Ref
4 years ago
Siegfried Pammer
dbbcbb87fe
Make pattern matching transform a simple ILTransform for both reference and value types. Check that the true branch dominates all uses of the pattern variable.
4 years ago
Siegfried Pammer
e50d221e06
Adjust NullableLiftingTransform to match new patterns due to RemoveInfeasiblePathTransform.
4 years ago
Siegfried Pammer
2b26e5013b
Add Roslyn 2.x pattern for value type pattern matching.
4 years ago
Siegfried Pammer
cd0c76d7b1
Support leave instructions in RemoveInfeasiblePathTransform and transform match(x) ? true : false to match(x).
4 years ago
Siegfried Pammer
5fa8201533
Added support for isinst-unbox.any pattern with generic reference types and simplified value types pattern detection.
4 years ago
Siegfried Pammer
83727ea4b0
Add support for value type patterns
4 years ago
Siegfried Pammer
357d55d2ad
Add support for old roslyn pattern matching pattern.
4 years ago
Daniel Grunwald
c26d9ad6f1
Mark stack slot for aggressive removal in InfeasiblePathTransform
...
This helps with pattern matching in short circuiting operators.
4 years ago
Siegfried Pammer
c641072685
Translate MatchInstruction to BinaryOperatorExpression with BinaryOperatorType.IsPattern.
4 years ago
Daniel Grunwald
040ab41c69
Initial implementation of the pattern matching transform.
4 years ago