Daniel Grunwald
8061634e67
#1203 , #2092 : New logic for resolving assembly references within the type system.
...
We now avoid the old `IModuleReference` interface which required allocating for every type being resolved.
Instead `MetadataModule.ResolveModule` now combines decoding+resolving assembly references into a single step.
This allows the type system to maintain a cache indexed by row number.
This also changes the behavior of resolving references within a compilation: We now prefer an exact match (name + version + publickeytoken) first; and fall back to a name-only match only if no exact match exists.
This somewhat improves the decompilation of assemblies created by using ilmerge to combine assemblies with different target frameworks.
5 years ago
Daniel Grunwald
1751c9922c
Avoid constructing a GetClassTypeReference instance in TypeProvider.GetTypeFromReference.
5 years ago
Daniel Grunwald
b788441c78
DecompilerTypeSystem: If some known types are present in referenced assemblies but others are missing; add the missing known types to the compilation.
...
This ensures that FindType(KnownTypeCode).GetDefinition() always returns a usable definition.
5 years ago
Daniel Grunwald
5bd47c171f
Don't require a definition for the task builder type, also accept an UnknownType.
5 years ago
Daniel Grunwald
440ef75898
Avoid pointless UnknownType->object->UnknownType casts.
5 years ago
Daniel Grunwald
b6b5f1e8e6
#2092 : ILFunction.Parameters / ILFunction.ReturnType should never be null.
5 years ago
Daniel Grunwald
40e2776f02
#2089 : Handle invalid attribute/reference metadata in `DetectTargetFrameworkId`
5 years ago
Daniel Grunwald
c6b10d3ec3
Fix #2094 : ByteOffset() arguments passed in wrong order
5 years ago
Siegfried Pammer
2403548ce3
Add tests for C# 9.0 lambda parameter discards
5 years ago
Christoph Wille
aaca0e92b8
Remove gitter.im, we are now using Discussions
5 years ago
Daniel Grunwald
5c949e6e20
Fix #2086 : Check that window belongs to ILSpy before sending it a WM_COPYDATA message.
5 years ago
Daniel Grunwald
1a997fdb60
Enable aggressive inlining into switch expressions.
5 years ago
Daniel Grunwald
abb9d49a0f
Add support for C# 8 switch expressions.
5 years ago
Daniel Grunwald
d388319cba
Add support for C# 9 init accessors.
5 years ago
Daniel Grunwald
d02fd09822
Explicitly create partitioners for `Parallel.ForEach` calls.
...
Apparently the default `Parallel.ForEach` logic checks whether the input enumerable is an array or `IList<T>`,
and if it is, creates whole chunks of sequential list/array indices and assigns those to the worker threads.
This is more efficient if the individual items are processed very quickly; but if they take varying amounts of time, a single chunk full of expensive items might keep a single CPU core busy for long after all other CPU cores have gone idle.
5 years ago
Christoph Wille
2cd77bb3cc
Frontends for 6.1
5 years ago
Siegfried Pammer
4b865c27e4
Fix #2076 : VS AddIn opens reference assembly.
5 years ago
Siegfried Pammer
8d72672e6c
Reimplement DecompilerSettings.StaticLocalFunctions (was lost in the refactoring in #2077 )
5 years ago
Daniel Grunwald
b4aec9a80e
Merge pull request #2077 from icsharpcode/attributes-on-local-functions
...
Attributes on local functions
5 years ago
Siegfried Pammer
33bc9fbef4
Fix display of generic type parameters of local functions in tooltips
5 years ago
Christoph Wille
eed9ebc4cf
Set version to 6.1
5 years ago
Siegfried Pammer
67b2a45292
Improve tooltips and highlighting of local functions
5 years ago
Siegfried Pammer
acea95d0a1
Properly rename LocalFunctionMethod.Name on all instructions
5 years ago
Siegfried Pammer
18ace00266
Refactor LocalFunctionDeclarationStatement + LocalFunctionMethod
5 years ago
Siegfried Pammer
431bbaa489
RequiredNamespaceCollector: properly handle parts of methods
5 years ago
Siegfried Pammer
a231ab54d4
Add test cases
5 years ago
Daniel Grunwald
bdea1950a8
Add `#if !NETCORE` around extension methods that are included with .NET Core 3
5 years ago
Daniel Grunwald
fc51dd17a5
Remove outdated comment. The `PickExitPoint` heuristic is no longer using "amount of code" but the IL block order.
5 years ago
Siegfried Pammer
5eaaf61031
VSIX: use elvis
5 years ago
Siegfried Pammer
75783054dc
Move ILSpy distribution to subfolder inside VSIX.
5 years ago
Siegfried Pammer
3108f7eba6
ILSpy.AddIn: Remove unused code.
5 years ago
Siegfried Pammer
4f8c588c7b
Fix #2068 : ILSpy can't find referenced library even though it's open
5 years ago
Siegfried Pammer
6613f100f1
Upgrade ILSpy.ReadyToRun.csproj to use MSBuild.Sdk.Extras + UseWpf
5 years ago
Siegfried Pammer
4308ab3073
Fix WPF binding error in Metadata Explorer
5 years ago
Daniel Grunwald
c647016bfb
#2070 : Allow `PickExitPoint` heuristic to choose a `return;`/`yield break;` that is part of a condition block.
5 years ago
Daniel Grunwald
7476ae8f40
#2074 : Don't open multiple crash dialogs at the same time.
5 years ago
Daniel Grunwald
2acc4339df
#2058 : Mark most transforms as public to help users that use the ILAst directly without decompiling to C#.
5 years ago
Daniel Grunwald
bd059dfb59
Fix #2075 : IndexOutOfRange exception in PEFile.GetRuntime()
5 years ago
Daniel Grunwald
3409ffca25
Fix #2073 : Ensure the startOffsetVar actually appears in the expected instruction, not somewhere else.
5 years ago
Siegfried Pammer
5459d6b022
#2064 : Improve performance of RequiredNamespaceCollector by skipping repeated IType.GetAllBaseTypes() calls.
5 years ago
Daniel Grunwald
b9cade9958
Merge pull request #2069 from icsharpcode/remove-redundant-statement-transform
...
Remove redundant StatementTransform pass.
5 years ago
Daniel Grunwald
e0fd0bba32
Allow inlining constants into expression trees.
5 years ago
Daniel Grunwald
c63e14e805
Move some special cases from ILInlining.FindLoadInNext to the individual ILInstructions.
5 years ago
Daniel Grunwald
fe2143b41f
Validate code movement performed by IndexRangeTransform.
5 years ago
Christoph Wille
901cbfe10e
Add Microsoft.Xaml.Behaviors.dll to VSIX package
5 years ago
Daniel Grunwald
f93ea325d4
Remove redundant StatementTransform pass.
...
This duplicate pass only made sense back when we ran CopyPropagation as part of the BlockILTransform.
5 years ago
Daniel Grunwald
7d3dfc3b81
Remove the hack where IndexRangeTransform looks at instructions prior to startPos.
...
Instead we now perform a partial transformation which we can then later extend.
This means we no longer need to rely on the previous instruction (prior to startPos) being already inlined.
This way the IndexRangeTransform also works without the duplicate StatementTransform pass.
5 years ago
Daniel Grunwald
28612d2a04
Update to Roslyn 3.7.0-4.final
5 years ago
Daniel Grunwald
da42b4a7a8
Merge PR #2063 : Add support for C# 9 native integers
5 years ago
Daniel Grunwald
1b2874eb5d
Use `nint` type for local IntPtr variables if arithmetic is performed on them.
5 years ago