Daniel Grunwald
f2151972a0
Redesign CompoundAssignmentInstruction to support an 'Address' mode where we don't implicitly turn an LdObj into an StObj, but instead directly operate on an address.
...
This means we can get rid of the special case in TransformDisplayClassUsage, as compound.assign can now also be used with the address of a local variable.
7 years ago
Siegfried Pammer
19a7898786
Add addressof(ldloc) => ldloca transform to EarlyExpressionTransforms
7 years ago
Siegfried Pammer
01e42b772c
Fix local functions inside lambdas.
7 years ago
Siegfried Pammer
b83cb41f2e
Add pretty tests for local functions.
7 years ago
Siegfried Pammer
305b47245e
Refactor representation of local functions in ILAst.
7 years ago
Siegfried Pammer
b42d4963e7
Fix assertions in TransformExpressionTrees.
7 years ago
Siegfried Pammer
16d6e16da7
Add support for local function references and recursive local functions.
7 years ago
Daniel Grunwald
a6def4cdf5
Fix incorrect type for numeric.compound.assign when the pointer type is incompatible with the store type.
...
Closes #1511 , #1530 , #1533 .
7 years ago
Daniel Grunwald
ed5d71b365
Fix #1537 : KeyNotFoundException in ReduceNestingTransform.ReduceSwitchNesting()
7 years ago
Siegfried Pammer
119c679fad
Add addressof(ldloc V) => ldloca V transform for read access on value types.
7 years ago
Siegfried Pammer
8d1522f387
Transform display classes used in local functions.
7 years ago
Daniel Grunwald
3314f3f37a
Fix #1571 : Expression transforms not running for values of inline assignments.
7 years ago
Siegfried Pammer
15488acdc7
Fix #1559 : switch on string inside try block.
7 years ago
Siegfried Pammer
6d05f36821
Fix #1562 : Do not transform display class initialization to object initializer.
7 years ago
Siegfried Pammer
b4a59ae4dd
Remove obsolete code from DelegateConstruction.cs
7 years ago
Siegfried Pammer
c1ac461c26
Enable MCS yield return pretty tests.
7 years ago
Siegfried Pammer
7f8856b10f
Fix #1026 : Improve support for mcs in TransformDisplayClassUsage
7 years ago
Siegfried Pammer
6a1229028c
Only try to inline stackalloc Span<T> if the next statement is a plain assignment.
7 years ago
Siegfried Pammer
9590cfbf59
Update tests to latest Roslyn implementation.
7 years ago
Siegfried Pammer
5a2302089b
Refactor TransformDisplayClassUsage into separate transform.
...
Make display class detection pattern-based instead of name-based. Fixes #1554
7 years ago
Siegfried Pammer
bd77b8301f
Basic implementation of local functions.
7 years ago
Siegfried Pammer
cf7deca7e1
Fix build.
7 years ago
Siegfried Pammer
34098b16e8
Fix #1548 : Detection of lambdas.
7 years ago
Daniel Grunwald
ab4e05f783
Don't perform DetectCatchWhenConditionBlocks transform when catchBlock.Variable.Type setter would throw an exception due to differing stack types.
7 years ago
Daniel Grunwald
877780beb5
Fix ReduceNestingTransform bug introduced in commit 7f27768ff9
7 years ago
Daniel Grunwald
7f27768ff9
Fix #1391 , #1393 , #1458 : Fix ReduceNestingTransform modifying the Blocks collection while iterating over it.
7 years ago
Siegfried Pammer
f7641037a2
Fix #1526 : Roslyn-optimized switch at end of method uses leave instead of br.
7 years ago
Siegfried Pammer
0e638dcb28
Fix #1524 : Adjust expression trees transform to work with async code as well.
7 years ago
Siegfried Pammer
c6f4f77b57
Reorder code in NullCoalescingTransform.cs
7 years ago
Daniel Grunwald
961923f4fd
#1499 , #1240 : Translate pointer arithmetic on managed pointers (ref T) using the System.Runtime.CompilerServices.Unsafe intrinsics
7 years ago
Siegfried Pammer
7a976f197f
Fix #1500 : anonymous type creation expression cannot have an object initializer.
7 years ago
Siegfried Pammer
edcf4931d0
Fix #1489 : ArgumentNullException in SwitchOnStringTransform.SimplifyCascadingIfStatements
7 years ago
Siegfried Pammer
8dc80583ec
#1485 : Fix decompilation of TypeAs with Nullable<T> in expression trees
7 years ago
Siegfried Pammer
b03aa488aa
Performance: Cache ChainedConstructorCallILOffset in ILFunction to avoid having to scan the method body in every inlining step. Take a shortcut for static ctors, as there cannot be chained ctor calls in static ctors.
7 years ago
Siegfried Pammer
63646b0ace
Fix #1472 : Apply ExpressionTransforms after CombineExitsTransform to "canonicalize logic and/or"
7 years ago
Daniel Grunwald
8d99af14c5
Add support for 'ref readonly' return type.
7 years ago
Daniel Grunwald
416425b681
Readonly struct method calls on readonly lvalues don't generate temporaries.
7 years ago
Siegfried Pammer
d4d647bbad
Fix #1455 : NRE in MatchRoslynSwitchOnNullable
7 years ago
Daniel Grunwald
4ad4f6a232
Fix #882 : Don't inline value-type temporaries for setter calls.
7 years ago
Daniel Grunwald
a5505ab00d
Expose IMethod.AccessorKind. This makes it easier to determine if a method is a setter, particular in generic classes where "m.AccessorOwner?.Setter == m" ended up being wrong.
7 years ago
Siegfried Pammer
eed690a0fc
Fix #1449 : Fix error message typo.
7 years ago
Daniel Grunwald
40b6f0c7bf
Use appropriate type for helper variables introduced for named arguments.
7 years ago
Siegfried Pammer
b0309ca9e3
Fix #1180 : Fix generation of Windows Forms InitializeComponent.
7 years ago
Daniel Grunwald
4987f78d21
Limit the number of instructions validated for the $"{transform.GetType().Name} modified an instruction before pos" assertion; this makes debug-mode performance less horrible.
7 years ago
Daniel Grunwald
eb942b4a21
Fix #1430 : Improve performance in ILInlining.
7 years ago
Siegfried Pammer
1c261c6170
Optimize ProxyCallReplacer: ignore calls to static methods as those can never be a call to a proxy.
...
Enable FixProxyCalls test for rosyln+opt
7 years ago
Siegfried Pammer
5dfc6132d9
Fix #1443 : ProxyCallReplacer replacing non-proxy-calls with arbitrary calls.
7 years ago
Siegfried Pammer
7671ac6fe4
Fix switch on nullable for Roslyn. Ignore switch on bool because it is indistinguishable from if (bool).
7 years ago
Siegfried Pammer
6e49efd5aa
Extend ILInlining to work with StringToInt instructions inside Switch instruction.
7 years ago
Siegfried Pammer
9c62f11e51
Add new switch(string) pattern for Roslyn.
7 years ago