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 :(
2021-02-13 20:17:12 +01:00
Siegfried Pammer
f0012cbc1a
#2198 : Make ILSpy more resilient in case of obfuscated assemblies.
2020-10-25 12:55:33 +01:00
Daniel Grunwald
cabb02b5fd
Add support for decoding function pointer types in signatures.
2020-09-06 18:59:06 +02:00
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
2020-08-28 01:05:38 +02:00
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.
2020-08-06 23:18:12 +02:00
Daniel Grunwald
c9e41d0582
Add support for decoding NativeIntegerAttribute.
2020-07-12 02:05:34 +02:00
Daniel Grunwald
8f90f3834d
Implement support for C# 8 readonly members.
2019-09-28 19:13:21 +02:00
Daniel Grunwald
2f35374d7d
Support "where T : unmanaged" constraints.
2019-02-24 01:24:33 +01:00
Daniel Grunwald
7a058f6262
First attempt at integrating C# nullable reference types into the type system.
2019-02-14 21:00:07 +01:00
Siegfried Pammer
af4dd6e9e3
Fix DecompilerTypeSystem: struct is never null.
2019-01-26 09:36:34 +01:00
Siegfried Pammer
7ef7f1870e
Refactor TS representation of ref / readonly structs. Add support for in parameters.
2018-07-29 23:50:59 +02:00
Daniel Grunwald
79352d18d7
#1195 : Remove modopts/modreqs from the type system; they confuse the decompiler.
2018-07-29 00:17:01 +02:00
Andrey Shchekin
d15fe0f254
Fixed bug with decimal optional parameters not being resolved correctly.
...
Added option to uglify presentation of decimal constants (show `[DecimalConstant(...)]`).
2018-07-26 00:43:33 +12:00
Daniel Grunwald
ab157b2fc0
Add TypeSystemOptions.Uncached.
2018-07-14 18:48:58 +02:00
Daniel Grunwald
b396d203bd
Merge IDecompilerTypeSystem with ICompilation.
2018-07-14 16:50:36 +02:00
Daniel Grunwald
1f3916d554
Use the resolve methods in MetadataModule, and remove the wrappers in DecompilerTypeSystem.
2018-07-14 16:12:03 +02:00
Daniel Grunwald
107fe5eb1c
Eliminate SpecializingDecompilerTypeSystem and use GenericContext instead.
2018-07-14 14:18:54 +02:00
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.
2018-07-13 22:20:49 +02:00
Siegfried Pammer
529a61a117
Fix bug in DecompilerTypeSystem initialization, causing assemblies being added multiple times.
2018-07-12 08:20:26 +02:00
Siegfried Pammer
4540b93e19
Use ArgumentOutOfRangeException or BadImageFormatException in switch-default sections.
2018-07-11 17:18:08 +02:00
Siegfried Pammer
2359b09d9b
DecompilerTypeSystem: Do not load modules that contain no metadata.
2018-07-11 14:25:05 +02:00
Siegfried Pammer
ab977c95a6
Add IAssemblyResolver.ResolveModule
2018-07-11 00:33:19 +02:00
Siegfried Pammer
bcfb3742eb
Clean up PEFile, move Pdb related types to DebugInfo namespace
2018-07-07 18:22:53 +02:00
Siegfried Pammer
e901fd2ad9
Add ApplyAttributeTypeVisitor.ApplyAttributesToType to DecodeMethodSignature and DecodeLocalSignature
2018-06-28 22:42:56 +02:00
Daniel Grunwald
621d90d006
Use MetadataAssembly (the new TS implementation) in DecompilerTypeSystem.
2018-06-28 00:28:09 +02:00
Daniel Grunwald
ee3012281d
Implement MetadataEvent and re-work the representation of attribute arguments.
2018-06-26 23:19:58 +02:00
Daniel Grunwald
385433aff4
Add MetadataMethod.
2018-06-24 22:55:09 +02:00
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).
2018-06-24 19:47:14 +02:00
Daniel Grunwald
5c0190b186
Rename TypeAttributeOptions -> TypeSystemOptions
2018-06-23 22:21:11 +02:00
Daniel Grunwald
96e3b23ab3
Fix crash in ProxyCallReplacer
2018-06-23 20:42:04 +02:00
Daniel Grunwald
802f6e54fd
Refactor DecompilerTypeSystem.ResolveMethod().
2018-06-23 20:17:48 +02:00
Daniel Grunwald
629e586b25
C# 2.0 mode now disables extension methods.
2018-06-19 22:27:02 +02:00
Daniel Grunwald
98d00415d1
Fix tuple types.
2018-06-19 21:29:45 +02:00
Daniel Grunwald
9a74f018b5
Decode metadata signatures directly into IType; without going through ITypeReference.
2018-06-17 19:58:32 +02:00
Daniel Grunwald
4e654cff38
Merge branch 'master' into srm
2018-06-02 10:58:23 +02:00
Siegfried Pammer
47788a38de
WIP
2018-05-31 14:51:24 +02:00
Siegfried Pammer
458f448fae
Avoid unnecessary allocations of MetadataReader and clean up Dom structs a bit.
2018-05-14 22:34:10 +02:00
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.
2018-05-13 18:16:35 +02:00
Daniel Grunwald
395bc185a3
Decompile TupleElementNamesAttribute into tuple type syntax.
2018-05-13 12:32:49 +02:00
Siegfried Pammer
cbb1f204e1
Rename DynamicAwareTypeReference to DynamicTypeReference
2018-05-03 11:33:14 +02:00
Daniel Grunwald
ea211ddbd4
Use existing TypeParameterReference instances instead of creating new ones.
2018-05-01 17:24:13 +02:00
Siegfried Pammer
2a8d8969d9
Remove assertions from CreateFakeField and CreateFakeMethod.
2018-04-06 16:23:47 +02:00
Siegfried Pammer
fb41cfe4f8
Fix bugs when dealing with pinned local vars and varargs methods
2018-04-05 15:00:25 +02:00
Siegfried Pammer
9b4bf8aaed
Fix handling of class type arguments in ResolveAsMethod
2018-04-04 16:17:21 +02:00
Siegfried Pammer
22caec334b
Implement basic support for generic methods in DecompilerTypeSystem + implement ResolveAsMember
2018-04-03 12:55:08 +02:00
Siegfried Pammer
32943a2597
Fix bug in DecompilerTypeSystem
2018-03-31 11:19:47 +02:00
Siegfried Pammer
ac7e06a9ae
A little bit of cleanup in MetadataLoader and DecompilerTypeSystem
2018-03-30 16:34:49 +02:00
Siegfried Pammer
c69a96ded4
add support for method references in DecompilerTypeSystem
2018-03-30 16:20:13 +02:00
Siegfried Pammer
61eead50c7
Fix TypeSystemLoaderTests
2018-03-29 20:43:59 +02:00
Siegfried Pammer
f8446e113a
WIP on MetadataLoader, ILReader and DecompilerTypeSystem
2018-03-28 01:20:17 +02:00