89 Commits
Author SHA1 Message Date
Siegfried Pammer ac0ef8a113 Fix #3253: Remove duplicate assembly references keeping the ones with the highest version. 2024-10-19 12:08:29 +02:00
Siegfried Pammer 02d2a8c1f8 Add metadata processing for C# 12 'ref readonly' parameters 2024-07-19 18:40:08 +02:00
Siegfried Pammer 4bf9487ecd Remove IsRef, IsOut and IsIn flags from IParameter and Replace ParameterModifiers with ReferenceKind. 2024-07-19 18:40:07 +02:00
Siegfried Pammer ca78d4a14d Use MetadataFile instead of PEFile in TypeSystem. 2024-03-24 15:35:13 +01:00
Daniel Grunwald 3dc2f3d5b6 Rename lifetime annotation to ScopedRef 2023-05-30 11:32:25 +02:00
Daniel Grunwald 9359d47c0b Add support for ScopedRefAttribute 2023-05-29 18:59:49 +02:00
Daniel Grunwald efeaf1356f Add feature: C#11 nint without NativeIntegerAttribute
Because it is no longer possible to distinguish IntPtr from nint, this required a lot of testcase adjustment.
2023-05-29 14:07:06 +02:00
Siegfried Pammer 2ed9ad6b51 Add support for C# 11 scoped parameter modifier. 2022-07-16 16:20:18 +02:00
Siegfried Pammer 50cfcc214c DecompilerTypeSystem: Add support for implicit references 2022-03-07 09:19:25 +01:00
Siegfried Pammer 1e4d8b6f44 Add DecompilerTypeSystem.CreateAsync to allow asynchronous initialization. 2021-10-26 18:04:41 +02:00
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