Siegfried Pammer
47250d670b
Fix #2791 : Ensure that the capture scope used is either a loop or the ILFunction root container.
3 years ago
Siegfried Pammer
ac6a2e54ca
Use IsAccessor again.
3 years ago
Siegfried Pammer
927b46b17d
Fix #2787 : Enable NRT in TransformCollectionAndObjectInitializers and fix problems.
3 years ago
Siegfried Pammer
ed02b2eb9e
Add MemberNotNullWhenAttribute to IMethod, IProperty and IEvent. Make sure that it's guaranteed that AccessorOwner is non-null, when IsAccessor is true.
3 years ago
Siegfried Pammer
9f6f7a03ac
Fix #2788 : Handling of cpobj in ILReader was missing the stobj special case for the target pointer.
3 years ago
Siegfried Pammer
1ac1bd6eab
Remove context field from TransformCollectionAndObjectInitializers, inline DoTransform.
3 years ago
ElektroKill
1447038ce1
Fix #2736
3 years ago
Siegfried Pammer
a3191f19e2
Fix #2763 : Improve decompilation of switch-on-enum by preserving enum type information when inlining local variables into SwitchInstruction.Value.
3 years ago
Siegfried Pammer
500b439c5d
Another round of fixes in TryReadResource
3 years ago
Siegfried Pammer
7444dd96e3
Refactor Resource.TryGetLength and TryOpenStream.
3 years ago
Siegfried Pammer
3c0ab6a2ce
Fix #2780 : Show embedded resource size
3 years ago
Siegfried Pammer
81f575e9ce
Use PopStObjTarget in ILReader, if a call instruction has the same semantics as initobj.
3 years ago
Siegfried Pammer
948da3f9ee
ILInlining: IStatementTransform.Run repeatedly inline all possible statements.
3 years ago
Daniel Grunwald
503048b314
Prevent the early ILInlining pass from creating `addressof` instructions
3 years ago
Daniel Grunwald
9254abcf88
Fix StObj.CheckTargetSlot assertion
3 years ago
Daniel Grunwald
c36c6efb2a
ILReader: don't create stack slots if we can directly created inlined ILAst
...
This is a performance optimization: we dramatically reduce the amount of ILVariables created;
and thus need to spend less time in the first ILInlining run.
3 years ago
Siegfried Pammer
af56bb10d0
Determine isBranchTarget in a separate pass. We will need it for an optimization to ILReader in a future commit.
3 years ago
Daniel Grunwald
0fbbb6d95e
Fix #2777 : StackOverflowException with recursive delegates
3 years ago
Christoph Wille
571ae3b5fd
ICS.D is used downstream with specific version requirements re:dependencies. ILSpy itself can use newer version, thus ICS.D.csproj is no longer using version vars from packages.props ( #2776 )
3 years ago
hexafluoride
fc6ae4c645
Add option to always fully qualify type names with global::
3 years ago
Siegfried Pammer
6d4c5f3273
Fix #2757 : Inject ILSpyUpdateAssemblyInfo into GetPackageVersionDependsOn so Pack uses the generated version when evaluating project references. ( #2769 )
3 years ago
Siegfried Pammer
cd1cea7d85
Fix #2759 : Some characters cause rendering issues in the tree view causing ILSpy to freeze. Also ignore embedded resources with an invalid offset, treat them as having zero byte length.
3 years ago
Daniel Grunwald
8b906f5c65
Fix unnecessary dict creation in TSAB constructor.
3 years ago
Siegfried Pammer
583f661153
Work on #1204 : Add optimized implementation of HasAttribute and GetAttribute to IEntity.
3 years ago
Daniel Grunwald
a06de7171c
Fix comments
3 years ago
Christoph Wille
b6766d906a
8.0.0-preview2 will be next version
3 years ago
Siegfried Pammer
c5ff0cafc5
TransformInlineAssignmentStObjOrCall: Make sure no dead store is produced by the transform.
3 years ago
Daniel Grunwald
b4b070468f
Revert "Performance Optimization: Do no longer collect all lower case type and member names."
...
This reverts commit 6584a2f576
.
3 years ago
Siegfried Pammer
6584a2f576
Performance Optimization: Do no longer collect all lower case type and member names.
3 years ago
Siegfried Pammer
48a8351e27
Use Unsafe.SizeOf when taking the size of a managed type.
3 years ago
Siegfried Pammer
2ed9ad6b51
Add support for C# 11 scoped parameter modifier.
3 years ago
Siegfried Pammer
5f324de10b
Add support for ref fields.
3 years ago
Siegfried Pammer
1f1e95d7a1
Update RecordDecompiler for Roslyn 4.3.0.
3 years ago
Daniel Grunwald
3c847b56a2
Fix decompilation of async streams compiled with Roslyn 4.2
3 years ago
Daniel Grunwald
21c3ec046f
Output attributes on lambda expressions
3 years ago
Siegfried Pammer
5046e4cf60
Fix #2718 , Fix #2719 , Fix #2725 : Remove WPF compiler-generated code.
3 years ago
Daniel Grunwald
08ceffc3ad
Upgrade dotnet-format from version 5 to the version included with the .NET (6) SDK.
3 years ago
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
186cc51bf7
Fix #2733 : Ignore bad metadata when trying to resolve ResolutionScope
3 years ago
ElektroKill
760a6a653e
Reduce allocations in TransformArrayInitializers
...
DecodeArrayInitializer - Instead of relying on the Add method of a list to expand the underlying array when necessary, the code now allocates a big enough array to fit all the elements removing the need for the Add method to expand the array several times.
BlockFromInitializer now reuses a single instance of List<ILInstruction> instead of reallocating a new one every time and clears it when necessary. The same pre-allocation approach mentioned above has been implemented here too.
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
874ac9ac0b
Fix #2712 : TransformCollectionAndObjectInitializers fails to properly detect set-accessors of FakeProperties.
...
Bug likely introduced due to an oversight in #2677 .
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
e905160537
Extend definition of ComputeIsRecord to avoid false-positives.
3 years ago
Siegfried Pammer
11468135b4
Add special-case for non-primary record struct constructors
3 years ago