Siegfried Pammer
bcd7219535
Adjust CapturedVariables collection in ReplaceDelegateTargetVisitor and in TransformExpressionTrees
6 years ago
Siegfried Pammer
a49577ce2d
Fix #2020 : Mark Modifier Letter (Lm category) characters as printable
6 years ago
Siegfried Pammer
30c8a22ded
Fix #1765 : Add another pattern of FSM initialization to ReadCodeMappingInfo
6 years ago
Siegfried Pammer
101aba3362
Validate uses of display-class variable copies before removing them
6 years ago
Siegfried Pammer
3436ac3246
Fix #2018 : Improve tooltips in IL/IL with C#/R2R view to show full member signatures
6 years ago
Siegfried Pammer
0fa04a5248
Fix build.
6 years ago
Siegfried Pammer
d4fd92bf0f
Fix initializer block detection of display structs.
6 years ago
Siegfried Pammer
1c7d9705da
Add Validation of delegate target instructions.
6 years ago
Siegfried Pammer
d27c0226b4
Fix #2010 : NullReferenceException in SequencePointBuilder.VisitCatchClause()
6 years ago
Siegfried Pammer
6042819117
Implement Block.CheckInvariant for BlockKind.ArrayInitializer, BlockKind.CollectionInitializer and BlockKind.ObjectInitializer
6 years ago
Siegfried Pammer
ab336cdc94
Fix build.
6 years ago
Siegfried Pammer
d457ef38f4
Make ValidateConstructor safe
6 years ago
Siegfried Pammer
f1cbc7c8db
Add AggressiveScalarReplacementOfAggregates option
6 years ago
Siegfried Pammer
53c593af0b
Fixed all TDCU related tests.
6 years ago
Siegfried Pammer
4f7ca65408
Fix #1913 : Make sure to declare local variables captured by local functions before the first invocation of the local function.
6 years ago
Siegfried Pammer
83e8049114
Add ILVariable.IsDead property
6 years ago
Siegfried Pammer
b6259b7dca
Fix #1981 : Ensure correctness of TDCU
6 years ago
Siegfried Pammer
0d1b6203df
#1981 : Refactor LocalFunctionDecompiler: Propagate closure parameter arguments, so that all arguments can be stripped from use-sites.
6 years ago
Siegfried Pammer
0df7e1e4a5
Fix #1999 : Compiler generated variables with weird names; by supporting a newer naming-convention used by mcs for anonymous delegates: See c2795c9cb5/mcs/mcs/delegate.cs (L808)
6 years ago
Siegfried Pammer
5711185832
Make sure that the code and the pattern described in the comment above are in sync.
6 years ago
Daniel Grunwald
7d8b9fee1e
Remove redundant code.
6 years ago
Siegfried Pammer
2f51f31257
PDBGen: avoid assertion failure, if there are instructions that are not supported in C# (e.g. calli)
6 years ago
Siegfried Pammer
b114734128
Add Mode.UnconstrainedType and implement TransformNullPropagationOnUnconstrainedGenericExpression using TryNullPropagation.
6 years ago
Siegfried Pammer
2601d17919
Add clarifying comment to ExceptionSpecifierILRange
6 years ago
Siegfried Pammer
9c8df1d949
Fix assignment of ILRanges in ExpressionTransforms.TransformCatchVariable
6 years ago
Siegfried Pammer
794be9a5b4
Fix SequencePointBuilder.VisitCatchClause: do not create a sequence point from the catch-token to the closing brace.
6 years ago
Siegfried Pammer
6382f8c41d
Fix #1990 : Empty default ctor with XML comment discarded from decompilation
6 years ago
Siegfried Pammer
effc49c479
Move TransformNullPropagationOnUnconstrainedGenericExpression into NullPropagationTransform and make use of IsValidAccessChain
6 years ago
Siegfried Pammer
1303c54086
Exactly match load, store and address counts of defaultTemporary.
6 years ago
Daniel Grunwald
b7754cdf5c
Workaround dotnet/roslyn#43659 in decompiled code.
6 years ago
Daniel Grunwald
cd04e80f5e
Use IsKnownType() when checking for System.Object
6 years ago
Siegfried Pammer
40687ea8ad
#1498 : Remove Fusion API usage: Use standard file enumeration instead. This should enable us to use the GAC even with restricted access, as only the LIST permission is required.
6 years ago
Siegfried Pammer
7571b59abf
Improve DotNetCorePathFinderExtensions.DetectTargetFrameworkId to properly detect framework version of GAC assemblies.
6 years ago
Daniel Grunwald
9659be0d55
#1946 : Fix IsBranchToReturnBlock() [was broken in c1265ad830]
6 years ago
Siegfried Pammer
0dfcafdfe8
Add preconfigured assembly list selection and rename command to ManageAssemblyListsDialog
6 years ago
Siegfried Pammer
60e9c204cc
Fix #1940 : Make sure that we use the correct .NET Core version, when there are multiple frameworks loaded in the current assembly list.
6 years ago
Siegfried Pammer
b92a4b956c
#1940 : Ignore nullability in ETs
6 years ago
Siegfried Pammer
c676665a61
#1940 : Refactor TransformExpressionTrees to support rolling back all changes if the transform fails.
6 years ago
Daniel Grunwald
c1265ad830
Fix #1946 : Don't move `return` into `try` block when doing so changes the semantics of a `finally` block.
6 years ago
Daniel Grunwald
2da513eb24
Fix #1988 : handle Roslyn 3.6 task creation pattern in async/await decompiler.
...
Roslyn 3.6 no longer makes a redundant copy of the `AsyncTaskMethodBuilder`, but directly calls `stateMachine.<>t__builder.Start(ref stateMachine);`
6 years ago
Daniel Grunwald
1926756cfa
Handle the special cases where the range does not have a start or endpoint.
6 years ago
Daniel Grunwald
0dd75d6852
Add support for slicing using C# 8 ranges.
6 years ago
Daniel Grunwald
aed358b5a0
Use more precise ResolveResult, so that Range/Index operators are hyperlinked.
6 years ago
Daniel Grunwald
dd54dbc144
Disable IndexRangeTransform if the "C# 8 ranges" setting is disabled.
6 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]`.
6 years ago
Daniel Grunwald
060830dd64
Variable splitting: support cases where a ref is passed through a ref-returning method, and then used.
...
From `IndexRangeTest.UseIndexForRef`:
```
stloc V_4(call GetSpan())
stloc S_19(ldloca V_4)
stloc V_2(call get_Length(ldloc S_19))
stloc V_3(call GetOffset(addressof System.Index(call GetIndex(ldc.i4 0)), ldloc V_2))
call UseRef(call get_Item(ldloc S_19, ldloc V_3))
stloc V_4(call GetSpan())
stloc S_30(ldloca V_4)
stloc V_2(binary.sub.i4(call get_Length(ldloc S_30), call GetInt(ldc.i4 0)))
call UseRef(call get_Item(ldloc S_30, ldloc V_2))
```
Due to `Span.get_Item` being a ref-return, it's possible that `ref V_4` is returned and passed into the `UseRef` method (this can't actually happen given Span's implementation, but it's a possible implementation of the get_Item type signature).
But we still need to split `V_4` -- it's a compiler-generated variable and needs to be inlined.
I think we can do this relatively simply by continuing to go up the ancestor instructions when we hit a ref-returning call. The recursive `DetermineAddressUse` call will check that there are no stores to `V_4` between the `get_Item` call and the point where the returned reference is used. Thus we still ensure that we don't split a variable while there is a live reference to it.
6 years ago
Daniel Grunwald
12226c5f90
Add support for indexing a container with a System.Index instance.
6 years ago
Daniel Grunwald
748c54a1c1
Support array slicing.
6 years ago
Daniel Grunwald
dc6e094a30
Add support for indexing arrays using System.Index
6 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.
6 years ago