Siegfried Pammer
39404d9ea1
Fix unit tests.
4 years ago
Siegfried Pammer
c22977e1be
Fix #2390 : Extend variable splitting to treat stobj as immediate address use.
4 years ago
Daniel Grunwald
109b6d073a
Allow detecting exit points across multiple levels of containers.
4 years ago
Siegfried Pammer
1f0f6404e0
Fix #2231 : Add support for ldloca; dup; initobj pattern used by Roslyn.
4 years ago
Daniel Grunwald
685a79dc31
DetectExitPoints: introduce exit points for loops+switch
...
This allows reverting the changes to HighLevelLoopTransform+ReduceNestingTransform from the previous commit, which fixes a bug in loop detection (the previous commit did not handle loops where the loop BlockContainer didn't have a Block as parent).
4 years ago
Daniel Grunwald
6757295b3b
Fix #2379 : Keep `return` statements around in original form for ConditionDetection, only transform to fall-through block-exit at the end of the transform pipeline.
...
This fixes an issue where `return` statements within try-blocks could turn into `goto` statements.
4 years ago
Siegfried Pammer
ce199fad13
Fixed regression around foreach-on-string introduced in 16134e52e4
4 years ago
Siegfried Pammer
ba39dd5c55
Fix #2354 : decompilation of unary and binary operators with nullable value types.
4 years ago
Daniel Grunwald
407ec6be5b
Adjust AsyncAwaitDecompiler to Roslyn 3.9.0.
4 years ago
Daniel Grunwald
f327668928
Fix #2407 : Operator '-' cannot be applied to operand of type 'nuint'
4 years ago
SilverFox
65ea2e7af6
Fix #2406 : for readonly property with only getter, move readonly to property instead of getter
4 years ago
Siegfried Pammer
d54016ce8f
#2390 : Add support for generic object initializers.
4 years ago
Siegfried Pammer
16134e52e4
Fix #2395 : Do not use for->foreach transform if collection is not an array.
4 years ago
Siegfried Pammer
aa147870a2
Fix #2389 : missing extern keyword for properties and events.
4 years ago
Daniel Grunwald
bd9aabeae2
Update to dotnet-format 5.1.225507.
...
This makes the formatting expected by our CI consistent with that generated by VS2019.9.
4 years ago
Daniel Grunwald
1292ff70d9
Fix #2391 : mark method as unsafe when passing `null` to a parameter of pointer type.
4 years ago
Daniel Grunwald
aae27900dc
Fix #2398 : TranslateCondition: truncate condition value if necessary
4 years ago
Daniel Grunwald
8d70d63dba
#2392 : Avoid some redundant casts with the `?:` operator.
4 years ago
Siegfried Pammer
3f721a17c1
Add support for System.Runtime.CompilerServices.SpecialNameAttribute
4 years ago
Siegfried Pammer
7211587b45
Fix #2366 : NRE in AwaitInCatchTransform.MatchAwaitCatchHandler() and pattern errors when dealing with a switch-based jump table in AwaitInCatchTransform
4 years ago
Siegfried Pammer
76227af89d
Fix #1749 , fix #2339 , fix #2353 : Add support for rethrow in async exception handlers, fix await catch/finally patterns for complex methods.
4 years ago
Siegfried Pammer
d2fc380e0e
Fix #2349 : Use proper ExpressionType with DynamicCompoundAssign.
4 years ago
Siegfried Pammer
4ae41a855e
Fix #2321 : Missing readonly modifier for ref local
4 years ago
Siegfried Pammer
bdff99170c
#1828 : Add test case
4 years ago
Daniel Grunwald
f2d3f259fd
#2311 : Adjust test case for #1292 -- fixed statement is now correctly detected
4 years ago
Daniel Grunwald
51b3cf51c6
Fix #2305 : Cast to integer type where necessary in managed pointer arithmetic.
4 years ago
Daniel Grunwald
b4c5c0d212
Fix #2287 : Prefer `ref target.field[0]` over `ref *target.field`
4 years ago
Daniel Grunwald
281586de1f
`#enable nullable` for a couple of files.
...
Includes some fixes for potential NullReferenceExceptions.
4 years ago
Siegfried Pammer
3b2f00e44f
Add test case.
4 years ago
Daniel Grunwald
3c554b5e6c
Fix overload resolution: overloads with `in` parameters are applicable even if the argument is passed without explicit `in`
4 years ago
Daniel Grunwald
514cf9b03b
Fix #1944 : Add support for implicit conversions with `in` parameters.
4 years ago
Siegfried Pammer
fdda8abd74
Fix #2282 : Finalizers must be void and cannot be declared in interfaces
4 years ago
Siegfried Pammer
f29205448b
Fix #2283 : Disallow all implicit conversions in switch on string.
4 years ago
Siegfried Pammer
63ca748b9a
Fix #2283 : string.to.int instruction entails a conversion to string of the input value
4 years ago
Daniel Grunwald
6951ccb1a2
Fix #2260 : switch(string) transform: handle empty cases where the C# compiler optimizes out the `if`
...
e.g.
```
switch (<PrivateImplementationDetails>.ComputeStringHash(text2))
{
case 1288728352u:
_ = text2 == "rowno";
break;
...
```
4 years ago
Siegfried Pammer
f52ce79da0
Fix #2278 : Implement support for CSharpBinderFlags.InvokeSimpleName
4 years ago
Siegfried Pammer
a5858f1694
Add support for primary constructor syntax.
4 years ago
Siegfried Pammer
cc19e9043e
Fix #603 : Single element arrays should not span multiple lines
...
Fix #1079 : CSharpFormattingOptions.AutoPropertyFormatting has no effect
4 years ago
Siegfried Pammer
3df82cf33b
Add support for 'with' expressions
4 years ago
Daniel Grunwald
be9871981a
Records: Detect compiler-generated Equals() in derived records.
4 years ago
Daniel Grunwald
d9874380cd
Records: support generic records
5 years ago
Daniel Grunwald
0bf6d552e0
Records: support for fields.
5 years ago
Daniel Grunwald
a960216d5f
Add test case for simple records.
5 years ago
Siegfried Pammer
cfaf6cc93f
Fix #2222 : switch-expression does not support implicit conversions.
5 years ago
Daniel Grunwald
411457c4c7
#1240 : Add support for Unsafe comparison intrinsics: `AreSame`, `IsAddressLessThan`, `IsAddressGreaterThan`
5 years ago
Daniel Grunwald
6e8c1b3117
ILReader: support comparison between StackType.Ref and StackType.I
...
Update Unsafe.il tests to .NET 5.0 version.
5 years ago
Daniel Grunwald
782e4ae88c
Fix #2215 : Use `Unsafe` intrinsics for `ldobj`/`stobj` instructions.
...
Use `Unsafe.As` to adjust the type of a managed reference if necessary (without converting to a pointer type).
This also adds support for the `ReadUnaligned`/`WriteUnaligned` intrinsics.
5 years ago
Daniel Grunwald
54231edb4b
Fix #2189 : Invalid C# generated when pinning an unmanaged pointer.
...
C# has some special rules for allowed expressions inside a fixed statement.
In the non-allowed cases, emit an `Unsafe.AsRef()` call to prevent compiler errors.
5 years ago
Siegfried Pammer
b9e4f7df8a
Fix #2202 : prevent casting null to void* if the expected target-type is (U)IntPtr?
5 years ago
Siegfried Pammer
d3b0e4cd72
Fix #2196 : Add support for extern local functions.
5 years ago