Daniel Grunwald
aa914058ce
Fix #3237 : Use `ref readonly` locals for `readonly.ldelema`
1 year ago
Siegfried Pammer
7b1f8a305c
Implemented support for string concatenation compound assignments involving ReadOnlySpan<char>.
1 year ago
Siegfried Pammer
1c71f6ad46
Support concatenation involving arguments of type ReadOnlySpan<char>.
1 year ago
Siegfried Pammer
03a20f3494
Support ILInlining for in parameters
1 year ago
Siegfried Pammer
28aa88bfb8
Make NullableLiftingTransform handle the case where ExpressionTransforms.VisitComp already lifted a nullable comparison with constant.
1 year ago
Siegfried Pammer
9d22e3ab41
NullableLiftingTransform: Undo new compiler optimization (omitting get_HasValue for comparisions with constants)
1 year ago
Siegfried Pammer
427fbcd8c0
Fix general using statement pattern
1 year ago
Siegfried Pammer
dab256ceb0
Update stackalloc initializer patterns for Roslyn 4.10.0.
1 year ago
Siegfried Pammer
a5ed5ec5cb
Support types that provide DisposeAsync without implementing IAsyncDisposable.
1 year ago
Siegfried Pammer
4bf9487ecd
Remove IsRef, IsOut and IsIn flags from IParameter and Replace ParameterModifiers with ReferenceKind.
1 year ago
Daniel Grunwald
d48df11133
Remove unused transforms: DecimalConstantTransform and ParameterNullCheckTransform
1 year ago
Siegfried Pammer
401cb77ae3
Fix #3189 : Support primitive types in Expression.Constant(object) pattern.
1 year ago
Daniel Grunwald
38e7ab4373
Fix #3110 : Add support for MCS 2.6.4 pinned region with array variable
...
* Added additional code to remove the conv instruction present in the initialization part of the pinned region.
* Extended the code responsible for removing the unpin stloc to correctly match the inverted condition found in MCS 2.6.4 compiled code.
* Enabled already present correctness test to run for MCS 2.6.4.
This is a more generalized version of the fix on PR #3110 proposed by @ElektroKill .
1 year ago
Siegfried Pammer
969e3e546a
Add support for switch on (ReadOnly)Span<char> using a compiler-generated hash function.
1 year ago
Siegfried Pammer
9ba47db69b
Add new a.GetValueOrDefault(b) -> a ?? b transform for side-effect-free default values.
1 year ago
Siegfried Pammer
ca78d4a14d
Use MetadataFile instead of PEFile in TypeSystem.
1 year ago
Siegfried Pammer
566af5c2fb
Fix #3113 : Remove GetAlternativeName and instead reuse existing names, if there are no conflicts.
2 years ago
Daniel Grunwald
d58576f409
Fix #3075 : eliminate recursion in TopologicalSort and BlockTransform.
2 years ago
Siegfried Pammer
d5cec0ab37
Fix #3103 : unaligned.stobj cannot be transformed into inline assignment
2 years ago
Daniel Grunwald
5a5be026d0
Avoid reference count temporarily dropping to zero while ConditionDetection moves instructions to other blocks.
...
This avoids recursively un-registering e.g. all LdLocs from their ILVariable.LoadInstructions, etc. (all the ILInstruction.Disconnected logic). This speeds up the example from #1193 by another factor 2.
2 years ago
Siegfried Pammer
0a2037ae1f
#3075 : Avoid processing already-transformed blocks by introducing BlockTransformContext.IndexOfFirstAlreadyTransformedInstruction, which allows us to track already transformed instructions after a block has been merged into another by ConditionDetection.
2 years ago
Siegfried Pammer
9e168224dd
Fix #3091 : extension methods named "Add" were skipping some checks in AccessPathElement.IsMethodApplicable.
2 years ago
Siegfried Pammer
0fc003459f
Fix #3079 : Replace parameter names that consist of only whitespace
2 years ago
Siegfried Pammer
4ca9fddd6f
Fix #3069 : Reuse SwitchAnalysis instead of MatchIfElseOnCharBlock
2 years ago
Siegfried Pammer
70616b301c
Implement support for C# 11 switch on (ReadOnly)Span<char>.
2 years ago
Siegfried Pammer
e193b838da
Move TransformDecimalCtorToConstant to EarlyExpressionTransforms
2 years ago
Siegfried Pammer
688474facd
Add missing DecompilerSettings for new language features
2 years ago
Siegfried Pammer
8e63d92886
Add null and not null patterns for nullable value types
2 years ago
Siegfried Pammer
800067e488
Pattern Matching: Ensure that we always return a non-null instruction after successfully matching a pattern.
2 years ago
Siegfried Pammer
cb62cac9d3
Add support for nullable int const patterns
2 years ago
Siegfried Pammer
a93731ad3a
Add support for nullable structs
2 years ago
Siegfried Pammer
1cb4e77f06
Refactor sub pattern detection into loop to allow continuations of outer patterns.
2 years ago
Siegfried Pammer
8cb3a67c0c
Support recursive pattern for value types
2 years ago
Siegfried Pammer
e475af7822
Support null check without type check in sub patterns.
2 years ago
Siegfried Pammer
51a8eb28f1
Add support for var sub patterns.
2 years ago
Siegfried Pammer
4e62fea07a
Fix pattern matching with fields and value types.
2 years ago
Siegfried Pammer
65b4c928c0
Add support for simple constant patterns.
2 years ago
Siegfried Pammer
f7343c75d0
Add support for simple recursive patterns where the sub pattern is a simple type pattern.
2 years ago
Siegfried Pammer
3d8cda5f88
Fix #2613 : Detect pattern matching on variables of generic type with value types.
2 years ago
Siegfried Pammer
32e04eaf12
Implement Roslyn 4.6 pattern for C# switch on string: match by length and unique characters first.
2 years ago
Daniel Grunwald
99d5e94a62
Allow inlining value type temporaries into constrained call.
2 years ago
Daniel Grunwald
b80d20b15d
Add support for calling `operator checked`.
2 years ago
Daniel Grunwald
3c46271a11
Add support for unsigned right shift.
...
Only for user-defined operators so far; builtin right shifts still cast to the appropriate type.
2 years ago
Daniel Grunwald
f568123704
Add support for UTF8 string literals
2 years ago
Daniel Grunwald
475f2b3c28
Fix "ref readonly" fields.
2 years ago
Daniel Grunwald
b823955ad6
Fix mcs-5 foreach/using pattern when C# 7 (pattern matching) is not enabled.
2 years ago
Daniel Grunwald
f04acbdd74
Simplify `IsImplicitTruncation` by using an enum with 3 options instead of a pair of bools.
...
This also fixes the logic for combining the results for BinaryNumericInstruction/IfInstruction.
2 years ago
ElektroKill
ea1f6e7c25
Fixed compound assignment and post/pre increment for pointer dereference
2 years ago
Siegfried Pammer
29ca38d338
Fix handling of recombined variables and nested functions in IntroduceNativeIntTypeOnLocals and IntroduceDynamicTypeOnLocals.
2 years ago
Siegfried Pammer
539925f259
Fix #2983 : display-class locals should be named uniquely per top-level ILFunction. Add assertion to ResolveCollisions: ensure that colliding/merged variables have the same type.
2 years ago