Siegfried Pammer
126e870a5a
Fix #3577 : Properly infer the switch governing type and preserve conversions
6 months ago
Siegfried Pammer
d736b02e2b
Fix #3480 : assert at ExpressionBuilder.BuildArrayInitializerExpression with properties that are not C# indexers, but parameterized properties.
6 months ago
Daniel Grunwald
ec58d57875
#3465 : Fix bugs in `comp.o` handling.
8 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.
8 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)
8 months ago
Siegfried Pammer
c9e3790adc
Remove UnresolvedUsingScope
8 months ago
Siegfried Pammer
d2d9281072
Move CanTransformToExtensionMethodCall to CSharpResolver
8 months ago
Siegfried Pammer
101ddf8783
Add support for constant slices of InlineArrays
10 months ago
Siegfried Pammer
79f7a188b0
Add support for C# 12 inline array expressions
10 months ago
Siegfried Pammer
e7a6e27820
Fix #3464 : Missing cast in string interpolation
11 months ago
ds5678
ceed9eb01a
Dont call GetPointerArithmeticOffset twice unnecessarily
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
ds5678
8c29144811
Add struct to struct tests
1 year ago
ds5678
d75da053a8
Use type hint in pointer arithmetic when appropriate
1 year ago
Siegfried Pammer
ffcd468d22
Fix #1572 : parameters of lambdas and local functions are renamed, if there are with names from outer scopes collisions.
1 year ago
Siegfried Pammer
03aecf047d
Add VariableScope and rework AssignVariableNames step to support renaming parameters of nested ILFunctions in the future.
1 year ago
Siegfried Pammer
ae776716dd
Fix #3181 : missing type information on NullReferenceExpression used with nullable value types.
1 year ago
Siegfried Pammer
7c6f7fea05
Make sure that there is only one applicable implicit conversion when dealing with switch, otherwise use an explicit cast.
1 year ago
Siegfried Pammer
e4285b751b
Fix build.
1 year ago
Siegfried Pammer
efbefd0d3b
Fix #3361 : switch-value conversion was losing its target type.
1 year ago
Siegfried Pammer
8c440f42a8
Fix #2166 : Unnecessary uint casts/conversions for certain bitwise operations
1 year ago
Siegfried Pammer
7b1f8a305c
Implemented support for string concatenation compound assignments involving ReadOnlySpan<char>.
2 years ago
Siegfried Pammer
03a20f3494
Support ILInlining for in parameters
2 years ago
Siegfried Pammer
02d2a8c1f8
Add metadata processing for C# 12 'ref readonly' parameters
2 years ago
Siegfried Pammer
4bf9487ecd
Remove IsRef, IsOut and IsIn flags from IParameter and Replace ParameterModifiers with ReferenceKind.
2 years ago
Siegfried Pammer
972354913e
Fix #3209 : Ensure using directives are added for extension methods in higher level patterns such as: foreach -> GetEnumerator(), collection initializer -> Add() and deconstruction -> Deconstruct().
2 years ago
Siegfried Pammer
eae54ddf24
Fix #3014 : Missing type information in lambda expressions.
2 years ago
Siegfried Pammer
70616b301c
Implement support for C# 11 switch on (ReadOnly)Span<char>.
3 years ago
Daniel Grunwald
03bceed0c1
Fix #2397 : Introduced calls to Unsafe.Read or Unsafe.Write when we would otherwise cause "Cannot declare a pointer to a managed type T" errors.
3 years ago
Siegfried Pammer
bf96482d56
Support decimal constants in pattern matching
3 years ago
Siegfried Pammer
688474facd
Add missing DecompilerSettings for new language features
3 years ago
Siegfried Pammer
8cb3a67c0c
Support recursive pattern for value types
3 years ago
Siegfried Pammer
51a8eb28f1
Add support for var sub patterns.
3 years ago
Siegfried Pammer
3218a06396
Add support for string constant patterns.
3 years ago
Siegfried Pammer
65b4c928c0
Add support for simple constant patterns.
3 years ago
Siegfried Pammer
f7343c75d0
Add support for simple recursive patterns where the sub pattern is a simple type pattern.
3 years ago
Siegfried Pammer
3d8cda5f88
Fix #2613 : Detect pattern matching on variables of generic type with value types.
3 years ago
Siegfried Pammer
13227e433e
Fix compound assignments with local variables.
3 years ago
Daniel Grunwald
b80d20b15d
Add support for calling `operator checked`.
3 years ago
Daniel Grunwald
a2019c5d78
Avoid using `>>>` operator when the context expects a cast to unsigned anyway.
3 years ago
Daniel Grunwald
8b9ba20847
Builtin unsigned right shift operator.
3 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.
3 years ago
Daniel Grunwald
f568123704
Add support for UTF8 string literals
3 years ago
Siegfried Pammer
4d6c5322e9
Fix #2888 : Tuple syntax cannot be used in is-expressions, use underlying type instead.
3 years ago
Daniel Grunwald
747d4c8178
Improve assertion to apply to the C# type instead of the ILAst type
3 years ago
ElektroKill
25873a68e0
Improve support for post-increment/decrement on pointers
3 years ago
Standa Lukeš
93eecf93a5
Add more asserts and ToStrings around the FakeProperty.Setter problem
4 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.
4 years ago
hexafluoride
fc6ae4c645
Add option to always fully qualify type names with global::
4 years ago
Siegfried Pammer
48a8351e27
Use Unsafe.SizeOf when taking the size of a managed type.
4 years ago