Siegfried Pammer
f695bbcf3a
Add support for DefaultInterpolatedStringHandler
3 years ago
Siegfried Pammer
fbafc0289b
Fix #2741 : CallBuilder produces invalid invocation target when disambiguating calls to protected methods.
3 years ago
Siegfried Pammer
5078796b17
Add support for string format alignment.
3 years ago
Siegfried Pammer
d3f8912d53
Handle special-cases with addressof:
...
- Never introduce casts for ldobj-address-chains
- Add special-case to TransformExpressionTrees: transform addressof(ldloc) to ldloca
- Classify foreach and using variables as readonly lvalues
3 years ago
Siegfried Pammer
8dd721aee3
Fix #2706 : Filenames and directories truncated to 30 characters.
...
With the built-in support for long paths in .NET 6.0, we no longer need to check for the registry key. The only limitation that remains is maxSegmentLength, which seems to be 255 on all commonly used file systems/all platforms. Also there is no need to differentiate between Windows and other platforms.
- Windows Explorer in Windows 10 seems to be fine with files generated by ILSpy that have names longer than 260 characters.
- Notepad++ and other applications seem to use 8.3 path syntax to access the file.
- Visual Studio 2022 does not like the long path names, affected users should raise an issue with MS. ILSpy generates proper paths.
3 years ago
Siegfried Pammer
702a7da2c3
Fix #2714 : Force inlining of call targets in ctor initializers.
3 years ago
Siegfried Pammer
7ce453c73d
Fix #2710 : enhanced using statements are not allowed as embedded statements.
3 years ago
Andrii Kurdiumov
a2e9a2f5d8
Allow decompile C++/CLI assemblies
...
When C++/CLI project produce assembly it generates target attribute like this
```
[assembly: TargetFramework(".NETCoreApp,Version=7.0", FrameworkDisplayName = "")]
```
when C# generates `TargetFrameworkAttribute` it produce slightly different format
```
[assembly: TargetFramework(".NETCoreApp,Version=v7.0", FrameworkDisplayName = "")]
```
3 years ago
Siegfried Pammer
11468135b4
Add special-case for non-primary record struct constructors
3 years ago
Siegfried Pammer
d248867302
Add support for C# 10 record structs.
3 years ago
Siegfried Pammer
7e08c348b5
#2685 : Emit 'override' without 'newslot' as 'virtual' if there is no (known) method to override.
3 years ago
Siegfried Pammer
c66eb7bbef
#2685 : Hide ctors from ComImport classes.
...
#2685 : Remove logic added in previous commit, as it breaks our ILPretty tests.
3 years ago
Siegfried Pammer
3e05a8d763
#2685 : Emit 'override' without 'newslot' as 'virtual' if there is no (known) method to override.
3 years ago
Siegfried Pammer
54a3bba820
#2685 : Do not add interface impl helper for extern methods.
3 years ago
Daniel Grunwald
d6d0392d2f
Fix crash when IL byte code unexpectedly ends in the middle of an operand.
3 years ago
Siegfried Pammer
e043f43925
Ignore local functions when collecting used members.
...
This is necessary because LocalFunctionMethod.DeclaringTypeDefinition points to the current type.
3 years ago
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
b7edf2eb59
Detect compiler-generated code that is still needed after decompilation.
3 years ago
Siegfried Pammer
1532d2fc29
Refactor DoDecompile(ITypeDefinition): Extract handling of members and types into local function. Order of output no longer depends on the order of decompilation, which will become relevant in the next commit.
3 years ago
Siegfried Pammer
73f2493644
Fix #2629 : Indentation of method-call chains.
3 years ago
Siegfried Pammer
9e462b53ad
Add support for C# 11 parameter null checks
3 years ago
Siegfried Pammer
6a27959cbc
Improve decompilation of delegate references of extension methods.
3 years ago
Siegfried Pammer
0bc11d05d3
Fix #2634 : target expressions of delegate references were not decompiled correctly
3 years ago
Zachary Northrup
9c17029702
Fix the ordering of COM interface methods and properties to appear in their originally defined order. This was resulting in fatal crashes while running decompiled COM interop code.
3 years ago
Siegfried Pammer
2e31427d56
Fix nullability warnings in AstNode and XmlDocumentationElement.
3 years ago
Daniel Grunwald
a9f4694563
Add test for C# 11 generic attribute
3 years ago
Siegfried Pammer
9935f51b96
Fix #2646 : Missing values for enums with skipped or duplicate items
3 years ago
Siegfried Pammer
1ee3384a05
Fix #2640 : Invalid implicit enum value for unordered items
3 years ago
Siegfried Pammer
a0fb71abad
Fix EntityHandle.GetDeclaringType extension and add TypeSpecification.GetGenericType
3 years ago
Siegfried Pammer
db034d3048
Remove incomplete/wrong support for null-forgiving operator.
3 years ago
Siegfried Pammer
f98012ec16
DetectPinnedRegions: Support special case where pinned pointer is unused and the compiler optimized out the StopGCTracking-conversion.
3 years ago
Siegfried Pammer
cbcfcf6c2a
IntroduceQueryExpressions: Do not ignore attributes on lambdas
3 years ago
Siegfried Pammer
5f73bfbb01
Fix Deconstruction for Deconstruct instance methods of value-types.
3 years ago
Siegfried Pammer
2de6e1fe30
Ignore nullability annotations when comparing types in the case of implicit conversions.
3 years ago
Siegfried Pammer
41c99e4727
#2622 : Fix crash in ExpressionBuilder when decompiling object initializer composed of readonly properties.
3 years ago
Daniel Grunwald
db7d507138
Fix #2615 : Overflow check did not work reliably due to fp rounding error
3 years ago
Siegfried Pammer
00a32e0575
Use AlwaysQualifyMemberReferences = true in Windows Forms InitializeComponent methods.
3 years ago
Siegfried Pammer
2a7e9c1d78
#2590 : Fix printing of "Invalid MethodBodyBlock" comments. Make them appear between the braces of the block.
3 years ago
Siegfried Pammer
2646265069
#2565 : Improve GetFileNameForResource: Assume that input is already a filename.
3 years ago
Siegfried Pammer
37456672d7
WholeProjectDecompiler: set segment length for Unix to 255.
3 years ago
Siegfried Pammer
a48f0d311c
Fix #2330 : Add conditional sub directory support
3 years ago
Siegfried Pammer
01e5e70bf7
'override' is only valid outside of interfaces.
3 years ago
Siegfried Pammer
15f49c0079
Add basic support for abstract static members in interfaces.
3 years ago
Siegfried Pammer
bf336d85cf
Fix second issue mentioned in #2565 : resource names such as path/to/file.ext are now properly handled as relative paths.
4 years ago
Siegfried Pammer
849161e362
- Replace DecompilerTextView.CleanUpName with direct uses of WholeProjectDecompiler.CleanUpFileName
...
- Add file extension handling to WholeProjectDecompiler.CleanUpName
- Add WholeProjectDecompiler.SanitizeFileName, which respects file extensions
4 years ago
Daniel Grunwald
787621fb51
Revert "Use Nop instead of InvalidExpression to hold the "goto from catch-block to try-block" comment"
...
This reverts commit 77dcbbee86
.
4 years ago
Daniel Grunwald
77dcbbee86
Use Nop instead of InvalidExpression to hold the "goto from catch-block to try-block" comment
4 years ago
Daniel Grunwald
f104233e78
Fix #2388 : Add support for branch from catch-block to try-block (VB `On Error Resume Next`)
4 years ago
Daniel Grunwald
8fb44414c9
Remove unused GenerateConvHelper
4 years ago
Siegfried Pammer
ec6a9afc57
Fix #2448 : Decompiler shows some enum values as hexdecimal instead of decimal
4 years ago