Peter Crabtree
e1e16b64f5
dev: Strip BOM mark from text files
4 months ago
Daniel Grunwald
bd9ee28552
Fix #1789 : missing hyperlink for `MethodGroupResolveResult`.
4 months ago
Daniel Grunwald
587a359e8c
Fix #1873 : Clear ILRange in CopyPropagation
...
We are copying an expression from far away, reusing the ILRange would result in incorrect sequence points.
4 months ago
Daniel Grunwald
02d9dc3e85
Fix #3323 : Simplify cleanup in AwaitInFinallyTransform, ensuring that we do not miss any containers.
4 months ago
Daniel Grunwald
c84605a610
Fix #3468 : Try harder to avoid ref locals if `UseRefLocalsForAccurateOrderOfEvaluation` is not enabled.
...
CopyPropagation will replace `ref StructWithStringField reference = ref array[0];` with:
```
var x = array;
var y = 0;
```
and then every use of `reference` is replaced with `x[y]`.
This lets us avoid rough locals while preserving the semantics in every case except that we re-order when a NullReferenceException/IndexOutOfRangeException occurs.
4 months ago
Daniel Grunwald
ec58d57875
#3465 : Fix bugs in `comp.o` handling.
4 months ago
Daniel Grunwald
89083eaf48
Fix #3344 : Add support for the `ckfinite` opcode.
4 months ago
Daniel Grunwald
f826037acc
Protect IsInst against multi-step inlining -- we can only allow `Box` as the top-level argument, not anywhere within the argument tree.
4 months ago
Daniel Grunwald
8ad33f1e13
Fix #3479 : If YieldReturnDecompiler.ConvertBody fails, abort transforming the state machine instead of continuing with invalid code.
4 months ago
Daniel Grunwald
dd4bf7d8a4
Fix #3518 by replacing `FixLoneIsInst` with an inlining restriction.
...
This way we avoid having to extract later, as we will never inline if the `isinst` argument if this could result in it being unrepresentable in C#.
This commit also refactors inlining restrictions to avoid requiring special cases in ILInlining itself.
But when making this change, I discovered that this broke our pattern-matching tests, and that the weird IL with double `isinst` is indeed generated by the C# compiler for `if (genericParam is StringComparison.Ordinal)` style code. So instead we also allow `isinst` with a `box(expr-without-side-effects)` argument to be represented with the `expr is T ? (T)expr : null` emulation.
4 months ago
Jan Kučera
9d11f523b1
Always move initializer decompilation setting
5 months ago
ds5678
15223daabd
WIP preincrement improvements
5 months ago
Siegfried Pammer
6c00c138eb
Fix #3465 : Translate comp.o(a op b) if op not in (==, !=) into Unsafe.As<object, UIntPtr>(ref a) op Unsafe.As<object, UIntPtr>(ref b)
5 months ago
Christoph Wille
afcdcec146
Update for .NET 10 Preview 7 packages ( #3537 )
...
* Update NUnit (was: 4.3.2) to 4.4 and MTP (was: 1.7.3) to 1.8.1 (had to add VSTestBridge explicitly to override ref complaints by compiler)
* Update to .NET 10 Preview 7 NuGet packages
* Update dotnet-format
5 months ago
Christoph Wille
99165b7ce2
Update Humanizer ( #3532 )
5 months ago
Maximilian Schmöcker
43bfaba7e0
Add ExpandParamsArguments DecompilerSettings
5 months ago
Maximilian Schmöcker
850ffe593d
Fix methods with mandatory arguments ignore disabled OptionalArguments setting
5 months ago
Siegfried Pammer
f8dcd95b31
Add support for extensions in CSharpDecompiler
5 months ago
Siegfried Pammer
9157122462
Add ExtensionDeclaration syntax node
5 months ago
Siegfried Pammer
3b0939d99c
Add ExtensionInfo: mapping of extension members to extension implementations and more.
5 months ago
Siegfried Pammer
29bd78a9c9
Add DecompilerSettings.ExtensionMembers and Language version 14
5 months ago
Siegfried Pammer
68ae8ae833
Rename ITypeDefinition.HasExtensionMethods to ITypeDefinition.HasExtensions
5 months ago
Siegfried Pammer
7ea2c8f32f
Remove dead code
5 months ago
Siegfried Pammer
c642678f7f
Remove ToTypeReference: Implement ParseReflectionName with SRM TypeName.
5 months ago
Siegfried Pammer
33e497eb80
Refactor ParseReflectionName to return IType instead of ITypeReference
5 months ago
lordmilko
9498c8d3d9
Allow specifying an IDecompilerTypeSystem rather than a DecompilerTypeSystem to CSharpDecompiler
5 months ago
Siegfried Pammer
9dde97414a
Rename ResolvedUsingScope to UsingScope
5 months ago
Siegfried Pammer
c9e3790adc
Remove UnresolvedUsingScope
5 months ago
Siegfried Pammer
d2d9281072
Move CanTransformToExtensionMethodCall to CSharpResolver
5 months ago
Siegfried Pammer
e56f12cf93
Fix #2165 : DeclareVariables step must update ResolveResult annotation when using out var.
5 months ago
Siegfried Pammer
6955704172
Updated CSharpConversions according to https://github.com/dotnet/csharpstandard/blob/draft-v9/standard/conversions.md
5 months ago
Daniel Grunwald
235ae52756
Always attempt standard implicit conversions before user-defined conversions.
5 months ago
Siegfried Pammer
d0fc0411fb
Update to C# 13 and fix field keyword
5 months ago
Daniel Grunwald
ccb8887657
Move AllowByRefLike to SRMExtensions.
5 months ago
Daniel Grunwald
90cd265e89
Update System.Reflection.Metadata dependency to 9.0.0.
...
Add explicit System.Security.Cryptography.Pkcs dependency to avoid security vulnerability warning in ILSpyCmd.
Suppress security vulnerability warnings in test projects.
5 months ago
Siegfried Pammer
f0c80e4a80
Silence NU1510
5 months ago
Siegfried Pammer
f97e59760b
Fix #3512 : Local function name collides with local variable name
5 months ago
Siegfried Pammer
ddb7171a2a
Fix #3524 : Property without backing field cannot have an initializer.
5 months ago
Jan Jones
2357d00939
Support `allows ref struct` constraint
5 months ago
Jan Jones
4c08359a6a
Support `byreflike` constraint
5 months ago
Siegfried Pammer
49368caf1c
Rename option to "UseObjectCreationOfGenericTypeParameter"
6 months ago
DoctorKrolic
47eeacd7aa
Add an option to not transform `Activator.CreateInstance<T>()` to `new T()`
6 months ago
Siegfried Pammer
d4a27b9b75
Fix net10.0-related bug in TargetServices.DetectTargetFramework
6 months ago
Christoph Wille
36d2135ecf
.NET 10.0 Preview5 NuGet Updates ( #3511 )
...
Bump all Microsoft.* and System.* to 10.0.0-preview5
Microsoft.CodeAnalysis.* to 4.14.0
Update other dependencies to latest
6 months ago
Siegfried Pammer
51a26180bb
Fix #3492 : Do not crash, if field used by RuntimeHelpers.InitializeArray is malformed.
6 months ago
Peter Crabtree
fdb0703179
fix: inter-project reference for SDK-style solutions
6 months ago
Peter Crabtree
7e1349583f
breaking: Change WriteSolutionFile to take a List<>
6 months ago
Peter Crabtree
9f89346057
fix: XML namespace for SDK-style projects in ProjectReferences
...
I accept any sideways glance for the allocation-averse code
6 months ago
Peter Crabtree
67366fe77a
fix: Handle SDK-style project references in WriteSolutionFile()
6 months ago
Peter Crabtree
d0e62a980f
nfc: Clean up multiple enumerations of IEnumerable<> in WriteSolutionFile().
...
(This is potentially expensive and the method is public, just a minor code smell.)
6 months ago