Daniel Grunwald
103a6461e4
Relax ExpressionBuilder invariant for lifted instructions with unknown result type.
5 years ago
Daniel Grunwald
9381be2280
#2158 : Fix decompilation of arithmetic on managed pointers after ConversionKind.StartGCTracking.
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
Siegfried Pammer
813cd1842f
#2156 : Enforce string type of string.to.int argument.
5 years ago
Siegfried Pammer
13636c89cc
Add support for C# 9: foreach with GetEnumerator extension methods.
5 years ago
Siegfried Pammer
9afbcba79a
Fix #1796 : Use hexadecimal literals with bitwise operators.
5 years ago
Daniel Grunwald
d13a8bb64d
Support `ldftn` in the context of a function pointer.
5 years ago
Daniel Grunwald
3831b42197
Properly support `calli` instruction and its interaction with function pointer types.
5 years ago
Daniel Grunwald
cabb02b5fd
Add support for decoding function pointer types in signatures.
5 years ago
Siegfried Pammer
d8b1f1f8d2
Fix #2039 : "Could not convert BlockContainer to single expression" workaround produces uncompilable code - potentially unassigned variables.
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
5 years ago
Siegfried Pammer
55842e4bfc
Fix #2120 : An expression tree may not contain a base access
5 years ago
Jesse Plamondon-Willard
1391e43d58
Add option to always qualify member references
5 years ago
Siegfried Pammer
52e633fdbd
#2100 : clean up
5 years ago
Siegfried Pammer
36a432940b
Fix #2100 : 'value'-named auto property could not be recognized correctly.
5 years ago
Siegfried Pammer
1ecf489597
Add support for deconstruction to fields
5 years ago
Siegfried Pammer
a549b03bea
Implement ref local assignments
5 years ago
Siegfried Pammer
9cb3fe3484
Add support for basic deconstruction conversions
5 years ago
Siegfried Pammer
b435c07f4d
Added support for deconstruction assignments to properties
5 years ago
Daniel Grunwald
3e6e628483
Fix missing conversion on ref-reassignment.
5 years ago
Daniel Grunwald
440ef75898
Avoid pointless UnknownType->object->UnknownType casts.
5 years ago
Daniel Grunwald
c6b10d3ec3
Fix #2094 : ByteOffset() arguments passed in wrong order
5 years ago
Daniel Grunwald
abb9d49a0f
Add support for C# 8 switch expressions.
5 years ago
Siegfried Pammer
3f10294a72
Add DeconstructionTransform + implement DeconstructInstruction in ExpressionBuilder
5 years ago
Siegfried Pammer
18ace00266
Refactor LocalFunctionDeclarationStatement + LocalFunctionMethod
5 years ago
Daniel Grunwald
1d684102ac
Support compound assignment for native integers.
5 years ago
Daniel Grunwald
59be020dea
Fix pointer arithmetic with `nint*`/`nuint*`.
5 years ago
Daniel Grunwald
8f6bf3b45b
Simplify TranslateArrayIndex.
5 years ago
Daniel Grunwald
dc3dd193c8
Support unary operators on native integers.
5 years ago
Daniel Grunwald
a7826e399e
Fix native integer shifts.
5 years ago
Daniel Grunwald
3a4db502bc
Add support for arithmetic using C# 9 native integer types.
5 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
5 years ago
Daniel Grunwald
016d9f8f4d
Fix #1903 : un-inline argument of unsupported `isinst` instructions.
5 years ago
Daniel Grunwald
a0b144d332
Use `Unsafe.AsPointer()` for `ConversionKind.StopGCTracking`.
5 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.
5 years ago
Daniel Grunwald
2c0554f129
Fix #1963 : Support decompiling `calli` instructions into C# 9 function pointer syntax.
5 years ago
Siegfried Pammer
3e4091442d
Simplify ExpressionBuilder.ConvertField.IsUnambiguousAccess by renaming it to ExpressionBuilder.ConvertField.IsAmbiguousAccess
5 years ago
Daniel Grunwald
b7754cdf5c
Workaround dotnet/roslyn#43659 in decompiled code.
5 years ago
Daniel Grunwald
dc6e094a30
Add support for indexing arrays using System.Index
5 years ago
Siegfried Pammer
8925b4ff7b
Inline variable declarations/modernize parts of our code base.
5 years ago
Siegfried Pammer
7c7328df32
Fix #1955 : struct 'base' access to ValueType mis-decompiles
5 years ago
Siegfried Pammer
69cad7527e
Fix #1945 , fix #1851 : NRE when generating sequence points for a method containing a stackalloc expression.
5 years ago
Siegfried Pammer
df84ab8f6b
Fix #1882 : Provide a setting to desugar X? into Nullable<X> for value types
5 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