Daniel Grunwald
040ab41c69
Initial implementation of the pattern matching transform.
5 years ago
Siegfried Pammer
39404d9ea1
Fix unit tests.
5 years ago
Siegfried Pammer
c22977e1be
Fix #2390 : Extend variable splitting to treat stobj as immediate address use.
5 years ago
Daniel Grunwald
109b6d073a
Allow detecting exit points across multiple levels of containers.
5 years ago
Siegfried Pammer
1f0f6404e0
Fix #2231 : Add support for ldloca; dup; initobj pattern used by Roslyn.
5 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).
5 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.
5 years ago
Siegfried Pammer
ce199fad13
Fixed regression around foreach-on-string introduced in 16134e52e4
5 years ago
Siegfried Pammer
ba39dd5c55
Fix #2354 : decompilation of unary and binary operators with nullable value types.
5 years ago
Daniel Grunwald
407ec6be5b
Adjust AsyncAwaitDecompiler to Roslyn 3.9.0.
5 years ago
Daniel Grunwald
f327668928
Fix #2407 : Operator '-' cannot be applied to operand of type 'nuint'
5 years ago
SilverFox
65ea2e7af6
Fix #2406 : for readonly property with only getter, move readonly to property instead of getter
5 years ago
Siegfried Pammer
d54016ce8f
#2390 : Add support for generic object initializers.
5 years ago
Siegfried Pammer
16134e52e4
Fix #2395 : Do not use for->foreach transform if collection is not an array.
5 years ago
Siegfried Pammer
aa147870a2
Fix #2389 : missing extern keyword for properties and events.
5 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.
5 years ago
Daniel Grunwald
1292ff70d9
Fix #2391 : mark method as unsafe when passing `null` to a parameter of pointer type.
5 years ago
Daniel Grunwald
aae27900dc
Fix #2398 : TranslateCondition: truncate condition value if necessary
5 years ago
Daniel Grunwald
8d70d63dba
#2392 : Avoid some redundant casts with the `?:` operator.
5 years ago
Siegfried Pammer
7211587b45
Fix #2366 : NRE in AwaitInCatchTransform.MatchAwaitCatchHandler() and pattern errors when dealing with a switch-based jump table in AwaitInCatchTransform
5 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.
5 years ago
Siegfried Pammer
d2fc380e0e
Fix #2349 : Use proper ExpressionType with DynamicCompoundAssign.
5 years ago
Siegfried Pammer
4ae41a855e
Fix #2321 : Missing readonly modifier for ref local
5 years ago
Siegfried Pammer
bdff99170c
#1828 : Add test case
5 years ago
Daniel Grunwald
51b3cf51c6
Fix #2305 : Cast to integer type where necessary in managed pointer arithmetic.
5 years ago
Daniel Grunwald
b4c5c0d212
Fix #2287 : Prefer `ref target.field[0]` over `ref *target.field`
5 years ago
Daniel Grunwald
281586de1f
`#enable nullable` for a couple of files.
...
Includes some fixes for potential NullReferenceExceptions.
5 years ago
Siegfried Pammer
3b2f00e44f
Add test case.
5 years ago
Daniel Grunwald
514cf9b03b
Fix #1944 : Add support for implicit conversions with `in` parameters.
5 years ago
Siegfried Pammer
fdda8abd74
Fix #2282 : Finalizers must be void and cannot be declared in interfaces
5 years ago
Siegfried Pammer
f29205448b
Fix #2283 : Disallow all implicit conversions in switch on string.
5 years ago
Siegfried Pammer
63ca748b9a
Fix #2283 : string.to.int instruction entails a conversion to string of the input value
5 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;
...
```
5 years ago
Siegfried Pammer
f52ce79da0
Fix #2278 : Implement support for CSharpBinderFlags.InvokeSimpleName
5 years ago
Siegfried Pammer
a5858f1694
Add support for primary constructor syntax.
5 years ago
Siegfried Pammer
cc19e9043e
Fix #603 : Single element arrays should not span multiple lines
...
Fix #1079 : CSharpFormattingOptions.AutoPropertyFormatting has no effect
5 years ago
Siegfried Pammer
3df82cf33b
Add support for 'with' expressions
5 years ago
Daniel Grunwald
be9871981a
Records: Detect compiler-generated Equals() in derived records.
5 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
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
Siegfried Pammer
be57dc454c
Run tests with different versions of Roslyn
5 years ago
Daniel Grunwald
03787bfc70
Avoid parentheses around lambdas where possible.
5 years ago
Siegfried Pammer
e5b0004d1c
Fix build
5 years ago
Siegfried Pammer
8e9ecf6c36
Fix #2162 : handle VariableInitializers like AssignmentExpressions in InsertParenthesesVisitor
5 years ago
Daniel Grunwald
6d3239678c
Function pointers: add support for the builtin unmanaged calling conventions.
5 years ago
Daniel Grunwald
a26a25d689
Fix #2158 : Remove PointerType support from CSharpResolver for additions/subtractions.
...
These have special semantics (number of elements in C# vs. number of bytes in IL), and so pointer arithmetic must go through the special HandlePointerArithmetic() code path --> the normal logic in HandleBinaryNumeric must not ever emit pointer arithmetic.
5 years ago