Commit Graph
65 Commits
Author SHA1 Message Date
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
Daniel Grunwald 0e9a163345 Improve on #1085 by setting UnknownType.IsReferenceType in more cases. 2018-03-23 22:40:18 +01:00
Siegfried Pammer b500b24548 SRM WIP basic implementation of DecompilerTypeSystem 2018-03-18 20:02:37 +01:00
Siegfried Pammer 57cf98cf11 Merge branch 'master' of github.com:icsharpcode/ILSpy into srm
# Conflicts:
#	ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs
#	ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
#	ICSharpCode.Decompiler/TypeSystem/CecilLoader.cs
#	ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs
#	ILSpy/Languages/CSharpLanguage.cs
#	ILSpy/Languages/Language.cs
#	ILSpy/LoadedAssembly.cs
#	ILSpy/SearchStrategies.cs
2018-03-17 22:29:11 +01:00
Daniel Grunwald 7c91d48d68 #980: Fix type substitution for lambdas. 2018-03-10 21:13:48 +01:00
Daniel Grunwald c869a4fc16 Fix #1085: The type system can now parameterize not just type definitions, but also unknown types.
This improves decompilation when references assemblies cannot be found.
2018-03-09 22:50:50 +01:00
Daniel Grunwald 4d00c65608 Use IReadOnlyList<T> instead of IList<T> in the resolved type system. 2018-03-09 00:04:20 +01:00
Daniel Grunwald 85314b494a #1085: Keep track of whether an unresolved type is a class type or a value type.
Also, fix a bug that caused specialization of a method on an unresolved type to be a no-op.
2018-03-08 01:17:20 +01:00
Siegfried Pammer cb9787098f Finished port of UI (Analyzers still excluded) and Disassembler 2018-02-13 17:54:50 -02:00
Siegfried Pammer 02b7dc98be Commit of non-compiling WIP 2018-01-15 20:51:46 +01:00
Siegfried Pammer 98bc48d3fb Fix #1028: DecompilerTypeSystem: need a way to GetCecil() for unresolved entity 2018-01-14 22:10:37 +01:00
Siegfried Pammer dee7840356 Fix typo in DecompilerTypeSystem 2017-11-27 22:31:31 +01:00
Daniel Grunwald 9a829a2820 ILReader: handle implicit O->Ref conversions 2017-11-12 22:10:26 +01:00
Siegfried Pammer e325b7c907 Add comments 2017-09-09 09:59:59 +02:00
Siegfried Pammer 83273ad611 Add KeyComparer 2017-09-09 09:51:48 +02:00