Siegfried Pammer
fae6f57b1c
Fix #3671 : TransformCollectionAndObjectInitializers mistakenly included trailing variable initialization.
4 months ago
Nikita
9ed96224b8
Update TransformCollectionAndObjectInitializers to check for init-only properties ( #3678 )
4 months ago
Siegfried Pammer
98d764a169
Add a treenode and decompiler APIs for extensions.
4 months ago
Siegfried Pammer
77d9ee73e9
Fix IDE2000 globally
6 months ago
Siegfried Pammer
d3e12d0ebf
Migrate from .ruleset to .editorconfig
6 months ago
Siegfried Pammer
0cd53418ad
Add ILAmbience
7 months ago
Siegfried Pammer
c0a9afc4ad
Fix #3616 : local variable naming conflict with primary constructor parameters.
7 months ago
ds5678
b9d6ba7dff
Remove flags from `box` that indicate memory access and ability to throw
8 months ago
ds5678
ad4a87b9a3
Improve inlining of boxed values
8 months ago
Siegfried Pammer
588c243929
#3593 : ObjectInitializers: allow castclass instructions wrapping the init instruction to support the pattern used for covariant returns on non-supporting platforms such as .NET 4.x.
8 months ago
Siegfried Pammer
126e870a5a
Fix #3577 : Properly infer the switch governing type and preserve conversions
9 months ago
ds5678
dc3ed43dd8
Do not create object initializers for tuples
9 months ago
ds5678
df9cc3dfbe
Null forgiveness for UsingScope
9 months ago
ds5678
c54318173b
Fix lower case type name conflicting with variable name
9 months ago
Siegfried Pammer
0e1478ffce
Fix #3564 : extend TransformDisplayClassUsage.IsPotentialClosure to support sibling DisplayClasses calling each other.
10 months ago
ds5678
1d964bce8e
Fix regression in decompiling local functions with default parameters
10 months ago
Jeremy Pritts
d1dc7b258a
Copy-propagate the stack slot for collection initializers ( #3554 )
...
* Copy-propagate the stack slot for collection initializers
* Use pattern matching
10 months ago
Siegfried Pammer
6aa9bd8e5e
Fix #3549 : Do not crash on encountering nil tokens.
10 months ago
Peter Crabtree
e1e16b64f5
dev: Strip BOM mark from text files
10 months ago
Daniel Grunwald
587a359e8c
Fix #1873 : Clear ILRange in CopyPropagation
...
We are copying an expression from far away, reusing the ILRange would result in incorrect sequence points.
11 months ago
Daniel Grunwald
02d9dc3e85
Fix #3323 : Simplify cleanup in AwaitInFinallyTransform, ensuring that we do not miss any containers.
11 months ago
Daniel Grunwald
c84605a610
Fix #3468 : Try harder to avoid ref locals if `UseRefLocalsForAccurateOrderOfEvaluation` is not enabled.
...
CopyPropagation will replace `ref StructWithStringField reference = ref array[0];` with:
```
var x = array;
var y = 0;
```
and then every use of `reference` is replaced with `x[y]`.
This lets us avoid rough locals while preserving the semantics in every case except that we re-order when a NullReferenceException/IndexOutOfRangeException occurs.
11 months ago
Daniel Grunwald
ec58d57875
#3465 : Fix bugs in `comp.o` handling.
11 months ago
Daniel Grunwald
f826037acc
Protect IsInst against multi-step inlining -- we can only allow `Box` as the top-level argument, not anywhere within the argument tree.
11 months ago
Daniel Grunwald
8ad33f1e13
Fix #3479 : If YieldReturnDecompiler.ConvertBody fails, abort transforming the state machine instead of continuing with invalid code.
11 months ago
Daniel Grunwald
dd4bf7d8a4
Fix #3518 by replacing `FixLoneIsInst` with an inlining restriction.
...
This way we avoid having to extract later, as we will never inline if the `isinst` argument if this could result in it being unrepresentable in C#.
This commit also refactors inlining restrictions to avoid requiring special cases in ILInlining itself.
But when making this change, I discovered that this broke our pattern-matching tests, and that the weird IL with double `isinst` is indeed generated by the C# compiler for `if (genericParam is StringComparison.Ordinal)` style code. So instead we also allow `isinst` with a `box(expr-without-side-effects)` argument to be represented with the `expr is T ? (T)expr : null` emulation.
11 months ago
ds5678
15223daabd
WIP preincrement improvements
11 months ago
Siegfried Pammer
6c00c138eb
Fix #3465 : Translate comp.o(a op b) if op not in (==, !=) into Unsafe.As<object, UIntPtr>(ref a) op Unsafe.As<object, UIntPtr>(ref b)
11 months ago
Siegfried Pammer
9dde97414a
Rename ResolvedUsingScope to UsingScope
11 months ago
Siegfried Pammer
c9e3790adc
Remove UnresolvedUsingScope
11 months ago
Siegfried Pammer
d2d9281072
Move CanTransformToExtensionMethodCall to CSharpResolver
11 months ago
Siegfried Pammer
d0fc0411fb
Update to C# 13 and fix field keyword
11 months ago
Siegfried Pammer
f97e59760b
Fix #3512 : Local function name collides with local variable name
11 months ago
Siegfried Pammer
49368caf1c
Rename option to "UseObjectCreationOfGenericTypeParameter"
1 year ago
Siegfried Pammer
51a26180bb
Fix #3492 : Do not crash, if field used by RuntimeHelpers.InitializeArray is malformed.
1 year ago
Siegfried Pammer
8834c02eb7
Improve naming of delegate-typed variables.
1 year ago
Siegfried Pammer
fecb10f109
Generalize ILInlining special cases for in arguments of ROS<T> ctors.
1 year ago
Siegfried Pammer
2461f520ab
Move LocalFunctionDecompiler.GetStatement to Block.GetContainingStatement
1 year ago
Siegfried Pammer
298c247355
InlineArrayTransform: Add more bounds checking
1 year ago
Siegfried Pammer
47dd905ad0
Make InlineArrayTransform post-order
1 year ago
Siegfried Pammer
79f7a188b0
Add support for C# 12 inline array expressions
1 year ago
Siegfried Pammer
cb790c6d38
Allow variable splitting of compiler-generated temporaries for Span<T>/ROS<T>
1 year ago
Daniel Grunwald
7fc9025500
Fix nullability of Extract return type
1 year ago
Siegfried Pammer
b1a617c827
AssignVariableNames: Fix ArgumentException
1 year ago
Siegfried Pammer
6c72d1c5f0
Add transform to remove unconstrained generic reference type check.
1 year ago
Siegfried Pammer
9f77f8a919
Prevent inlining of call arguments when doing so would change order of evaluation with regards to the implicit ldobj performed by a constrained.callvirt.
1 year ago
Siegfried Pammer
485ca1d69a
Fix #3353 : Normal method is decompiled as lambda expression.
1 year ago
Siegfried Pammer
7d0262d779
Fix #3439 : Regressed decompilation of variables in lambda scope
1 year ago
Siegfried Pammer
349a89c1fa
Fix #3436 : Duplicate naming of local functions
1 year ago
Siegfried Pammer
51522c4487
Fix #3190 : NRE in YieldReturnDecompiler
1 year ago