Daniel Grunwald
1d684102ac
Support compound assignment for native integers.
6 years ago
Daniel Grunwald
62fcab8d99
#2050 : Allow inlining into the StObj target slot when this is possible without changing the program semantics.
6 years ago
Daniel Grunwald
925a4e1e65
#2050 : Don't put ldflda/ldelema with immediate exceptions into StObj.TargetSlot.
...
The C# translation of StObj will always apply delayed exceptions in these two cases, so putting an instruction with delayed exceptions in that slot would change program semantics.
6 years ago
Daniel Grunwald
c1265ad830
Fix #1946 : Don't move `return` into `try` block when doing so changes the semantics of a `finally` block.
6 years ago
Siegfried Pammer
73e0f7c3ac
Fix #1936 : TransformDisplayClassUsage should remove copies of display-class references.
6 years ago
Siegfried Pammer
60490a4369
#1869 : Add correctness test case
6 years ago
Daniel Grunwald
b9675f58b3
Fix #1865 : At least one of the first two operands in string concatenation needs to be of type `string`, so we can't always drop `ToString()` calls.
6 years ago
Daniel Grunwald
a1c211f326
Fix #1794 : Avoid extra cast to double for ulong -> float conversion
6 years ago
Daniel Grunwald
968fe1468f
Fix #1747 : Stack overflow when decompiling a `bool` -> `bool?` conversion.
6 years ago
Daniel Grunwald
080f63e660
Fix LambdaResolveResult.IsValid() being too restrictive.
...
This could cause our overload resolution to consider an overload as not-applicable when it actually is applicable. This could cause us to miss some cases where we need to insert casts.
6 years ago
Daniel Grunwald
1d95eb60a2
Fix #1680 : Invalid cast `(uint?)-1`
6 years ago
Daniel Grunwald
4b90e43187
Avoid making explicit ToString() implicit when doing so changes the semantics for mutable value types.
6 years ago
Daniel Grunwald
7a5d8af57d
#1691 : Further improvements for decompiling the new VS 2019.3 string concatenation IL pattern
6 years ago
Daniel Grunwald
c32361d464
#1691 : Avoid replacing string.Concat() with operator+ when the evaluation order depends on the compiler version.
6 years ago
Daniel Grunwald
fb70a2861e
Fix #1656 : Disable CopyPropagation for split variables.
...
The code reordering done by copy propagation could cause the lifetimes of different parts of a split variable to start overlapping. This caused incorrect C# to be generated when the variable was recombined.
6 years ago
Siegfried Pammer
e9a020062d
Add more RefLocalsAndReturns pretty tests.
7 years ago
Siegfried Pammer
b83cb41f2e
Add pretty tests for local functions.
7 years ago
Daniel Grunwald
688dffff2b
Add some string.Concat()-tests
7 years ago
Siegfried Pammer
29527b804e
Fix #1392 : LoopDetection should take switch block containers into account in IncludeNestedContainers.
7 years ago
Siegfried Pammer
8480acf9e5
Add StackTests.il test case.
7 years ago
Daniel Grunwald
ba8b453b36
Fix #1404 : local variables with init flag are not declared in the correct scope
7 years ago
Siegfried Pammer
64686b9547
Fix #1336 : multi-dimensional array initializers with custom objects not detected.
7 years ago
Siegfried Pammer
cbd824b07e
Move array initializer tests from correctness to pretty tests, so that misdetections can be spotted.
7 years ago
Daniel Grunwald
e990d5ac00
Revert the 'unwrapBoxingConversion' addition to TranslateTarget(), I ended up solving the boxing issue directly in HandleDelegateConstruction()
7 years ago
Daniel Grunwald
b455286ad3
Fix #1333 : Ensure we convert to the correct type when calling instance methods on value types
7 years ago
Daniel Grunwald
4e9121bd28
Add test case for #1304 .
7 years ago
Daniel Grunwald
e041454987
Add pretty tests for "yield return" and fix some minor bugs:
...
* remove redundant casts on yield-return-expression
* keep variable name from metadata for foreach loops
* fix 'yield break;' in nested try-finally sometimes causing a decompiler error
7 years ago
Siegfried Pammer
c9b74865fc
Fix #1281 : Fix CallBuilder: use expanded form only if overload resolution allows it.
7 years ago
Siegfried Pammer
cf1d05042f
Add detection of local functions, so we do not hide the methods/display classes.
8 years ago
Siegfried Pammer
a823d74004
Use overload resolution to ensure we call the correct indexer + added tests.
8 years ago
Daniel Grunwald
75a627d40b
Don't use compound assignment when the RHS value does not fit into the LHS type.
8 years ago
Daniel Grunwald
80e191ae03
Fix missing 'base.' qualifier on non-virtual call to virtual base method.
8 years ago
Siegfried Pammer
57d59a703e
Fix await in finally pattern with using statement.
8 years ago
Siegfried Pammer
704eec86ae
Add basic unit tests for ref returns, locals and conditional
8 years ago
Siegfried Pammer
96ddabed57
Fix bug in AwaitInFinallyTransform
8 years ago
Siegfried Pammer
adda97cf84
Add AwaitInFinallyTransform
8 years ago
Siegfried Pammer
9b665b7cbc
Add AwaitInCatchTransform
8 years ago
Siegfried Pammer
b400d89f57
Fix #1076 ; improve detection of mcs switch-on-string pattern
8 years ago
Siegfried Pammer
7544eac5b4
Add support for mcs 2.6.4 switch-on-string
8 years ago
Daniel Grunwald
eb6119eb7d
Only use mcs for the first compilation pass. Consistently run test cases using .NET 4.x runtime.
8 years ago
Daniel Grunwald
3fae36dab9
Use mcs for correctness tests.
8 years ago
Daniel Grunwald
971e36e7f0
Fix indentation
8 years ago
Daniel Grunwald
ca0fa55af8
Implement null propagation transform.
8 years ago
Daniel Grunwald
87a03bde70
Add test case for #981 , and fix decompilation of ?: operator on StackType.Ref (necessary to make the testcase compile).
8 years ago
Siegfried Pammer
d412de58b9
Commit first test case.
8 years ago
Siegfried Pammer
31f791cc2f
Add negative test-case to Correctness/ExpressionTrees.cs
8 years ago
Siegfried Pammer
648e4ec42a
First implementation of TransformExpressionTrees
8 years ago
Siegfried Pammer
300c9cc9a9
Do not convert while-true to while-condition loop or do-while loop, if the condition uses a variable that is captured inside the loop.
8 years ago
Daniel Grunwald
f155ca4ef6
Fix #938 : add support for I4->I stack type adjustments.
...
With this fix we still only propagate type information along forward branches, so some of the issues in #901 remain.
8 years ago
Daniel Grunwald
e6afe4bf98
Fix #915 : ensure that loops are nested correctly
8 years ago