Daniel Grunwald
c366235246
#1349 : Fix type substitution for members of unknown generic types (due to unresolved references)
...
Also, assume that unknown inputs to ldfld are temporaries, not unmanaged pointers.
This avoids emitting weird pointer casts when accessing fields on unresolved value types.
6 years ago
Siegfried Pammer
3c185f2845
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into ref
6 years ago
Siegfried Pammer
860f9db950
Extend type inference to allow ref return types.
6 years ago
Daniel Grunwald
42eafb587f
Fix #684 : Improve detection of variable type for stack slots.
6 years ago
Daniel Grunwald
abcef43dba
Fix #1532 : Display metadata token in DecompilerException error message
6 years ago
Daniel Grunwald
8cd8a90c22
Fix #1563 : `Unexpected return in MoveNext()` when mixed `using` and more than one `yield break`
...
Roslyn re-uses the same "this.Finally(); return v;" block for both "yield break;" instructions, so the yield break pattern needs to support multiple stores to the helper variable.
6 years ago
Daniel Grunwald
7e3b36aaa7
#1563 : Where possible, replace an explicit interface implementation call with a call to the interface member.
6 years ago
Siegfried Pammer
3d60c7bd70
Fix #1590 : Cast from override method to Delegate is not properly simplified
6 years ago
Daniel Grunwald
7223806967
Disable resolver log again.
6 years ago
Daniel Grunwald
b75c252193
Upgrade C# 8.0 nullability support for Roslyn 3.2.0-beta4.
6 years ago
Daniel Grunwald
539e3a906d
Fix #1552 : user-defined and decimal increments
...
For user-defined increments, there were problems with Roslyn was optimizing out one of the stores.
The new transform FixRemainingIncrements now takes increments/decrements that were not detected by TransformAssignment and introduces a temporary variable that can be incremented.
This sometimes requires un-inlining via the new ILInstruction.Extract() operation.
Extract() is not supported in all possible contexts, so it is possible but unlikely that some op_Increment calls remain.
For decimals, the situation is different: legacy csc actually was optimizing "d + 1m" to "op_Increment(d)", so we can get rid of any left-over increments by undoing this optimization. This now happens in ReplaceMethodCallsWithOperators.
6 years ago
Siegfried Pammer
61231b7725
Fix #1593 : TransformCollectionAndObjectInitializers uses nested indexer call as target of object initializer.
6 years ago
Siegfried Pammer
9dd22011d6
Remove ILSpyTreeNode.Save accepting a file name, as it is currently not necessary.
...
Remove focused element check in SaveCommandCanExecute, because saving the text view content independently from the tree view selection is currently not supported.
6 years ago
Siegfried Pammer
01b8b83360
Fix CSharpDecompiler.ReadCodeMappingInfo not taking generic lambdas into account.
6 years ago
Siegfried Pammer
24e492bfe3
Adjust SaveCommandCanExecute to match SaveCommandExecuted.
6 years ago
Daniel Grunwald
c56714c607
Fix assertion with async lambdas; fix async local functions.
6 years ago
Siegfried Pammer
a63e94e5b4
Refactor Solution decompilation to use Language instead of AssemblyTreeNode.
6 years ago
Daniel Grunwald
0a54a93be0
Relax foreach transform to allow stack slots as foreach-variable again.
6 years ago
Daniel Grunwald
856cedc95e
#1456 : add test case; add additional checks to ensure we only transform normal locals into using/foreach-locals
6 years ago
Daniel Grunwald
beed6b5e24
Remove MarkGeneratedVariables() step in AsyncAwaitDecompiler.
...
This was left-over from earlier versions; but ILSpy stopped caring so much about variable vs. stack slot since Roslyn started to optimize more aggressively.
The change of variable type caused problems for debug information and could even cause an assertion.
Closes #1456 , closes #1562 .
6 years ago
Siegfried Pammer
174d14de3f
Merge pull request #1586 from icsharpcode/local-functions
...
C# 7.0 Local functions
6 years ago
Siegfried Pammer
f10ab69328
Improve local-function detection to minimize false positives.
6 years ago
Siegfried Pammer
537df7bab3
Add option: 'ref' extension methods
6 years ago
Siegfried Pammer
c45ce41d00
Refactor ParameterModifier.This to allow 'this ref' parameters.
6 years ago
Siegfried Pammer
a109b77858
Refactor LocalFunctionDecompiler to allow mutually recursive local functions to be decompiled correctly.
6 years ago
Siegfried Pammer
6234ff7c9a
Apply changes as requested per code review.
6 years ago
Siegfried Pammer
b7bf6b7720
Fix build again.
6 years ago
Daniel Grunwald
5a8796c05c
Reuse the existing TSAB.
6 years ago
Siegfried Pammer
dc74e4ee9d
Fix build.
6 years ago
Siegfried Pammer
763ea38644
Clean up CallBuilder.HandleDelegateConstruction
6 years ago
Siegfried Pammer
8bfd17404b
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into local-functions
6 years ago
Siegfried Pammer
647f4fd545
Do not crash if the local function was not correctly transformed. This should only happen for generic local functions, which are currently not supported.
6 years ago
Siegfried Pammer
e215f69b2d
Extend description of LocalFunctionDecompiler
6 years ago
Siegfried Pammer
37e14f43e3
Refactor/Clean up local functions representation in type system.
6 years ago
Daniel Grunwald
fb2cbf3d62
Use <GenerateDocumentationFile> instead of specifying the file name.
6 years ago
Daniel Grunwald
33c7425fa2
Fix several bugs with compound assignments on indexers.
...
Closes #1580 .
6 years ago
Siegfried Pammer
f3f38783df
ICSharpCode.Decompiler roundtrip test now completes
6 years ago
Daniel Grunwald
ccdabf2325
Fix a bunch of XmlDoc compiler warnings.
6 years ago
Siegfried Pammer
e5d783b06a
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into local-functions
6 years ago
Siegfried Pammer
0719aa9f08
Enable DecompilerSettings.IntroduceLocalFunctions
6 years ago
Daniel Grunwald
51d81f478a
Merge branch 'compound-assign'
6 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 .
6 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.
6 years ago
Siegfried Pammer
bb066dbd04
Additional test (deactivated)
6 years ago
Siegfried Pammer
19a7898786
Add addressof(ldloc) => ldloca transform to EarlyExpressionTransforms
6 years ago
Siegfried Pammer
01e42b772c
Fix local functions inside lambdas.
6 years ago
Siegfried Pammer
b83cb41f2e
Add pretty tests for local functions.
6 years ago
Christoph Wille
268d0af4e0
Include documentation XML in NuGet package (similar to PR https://github.com/icsharpcode/ILSpy/pull/1432 but built for v5.0)
6 years ago
Siegfried Pammer
6f98ed5415
Fix unit tests.
6 years ago
Siegfried Pammer
8af609e7df
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into local-functions
6 years ago