dymanoid
b492a20442
Move assembly resolution logic to better place
...
WholeProjectDecompiler shall not care about checking whether an assembly
is in GAC.
5 years ago
dymanoid
a952cda502
Create dedicated namespace for project decompiler
5 years ago
Siegfried Pammer
b114734128
Add Mode.UnconstrainedType and implement TransformNullPropagationOnUnconstrainedGenericExpression using TryNullPropagation.
5 years ago
Daniel Grunwald
b7754cdf5c
Workaround dotnet/roslyn#43659 in decompiled code.
5 years ago
Daniel Grunwald
c1265ad830
Fix #1946 : Don't move `return` into `try` block when doing so changes the semantics of a `finally` block.
5 years ago
Daniel Grunwald
2665d800d0
Update test to Roslyn 3.6.0-3.final.
5 years ago
Daniel Grunwald
1926756cfa
Handle the special cases where the range does not have a start or endpoint.
5 years ago
Daniel Grunwald
0dd75d6852
Add support for slicing using C# 8 ranges.
5 years ago
Daniel Grunwald
dc38355e12
Support `list[^idx]`.
...
Here the C# compiler does not actually create a `System.Index` instance, but instead compiles to `list[list.Count - idx]`.
5 years ago
Daniel Grunwald
12226c5f90
Add support for indexing a container with a System.Index instance.
5 years ago
Daniel Grunwald
748c54a1c1
Support array slicing.
5 years ago
Daniel Grunwald
dc6e094a30
Add support for indexing arrays using System.Index
5 years ago
Daniel Grunwald
4846feb640
Add support for C# 8 range syntax.
...
This initial commit only handles the trivial case where an Index or Range object is constructed.
The TODO portions of the test case show there are plenty of cases where where the C# compiler emits more complex code patterns that will require ILAst transforms.
5 years ago
Daniel Grunwald
5ad7ee0cea
Fix #1629 : Add support for `[module: NullablePublicOnly]`
...
If this attribute is in use, private/internal members lack nullability annotations.
Previously in such cases, we ended up inheriting the nullability from the `[NullableContext]`, which could cause us to display a misleading nullability for primary methods.
In debug builds, it could also trigger an assertion when trying to apply the "nullable reference type" marking to to value types.
Of note is that properties and events are a special case: they do not explicitly store Accessibility in metadata. For properties computing the accessibility requires decoding the signature (to find overridden base properties). So these two only check the declaring type's accessibility instead; private properties may still carry nullability despite `[NullablePublicOnly]`. However, the property accessors won't store nullability, so we need to read the `returnTypeAttributes` from the property itself.
5 years ago
Siegfried Pammer
199d38b85a
Add more test cases
5 years ago
Daniel Grunwald
65fe59e393
#1918 : Fix a bunch of issues with pinned region detection.
...
Not every pinned region has a clean `P = null` assignment to mark its end.
If a second pinned region starts with the same variable `P`, consider that to mark the end of the previous pinned region for that variable.
Also, fix a bunch of special cases with empty pinned regions.
5 years ago
Daniel Grunwald
0cf50aa827
Fix #1959 : Resolve the "F(G<A,B>(7));" grammar ambiguity by inserting parentheses when necessary.
5 years ago
Siegfried Pammer
371d732c0a
Fix #1881 : Not properly reusing names from PDB#2
5 years ago
Siegfried Pammer
7c7328df32
Fix #1955 : struct 'base' access to ValueType mis-decompiles
5 years ago
Siegfried Pammer
a7d1d8fad7
TransformNullPropagationOnUnconstrainedGenericExpression: handle pattern that uses leave instructions instead of stloc into a temporary.
5 years ago
Daniel Grunwald
3bf9f7c301
Fix #1943 : "ref readonly" returns from properties/indexers
5 years ago
Siegfried Pammer
a49f55ad8a
Fix build
5 years ago
Siegfried Pammer
73e0f7c3ac
Fix #1936 : TransformDisplayClassUsage should remove copies of display-class references.
5 years ago
Daniel Grunwald
ad5ba9295e
Fix #1924 : preserve hexadecimal format when converting literal to wider type
5 years ago
Daniel Grunwald
4b1f0b342c
Fix #1925 : Adjust AsyncAwaitDecompiler to changes in Roslyn 3.5.0-beta2
5 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`.
5 years ago
Siegfried Pammer
60490a4369
#1869 : Add correctness test case
5 years ago
Siegfried Pammer
f831e4713f
Fix #1867 : Captures of copies of this are not properly handled by the decompiler
5 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.
5 years ago
Daniel Grunwald
bbb2397083
Fix #1853 : Detect pinning of multi-dimensional array
5 years ago
Siegfried Pammer
e189ad9ca3
Fix #1863 : Invalid decompilation: accessibility level for CompilerGenerated method
5 years ago
Daniel Grunwald
e9eac88dc8
Comment out failing test case -- the get.pinnable.reference transform isn't ready yet
6 years ago
Daniel Grunwald
eb2a9e6b94
#1852 : Rename array.to.pointer opcode to get.pinnable.reference.
6 years ago
SilverFox
5914d5b96b
Fix #1854
6 years ago
Christoph Wille
fe224ece49
Retarget .NET Core tests from 3.0 to 3.1
6 years ago
Daniel Grunwald
703d21bafa
Support C# 7.3 pattern-based fixed statement.
6 years ago
Daniel Grunwald
832c18f0be
Fix #1809 : Support VB Select on string.
6 years ago
Daniel Grunwald
42f71b56f6
Fix #1811 : Assert in NullCoalescingInstruction.CheckInvariant after expression tree transform
6 years ago
Siegfried Pammer
51cf7e7c34
#1837 Add combined test with tuples, dynamic and nullability
6 years ago
Siegfried Pammer
b836f0b859
Fix #1837 : auto events with tuples are not recognized.
6 years ago
Daniel Grunwald
93806b46fa
Fix compound assignments with type `bool`.
...
This required removing the "Replace bit.and with logic.and" transform, as it interfered with the compound assignment transform.
6 years ago
Siegfried Pammer
e146f8a492
Fix #1829 : Fix decompilation of optional `in` parameters.
6 years ago
SilverFox
a5d85fea3f
Add an workaround for #1798
6 years ago
SilverFox
14cd09d7bc
Update some tests, and add some limited descributed in PR to tests(disabled)
6 years ago
SilverFox
22daaa3572
Enable static local functions and update related tests, since roslyn 3.4.0-beta3 is available for tests
6 years ago
SilverFox
906efc3d94
Disabled tests `LocalFunctions.NestedCapture2`
6 years ago
SilverFox
33f96fd888
Fix tests `LocalFunctions.NestedCapture1`
6 years ago
SilverFox
b8f00cf983
Add some new tests for local func
6 years ago
SilverFox
d88c73f59d
Add test for generic local function
6 years ago
Daniel Grunwald
1b505b8c6d
Adjust async-streams decompiler for dotnet/roslyn#39436
6 years ago