Siegfried Pammer
18ace00266
Refactor LocalFunctionDeclarationStatement + LocalFunctionMethod
6 years ago
Daniel Grunwald
1d684102ac
Support compound assignment for native integers.
6 years ago
Daniel Grunwald
59be020dea
Fix pointer arithmetic with `nint*`/`nuint*`.
6 years ago
Daniel Grunwald
8f6bf3b45b
Simplify TranslateArrayIndex.
6 years ago
Daniel Grunwald
dc3dd193c8
Support unary operators on native integers.
6 years ago
Daniel Grunwald
a7826e399e
Fix native integer shifts.
6 years ago
Daniel Grunwald
3a4db502bc
Add support for arithmetic using C# 9 native integer types.
6 years ago
Daniel Grunwald
5a8cfc25ba
Add some tests for native integers.
...
The conversion roundtrip tests are disabled due to https://github.com/dotnet/roslyn/issues/45929
6 years ago
Daniel Grunwald
016d9f8f4d
Fix #1903 : un-inline argument of unsupported `isinst` instructions.
6 years ago
Daniel Grunwald
a0b144d332
Use `Unsafe.AsPointer()` for `ConversionKind.StopGCTracking`.
6 years ago
Daniel Grunwald
a9d643b208
Emit a call to `ref Unsafe.As<TFrom, TTo>(ref TFrom)` when the IL code contains a mismatch of managed reference types.
...
The previously emitted `ref *(TTo*)(&source)` only compiles when `source` is a local variable; otherwise C# complains about the memory not being pinned.
Note that we special-case local variables to keep the previous behavior around; this avoids pulling in `System.Runtime.CompilerServices.Unsafe.dll` when it's unnecessary.
6 years ago
Daniel Grunwald
2c0554f129
Fix #1963 : Support decompiling `calli` instructions into C# 9 function pointer syntax.
6 years ago
Siegfried Pammer
3e4091442d
Simplify ExpressionBuilder.ConvertField.IsUnambiguousAccess by renaming it to ExpressionBuilder.ConvertField.IsAmbiguousAccess
6 years ago
Daniel Grunwald
b7754cdf5c
Workaround dotnet/roslyn#43659 in decompiled code.
6 years ago
Daniel Grunwald
dc6e094a30
Add support for indexing arrays using System.Index
6 years ago
Siegfried Pammer
8925b4ff7b
Inline variable declarations/modernize parts of our code base.
6 years ago
Siegfried Pammer
7c7328df32
Fix #1955 : struct 'base' access to ValueType mis-decompiles
6 years ago
Siegfried Pammer
69cad7527e
Fix #1945 , fix #1851 : NRE when generating sequence points for a method containing a stackalloc expression.
6 years ago
Siegfried Pammer
df84ab8f6b
Fix #1882 : Provide a setting to desugar X? into Nullable<X> for value types
6 years ago
Siegfried Pammer
e2b10adc72
Fix #1927 : NRE in ExpressionBuilder when trying to decompile catch-when blocks consisting of multiple statements.
6 years ago
Siegfried Pammer
6973dec0ef
Fix #1906 : RRs for default expressions of primitive types should use the correct constant value.
...
VB's `New Long()` is emitted as `initobj` whereas C#'s `default(long)` is emitted as `ldc.i4.0; conv.i8`.
6 years ago
Siegfried Pammer
d3d5d9e15d
Fix #1807 : Add MemberResolveResult to ldlen if System.Array.Length/LongLength is available
6 years ago
Daniel Grunwald
be28469ea3
Add back replacing `a & b` with `a && b` for booleans.
...
Now as part of ExpressionBuilder, not as a transform, because doing this too early interferes with `a &= b` compound assignments.
6 years ago
SilverFox
5e6fecebf5
Rework support for generic local function, and fix tests `LocalFunctions.Generic.Test_CaptureT` and `LocalFunctions.Generic.TestGenericArgs`
6 years ago
SilverFox
f039705704
Add support for generic local function
6 years ago
Siegfried Pammer
64b9511aca
#1749 : Represent multi-instruction BlockContainers in expression-context as inlined delegate invocation.
6 years ago
Siegfried Pammer
6e4db66b61
Fix CA1825:AvoidZeroLengthArrayAllocations, use Empty<T>.Array consistently.
6 years ago
Chicken-Bones
661acdfc08
Transform post-increment on float/double. Fixes #1764
6 years ago
Siegfried Pammer
83c525c1c2
Fix #1758 : Input var name conflicting with framework class name
6 years ago
Daniel Grunwald
7a5d8af57d
#1691 : Further improvements for decompiling the new VS 2019.3 string concatenation IL pattern
6 years ago
Siegfried Pammer
9fff0438c0
Fix #1675 : Emit __ldftn/__ldvirtftn pseudo expressions, if delegate construction is not supported.
6 years ago
Siegfried Pammer
d2f7258347
Fix #1681 : Use discard assignment, if possible.
6 years ago
Daniel Grunwald
57b725df79
Fix #1655 : Incorrect pointer cast when calling method on integer constant
6 years ago
Siegfried Pammer
84b9f1c4f4
Fix #1514 : Allow StackType.I8 and StackType.I4 in HandleManagedPointerArithmetic (ref [+-] int).
7 years ago
Siegfried Pammer
f49cc11c76
Fix #1627 : Allow constants as targets of dynamic calls.
7 years ago
Daniel Grunwald
62a0046043
Fix #1371 : assertion on invalid I4->O conversion.
7 years ago
Siegfried Pammer
ec18094c65
Implement transformation of delegate construction with ldvirtftn.
7 years ago
Siegfried Pammer
2e6a4988d3
Fix #1594 : Use Equals to compare generic IMethods.
7 years ago
Daniel Grunwald
5c18c9e945
Floating-point arithmetic isn't affected by checked/unchecked blocks; so avoid forcing it into an unchecked block.
7 years ago
Siegfried Pammer
7d4b4c6433
Implement NullCoalescingTransform with value types.
7 years ago
Siegfried Pammer
2b6c0c3892
Fix formatting in ExpressionBuilder.
7 years ago
Daniel Grunwald
60422a0f7e
Fix ResolveResult on typeof() expression.
7 years ago
Daniel Grunwald
d99f6c81a5
Fix #1595 : preserve C# type for field and tuple element access
7 years ago
Siegfried Pammer
9c1bf7fbdf
Introduce ReferenceKind in IParameter and ByReferenceResolveResult.
7 years ago
Daniel Grunwald
42eafb587f
Fix #684 : Improve detection of variable type for stack slots.
7 years ago
Daniel Grunwald
856cedc95e
#1456 : add test case; add additional checks to ensure we only transform normal locals into using/foreach-locals
7 years ago
Siegfried Pammer
f10ab69328
Improve local-function detection to minimize false positives.
7 years ago
Siegfried Pammer
a109b77858
Refactor LocalFunctionDecompiler to allow mutually recursive local functions to be decompiled correctly.
7 years ago
Siegfried Pammer
37e14f43e3
Refactor/Clean up local functions representation in type system.
7 years ago
Daniel Grunwald
b32cae412a
Eliminate BlockKind.PostfixOperator.
...
We can now represent all compound assignments using the CompoundAssignInstruction, including those on local variables.
Closes #1583 .
7 years ago