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
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
305b47245e
Refactor representation of local functions in ILAst.
7 years ago
Siegfried Pammer
8d1522f387
Transform display classes used in local functions.
7 years ago
Siegfried Pammer
03e45fc80a
Fix #1568 : Mimic behavior of ILReader.CreateILVariable in case of empty parameter names of anonymous methods.
7 years ago
Siegfried Pammer
09ea089d8a
Fix #1499 , fix #1502
7 years ago
Siegfried Pammer
983b7e5280
Add test-case for #1462
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
MCpiroman
5b41cc2b60
Fix TryUniteEqualityOperandType
7 years ago
MCpiroman
ff4812dda8
Fix #1462 : Inconsistent enum flag check
7 years ago
Daniel Grunwald
f7f657204e
Fix #1447 : Assertion on `numeric.compound.add.old(..., ldc.i8 1)`
7 years ago
Siegfried Pammer
859eb623b8
Fix #1439 : Add DecompilerSettings.UseLambdaSyntax
7 years ago
Daniel Grunwald
72508b5777
Add test for C# 8 nullable reference types; and fix some bugs.
7 years ago
Siegfried Pammer
27efe1b61c
Fix #1429 : Optimize ExpressionBuilder.TranslateArrayInitializer by applying optimizations suggested in #1202 .
7 years ago
Siegfried Pammer
5962d4675f
Add IL tests for basic isinst patterns. Undo change mentioned in 54ff546221 (commitcomment-32359757)
7 years ago
Siegfried Pammer
54ff546221
Fix deactivated Generics pretty tests: remove redundant boxing conversion from is-expressions.
7 years ago
Siegfried Pammer
c1fca21e8a
Make ILRange field private - introduce public API for IL range manipulation.
7 years ago
Daniel Grunwald
2eafa0c695
Fix #1389 : Translation of "isinst" was incorrect for value types was causing an assertion.
7 years ago
Daniel Grunwald
976565264f
Don't use casts for implicit conversions to bool in conditional contexts.
7 years ago
Daniel Grunwald
7a058f6262
First attempt at integrating C# nullable reference types into the type system.
7 years ago