Siegfried Pammer
94050a4aca
Rewrite TransformFieldAndConstructorInitializers from a step-by-step AST-based analysis to an analysis that tracks the whole constructor body.
5 months ago
Siegfried Pammer
f6c763e7bb
Add tests for ExtensionEncodingV1 and ExtensionEncodingV2.
6 months ago
Jeremy Pritts
d1dc7b258a
Copy-propagate the stack slot for collection initializers ( #3554 )
...
* Copy-propagate the stack slot for collection initializers
* Use pattern matching
8 months ago
Peter Crabtree
e1e16b64f5
dev: Strip BOM mark from text files
8 months ago
Daniel Grunwald
ec58d57875
#3465 : Fix bugs in `comp.o` handling.
8 months ago
Daniel Grunwald
89083eaf48
Fix #3344 : Add support for the `ckfinite` opcode.
8 months ago
Siegfried Pammer
052466fce7
Add test case
9 months ago
Siegfried Pammer
ddb7171a2a
Fix #3524 : Property without backing field cannot have an initializer.
9 months ago
Siegfried Pammer
cc4588db4b
Add a test case
10 months ago
Siegfried Pammer
f673b7caa2
Add support for using different editions of .NET in unit tests
10 months ago
Jeremy Pritts
0261ca3ae8
Fix stack overflow exception in CSharpResolver ( #3471 )
...
* Fix stack overflow exception in CSharpResolver
* lhs and rhs
12 months ago
ds5678
437bd5656c
Fix unit test
1 year ago
ds5678
7f024de786
Don't include generic constraints in generated explicit overrides
1 year ago
Siegfried Pammer
355a039b59
Sightly improve variable naming of known types such as EventArgs and Exceptions
1 year ago
Siegfried Pammer
ffcd468d22
Fix #1572 : parameters of lambdas and local functions are renamed, if there are with names from outer scopes collisions.
1 year ago
ds5678
e4000c8a5c
Enhance null handling in switch transformations
...
- Updated `Issue3421.cs`.
- Updated `MatchLegacySwitchOnStringWithDict` to check for `leaveContainer` and handle null sections accordingly.
- Introduced an overload for `AddNullSection` to accept `ILInstruction` as the body, improving flexibility.
- Modified existing `AddNullSection` to utilize the new overload, allowing for varied body types in `SwitchSection`.
1 year ago
ds5678
a1b3b14b0b
Add test
1 year ago
Siegfried Pammer
8c440f42a8
Fix #2166 : Unnecessary uint casts/conversions for certain bitwise operations
2 years ago
Siegfried Pammer
2043e5dd6f
Add support for C# 12 primary constructors.
2 years ago
Siegfried Pammer
3fb153940b
AssignVariableNames: Handle fixed statement special cases
2 years ago
Siegfried Pammer
95108c967a
Fix #3108 : illegal nested classes in enums throw off EnumValueDisplayMode handling.
3 years ago
Daniel Grunwald
03bceed0c1
Fix #2397 : Introduced calls to Unsafe.Read or Unsafe.Write when we would otherwise cause "Cannot declare a pointer to a managed type T" errors.
3 years ago
ElektroKill
4601481dec
Add ILPretty test for MCS 2.6.4 fixed string
3 years ago
Daniel Grunwald
768cb02f0b
Fix #2964 : Better error message when a method only contains a single ret instruction.
3 years ago
Daniel Grunwald
94d2ce0fcf
Fix crash when control flow reaches end of method.
3 years ago
Siegfried Pammer
e5426bb803
Add missing EmbeddedAttribute in Unsafe.il testcase.
4 years ago
Standa Lukeš
6153f9cf35
Add test for indexer initializers
4 years ago
Standa Lukeš
18481efc44
Fix initialization of FakeProperty with setter
...
Seems like a typo - the setter method was assigned to the Getter property
The test GuessAccessors needed adjustments in the generated code.
ILSpy is more eager to merge property assignments
4 years ago
Siegfried Pammer
c5ff0cafc5
TransformInlineAssignmentStObjOrCall: Make sure no dead store is produced by the transform.
4 years ago
Siegfried Pammer
48a8351e27
Use Unsafe.SizeOf when taking the size of a managed type.
4 years ago
Siegfried Pammer
7e08c348b5
#2685 : Emit 'override' without 'newslot' as 'virtual' if there is no (known) method to override.
4 years ago
James May
4a1f79a32a
Assume conventionally named unresolved method references are properties or events.
...
eg. decompiles to .Property instead of .get_Property()
4 years ago
Siegfried Pammer
ec1b9a4ccd
Fix #2443 : do not use this()-ctor initializers by accident if base type is unknown.
5 years ago
Siegfried Pammer
bc5d078feb
Fix #1698 : Readonly auto properties from VB.NET are not properly decompiled
5 years ago
Siegfried Pammer
3f721a17c1
Add support for System.Runtime.CompilerServices.SpecialNameAttribute
5 years ago
Daniel Grunwald
f2d3f259fd
#2311 : Adjust test case for #1292 -- fixed statement is now correctly detected
5 years ago
Daniel Grunwald
6951ccb1a2
Fix #2260 : switch(string) transform: handle empty cases where the C# compiler optimizes out the `if`
...
e.g.
```
switch (<PrivateImplementationDetails>.ComputeStringHash(text2))
{
case 1288728352u:
_ = text2 == "rowno";
break;
...
```
5 years ago
Siegfried Pammer
a5858f1694
Add support for primary constructor syntax.
5 years ago
Siegfried Pammer
cc19e9043e
Fix #603 : Single element arrays should not span multiple lines
...
Fix #1079 : CSharpFormattingOptions.AutoPropertyFormatting has no effect
5 years ago
Daniel Grunwald
411457c4c7
#1240 : Add support for Unsafe comparison intrinsics: `AreSame`, `IsAddressLessThan`, `IsAddressGreaterThan`
6 years ago
Daniel Grunwald
6e8c1b3117
ILReader: support comparison between StackType.Ref and StackType.I
...
Update Unsafe.il tests to .NET 5.0 version.
6 years ago
Daniel Grunwald
782e4ae88c
Fix #2215 : Use `Unsafe` intrinsics for `ldobj`/`stobj` instructions.
...
Use `Unsafe.As` to adjust the type of a managed reference if necessary (without converting to a pointer type).
This also adds support for the `ReadUnaligned`/`WriteUnaligned` intrinsics.
6 years ago
Daniel Grunwald
54231edb4b
Fix #2189 : Invalid C# generated when pinning an unmanaged pointer.
...
C# has some special rules for allowed expressions inside a fixed statement.
In the non-allowed cases, emit an `Unsafe.AsRef()` call to prevent compiler errors.
6 years ago
Siegfried Pammer
be57dc454c
Run tests with different versions of Roslyn
6 years ago
Daniel Grunwald
80cf72e498
#2182 : Move "Transform call to struct constructor" from EarlyExpressionTransforms to ILReader.
...
This fixes the evaluation order for such calls (and an assertion in StObj.CheckTargetSlot).
6 years ago
Daniel Grunwald
47685c4b57
Fix weird casts to `nint` when writing to fields of unknown type.
6 years ago
Daniel Grunwald
6010757d22
Add support for .NET 5 custom calling conventions.
6 years ago
Daniel Grunwald
836bc37050
Upgrade ilasm.exe version. This allows us to write tests for the new function pointer calling conventions.
6 years ago
Siegfried Pammer
8e9ecf6c36
Fix #2162 : handle VariableInitializers like AssignmentExpressions in InsertParenthesesVisitor
6 years ago
Daniel Grunwald
63d1f5bb09
Adjust old `calli` test case to new function pointer syntax
6 years ago