Siegfried Pammer
2ed9ad6b51
Add support for C# 11 scoped parameter modifier.
3 years ago
Siegfried Pammer
50cfcc214c
DecompilerTypeSystem: Add support for implicit references
3 years ago
Siegfried Pammer
1e4d8b6f44
Add DecompilerTypeSystem.CreateAsync to allow asynchronous initialization.
4 years ago
Daniel Grunwald
d70bfe80d5
Add ResolveAsync() method to IAssemblyResolver interface.
...
DecompilerTypeSystem uses this to resolve/load multiple assemblies in parallel.
Unfortunately this doesn't gain us any performance yet in ILSpy because there we have a global assembly-loader-lock :(
4 years ago
Siegfried Pammer
f0012cbc1a
#2198 : Make ILSpy more resilient in case of obfuscated assemblies.
5 years ago
Daniel Grunwald
cabb02b5fd
Add support for decoding function pointer types in signatures.
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
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
c9e41d0582
Add support for decoding `NativeIntegerAttribute`.
5 years ago
Daniel Grunwald
8f90f3834d
Implement support for C# 8 readonly members.
6 years ago
Siegfried Pammer
6234ff7c9a
Apply changes as requested per code review.
6 years ago
Siegfried Pammer
8d1522f387
Transform display classes used in local functions.
6 years ago
Daniel Grunwald
2f35374d7d
Support "where T : unmanaged" constraints.
6 years ago
Daniel Grunwald
7a058f6262
First attempt at integrating C# nullable reference types into the type system.
6 years ago
Siegfried Pammer
af4dd6e9e3
Fix DecompilerTypeSystem: struct is never null.
6 years ago
Siegfried Pammer
7ef7f1870e
Refactor TS representation of ref / readonly structs. Add support for in parameters.
7 years ago
Daniel Grunwald
79352d18d7
#1195 : Remove modopts/modreqs from the type system; they confuse the decompiler.
7 years ago
Andrey Shchekin
d15fe0f254
Fixed bug with decimal optional parameters not being resolved correctly.
...
Added option to uglify presentation of decimal constants (show `[DecimalConstant(...)]`).
7 years ago
Daniel Grunwald
ab157b2fc0
Add TypeSystemOptions.Uncached.
7 years ago
Daniel Grunwald
b396d203bd
Merge IDecompilerTypeSystem with ICompilation.
7 years ago
Daniel Grunwald
1f3916d554
Use the resolve methods in MetadataModule, and remove the wrappers in DecompilerTypeSystem.
7 years ago
Daniel Grunwald
107fe5eb1c
Eliminate SpecializingDecompilerTypeSystem and use GenericContext instead.
7 years ago
Daniel Grunwald
3b46776c5e
Rename IAssembly -> IModule.
...
While support for multi-module assemblies isn't fully working yet; it is clear at this point that we want
to treat each module in a multi-module assembly separately for the purposes of the type system.
7 years ago
Siegfried Pammer
529a61a117
Fix bug in DecompilerTypeSystem initialization, causing assemblies being added multiple times.
7 years ago
Siegfried Pammer
4540b93e19
Use ArgumentOutOfRangeException or BadImageFormatException in switch-default sections.
7 years ago
Siegfried Pammer
2359b09d9b
DecompilerTypeSystem: Do not load modules that contain no metadata.
7 years ago
Siegfried Pammer
ab977c95a6
Add IAssemblyResolver.ResolveModule
7 years ago
Siegfried Pammer
bcfb3742eb
Clean up PEFile, move Pdb related types to DebugInfo namespace
7 years ago
Siegfried Pammer
e901fd2ad9
Add ApplyAttributeTypeVisitor.ApplyAttributesToType to DecodeMethodSignature and DecodeLocalSignature
7 years ago
Daniel Grunwald
621d90d006
Use MetadataAssembly (the new TS implementation) in DecompilerTypeSystem.
7 years ago
Daniel Grunwald
ee3012281d
Implement MetadataEvent and re-work the representation of attribute arguments.
7 years ago
Daniel Grunwald
385433aff4
Add MetadataMethod.
7 years ago
Daniel Grunwald
0f8c310de2
Started work on new resolved TS implementation that directly uses SRM.
...
This is a work-in-progress; ILSpy is not functional with this commit.
The old code path still exists but is broken because some classes were modified for the new system.
The new system is still highly incomplete (types only have fields, but no methods).
7 years ago
Daniel Grunwald
5c0190b186
Rename TypeAttributeOptions -> TypeSystemOptions
7 years ago
Daniel Grunwald
96e3b23ab3
Fix crash in ProxyCallReplacer
7 years ago
Daniel Grunwald
802f6e54fd
Refactor DecompilerTypeSystem.ResolveMethod().
7 years ago
Daniel Grunwald
629e586b25
C# 2.0 mode now disables extension methods.
7 years ago
Daniel Grunwald
98d00415d1
Fix tuple types.
7 years ago
Daniel Grunwald
9a74f018b5
Decode metadata signatures directly into IType; without going through ITypeReference.
7 years ago
Siegfried Pammer
47788a38de
WIP
7 years ago
Siegfried Pammer
458f448fae
Avoid unnecessary allocations of MetadataReader and clean up Dom structs a bit.
7 years ago
Daniel Grunwald
469501210c
Add support for C# 7 tuple types:
...
* Use tuple literals instead of calling 'new ValueTuple<..>' constructor
* Where available, use element names for field access
* Make CallBuilder aware of tuple-name/dynamic type erasure, to avoid introducing casts when the types differ only in the tuple element names.
* Make CallBuilder provide a ResolveResult with the correct C# return type for the resulting expression.
Previously we were using the type-erased return type from the IL.
* Fix a bug that caused us to introduce returning casts when accessing an indexer.
7 years ago
Daniel Grunwald
395bc185a3
Decompile TupleElementNamesAttribute into tuple type syntax.
7 years ago
Siegfried Pammer
cbb1f204e1
Rename DynamicAwareTypeReference to DynamicTypeReference
7 years ago
Daniel Grunwald
ea211ddbd4
Use existing TypeParameterReference instances instead of creating new ones.
7 years ago
Siegfried Pammer
2a8d8969d9
Remove assertions from CreateFakeField and CreateFakeMethod.
7 years ago
Siegfried Pammer
fb41cfe4f8
Fix bugs when dealing with pinned local vars and varargs methods
7 years ago
Siegfried Pammer
9b4bf8aaed
Fix handling of class type arguments in ResolveAsMethod
7 years ago
Siegfried Pammer
22caec334b
Implement basic support for generic methods in DecompilerTypeSystem + implement ResolveAsMember
7 years ago
Siegfried Pammer
32943a2597
Fix bug in DecompilerTypeSystem
7 years ago