Siegfried Pammer
40ffc1e90e
Remove backing fields of auto properties and events.
...
The previous commit started decompiling backing fields because they are still needed prior to the C# transforms.
3 years ago
Siegfried Pammer
ba177459f1
Fix comment.
3 years ago
Siegfried Pammer
a121e7c6ca
Fix #2653 : ILSpy reports wrong visibility for overridden protected internal properties if located in another assembly.
3 years ago
Siegfried Pammer
aafa9b2aa7
Fix #2664 : Fix NRE in ScopeSearchToAssembly.
3 years ago
Daniel Grunwald
cc7119e191
Fix #2654 : Ignore custom attributes on parameter where SequenceNumber is out-of-range.
...
This can occur when decoding the signature of a setter-only property, as the setter has an additional `value` parameter that does not appear in the property's signature.
3 years ago
Siegfried Pammer
dd77f2ac50
Correct documentation and API definition of ITypeDefinition.EnumUnderlyingType: it should return null for non-enum types.
3 years ago
Siegfried Pammer
1887412c46
Add ITypeDefinition.MetadataName
3 years ago
Siegfried Pammer
50cfcc214c
DecompilerTypeSystem: Add support for implicit references
3 years ago
Siegfried Pammer
fe915780ad
Add AssemblyVersion to IModule
3 years ago
Siegfried Pammer
26183f798b
#2397 : Add TypeSystemExtensions.IsUnmanagedType
3 years ago
Daniel Grunwald
9bbb944e97
Avoid crashing on invalid certain forms of invalid metadata (found in obfuscated assemblies)
4 years ago
Siegfried Pammer
1e4d8b6f44
Add DecompilerTypeSystem.CreateAsync to allow asynchronous initialization.
4 years ago
Siegfried Pammer
1568aeca3e
Fix #2506 : NamedArgumentTransform loses information, if the original variable is of StackType.Ref
4 years ago
Siegfried Pammer
84704a7452
Adds support for C# 9 covariant return types in methods and getter-only properties and indexers.
4 years ago
Daniel Grunwald
5fb2f7a22f
#nullable enable for ILAst (except for generated code)
4 years ago
Daniel Grunwald
bd9aabeae2
Update to dotnet-format 5.1.225507.
...
This makes the formatting expected by our CI consistent with that generated by VS2019.9.
4 years ago
Siegfried Pammer
3f721a17c1
Add support for System.Runtime.CompilerServices.SpecialNameAttribute
4 years ago
Siegfried Pammer
ae3306b966
Fix #2312 : Constructors and operators may not have any generic type parameters in C#
4 years ago
Matt Rouse
a8229dcfe1
C# decompiler doesn't support WinRT metadata ( #2308 )
...
Fix #2306 : Use GetRowNumber MetadataReader extension
Co-authored-by: Siegfried Pammer <siegfriedpammer@gmail.com>
Co-authored-by: Matt Rouse <matt.rouse@ensek.co.uk>
4 years ago
Daniel Grunwald
51b3cf51c6
Fix #2305 : Cast to integer type where necessary in managed pointer arithmetic.
4 years ago
Daniel Grunwald
f726a0b73e
#nullable enable for typesystem and ILInstruction base class
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
Daniel Grunwald
c9be6bc389
Remove unused code ( #2294 )
4 years ago
Siegfried Pammer
fdda8abd74
Fix #2282 : Finalizers must be void and cannot be declared in interfaces
4 years ago
Daniel Grunwald
be9871981a
Records: Detect compiler-generated Equals() in derived records.
4 years ago
Daniel Grunwald
d9874380cd
Records: support generic records
5 years ago
Daniel Grunwald
4050d39b28
Hide [NullableContext] on accessors
5 years ago
Siegfried Pammer
b453930c1d
#2241 : Fix possible NRE in TypeProvider.GetTypeFromReference
5 years ago
Daniel Grunwald
f869756fed
Use "record" instead of "class" for C# 9 record class types.
5 years ago
Siegfried Pammer
f0012cbc1a
#2198 : Make ILSpy more resilient in case of obfuscated assemblies.
5 years ago
Daniel Grunwald
6010757d22
Add support for .NET 5 custom calling conventions.
5 years ago
Daniel Grunwald
d13a8bb64d
Support `ldftn` in the context of a function pointer.
5 years ago
Daniel Grunwald
3831b42197
Properly support `calli` instruction and its interaction with function pointer types.
5 years ago
Daniel Grunwald
cabb02b5fd
Add support for decoding function pointer types in signatures.
5 years ago
Daniel Grunwald
c775d3a98f
Upgrade Roslyn version used for our tests (from 3.7.0 to 3.8.0-2.final) and adjust NativeInteger attribute decoding.
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
5 years ago
Siegfried Pammer
7f4653c274
Add support for tuple deconstruction
5 years ago
Siegfried Pammer
62b8ab39f1
Fix oversight from b788441c78
5 years ago
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
d388319cba
Add support for C# 9 init accessors.
5 years ago
Siegfried Pammer
8d72672e6c
Reimplement DecompilerSettings.StaticLocalFunctions (was lost in the refactoring in #2077 )
5 years ago
Siegfried Pammer
18ace00266
Refactor LocalFunctionDeclarationStatement + LocalFunctionMethod
5 years ago
Daniel Grunwald
3a4db502bc
Add support for arithmetic using C# 9 native integer types.
5 years ago
Daniel Grunwald
2c9b84a1e1
If possible, use nint/nuint for conversions to/from IntPtr.
5 years ago
Daniel Grunwald
c9e41d0582
Add support for decoding `NativeIntegerAttribute`.
5 years ago
Daniel Grunwald
450fae49e3
Introduce nint/nuint types and their conversions in the type system
5 years ago
Daniel Grunwald
0dd75d6852
Add support for slicing using C# 8 ranges.
5 years ago