Daniel Grunwald
35c405b973
Translate the initializer of a `fixed` statement as managed reference and only apply the ref-to-pointer conversion at the end.
...
This way we create compilable code when the pinned variable type does not match the initializer type.
5 years ago
Daniel Grunwald
a9d643b208
Emit a call to `ref Unsafe.As<TFrom, TTo>(ref TFrom)` when the IL code contains a mismatch of managed reference types.
...
The previously emitted `ref *(TTo*)(&source)` only compiles when `source` is a local variable; otherwise C# complains about the memory not being pinned.
Note that we special-case local variables to keep the previous behavior around; this avoids pulling in `System.Runtime.CompilerServices.Unsafe.dll` when it's unnecessary.
5 years ago
Daniel Grunwald
2c0554f129
Fix #1963 : Support decompiling `calli` instructions into C# 9 function pointer syntax.
5 years ago
Daniel Grunwald
1f2d1660c8
#2023 : If blocks are reachable both from within the pinned region and from outside it, clone those blocks.
...
This removes an error condition where pinned variables could remain after DetectPinnedRegions, resulting in invalid C#.
The downside is that it's possible for the code size to increase exponentially when given sufficiently evil IL code.
5 years ago
Daniel Grunwald
15f638af9a
Fix decompilation of switch where default section is a leave instruction.
5 years ago
Daniel Grunwald
a6e23d1f98
Fix "case null" handling in switch(string) with current Roslyn version (3.7.0-2.final).
5 years ago
Daniel Grunwald
30da0b7525
Add some missing checks to MatchRoslynSwitchOnString
5 years ago
Daniel Grunwald
4f4ca482be
Fix #1950 : Fix crash when finallyMethod cannot be found.
...
This seems to be possible due to a C# compiler bug.
5 years ago
Siegfried Pammer
d2abce2a7b
Fix possible NRE in TransformExpressionTrees.MatchGetTypeFromHandle and related methods
5 years ago
Christoph Wille
e3258bd322
Frontends for P4
5 years ago
Siegfried Pammer
9f0ca09e56
Fix #2033 : Wrong place for variable declaration.
5 years ago
Siegfried Pammer
3e4091442d
Simplify ExpressionBuilder.ConvertField.IsUnambiguousAccess by renaming it to ExpressionBuilder.ConvertField.IsAmbiguousAccess
5 years ago
Siegfried Pammer
4f6d4a0954
Fix #2037 : Try to detect framework type when TargetFrameworkAttribute is missing
5 years ago
Siegfried Pammer
52fce78b46
Merge pull request #2005 from icsharpcode/fix-1981
...
Fix #1981 : Ensure correctness of TDCU
5 years ago
Siegfried Pammer
6b2e619251
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into fix-1981
5 years ago
Siegfried Pammer
be8c83e1a4
Disable Test9
5 years ago
Daniel Grunwald
478db592aa
Merge pull request #1880 from Chicken-Bones/master
...
Improve ReduceNestingTransform by considering nested containers (Try/Using/Lock/Pinned/etc)
5 years ago
Daniel Grunwald
80063e3c15
Fix TDCU's version of copy propagation being too aggressive.
5 years ago
Chicken-Bones
da905acc6d
Fix logic error in last commit, and ignore fault clauses in ReduceNestingTransform
5 years ago
Chicken-Bones
abd9af29c6
Fix failed assertion when encountering a finally block with an unreachable endpoint in ReduceNestingTransform.
5 years ago
Chicken-Bones
e0e26a0e77
Fix ReduceNestingTransform when extracting default block of switch in a try container
5 years ago
Siegfried Pammer
a2e45f3cdd
Merge pull request #2031 from dymanoid/sdk-style-csproj
...
SDK style C# project files
5 years ago
dymanoid
bfb57da93b
Implement project writer for SDK style projects
5 years ago
dymanoid
fdef5d11c6
Rearrange project writing logic
...
The WholeProjectDecompiler shall not have too many responsibilities.
5 years ago
dymanoid
b492a20442
Move assembly resolution logic to better place
...
WholeProjectDecompiler shall not care about checking whether an assembly
is in GAC.
5 years ago
dymanoid
a952cda502
Create dedicated namespace for project decompiler
5 years ago
dymanoid
48be6267f3
Replace tuples with value tuples
5 years ago
dymanoid
967aed2667
Add an option for new SDK style project format
5 years ago
Siegfried Pammer
68bac527d1
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into fix-1981
5 years ago
Siegfried Pammer
fcc910cb4d
Cleanup and refactoring after code review
5 years ago
Siegfried Pammer
f5954af953
Merge pull request #2030 from AustinWise/austin/FixMsdnSearchLink
...
Update links to Microsoft Docs.
5 years ago
Austin Wise
aae304b3db
Update links to Microsoft Docs.
5 years ago
Siegfried Pammer
b8ef9f5dd1
Merge pull request #2028 from dymanoid/implements-interface-analyzer
...
Add new 'Implements' analyzer for interface implementation lookup
5 years ago
dymanoid
8e7774de98
Add interface implementation analyzer and tests
...
The analyzer can be used on any non-static members of classes and
structs. The analyzer shows a new 'Implements' node for those members
that implement an interface (implicitly or explicitly). Abstract members
are considered as implementation. Overridden virtual members of base
classes are not considered.
5 years ago
dymanoid
e1417bac8b
Add Moq mocking library to ILSpy.Tests
5 years ago
dymanoid
211cc7aeae
Rename analyzers to reflect their headers
...
These analyzers show all members implementing the analyzed member,
not the members of implemented interfaces
5 years ago
Siegfried Pammer
5f27fd9744
Fix DotNetCorePathFinder not finding assemblies in parent assembly base path.
5 years ago
Siegfried Pammer
0b8824ca84
Fix two small bugs in TDCU
5 years ago
Siegfried Pammer
bcd7219535
Adjust CapturedVariables collection in ReplaceDelegateTargetVisitor and in TransformExpressionTrees
5 years ago
Siegfried Pammer
47311949d4
Revert "Fix #2013 : Add option to extract self-contained executables (PublishSingleFile)."
...
This reverts commit 0d390d604f
.
5 years ago
Siegfried Pammer
a49577ce2d
Fix #2020 : Mark Modifier Letter (Lm category) characters as printable
5 years ago
Siegfried Pammer
30c8a22ded
Fix #1765 : Add another pattern of FSM initialization to ReadCodeMappingInfo
5 years ago
Siegfried Pammer
358d677084
#1798 : Add more unit tests
5 years ago
Siegfried Pammer
81c8fcf958
Fix #2015 : NRE in ConnectionIdRewritePass.DecompileEventMappings
5 years ago
Siegfried Pammer
c6a1d5d67b
Fix #2014 : BAML rendering issue
5 years ago
Siegfried Pammer
0880ea4086
Merge branch 'master' into fix-1981
5 years ago
Siegfried Pammer
101aba3362
Validate uses of display-class variable copies before removing them
5 years ago
Siegfried Pammer
3436ac3246
Fix #2018 : Improve tooltips in IL/IL with C#/R2R view to show full member signatures
5 years ago
Siegfried Pammer
dcb9631677
Fix #2017 : Make sure we never use an empty string as tab header
5 years ago
Siegfried Pammer
27744e6006
Fix #2019 : Add MMB shortcut to "Open in new tab" for tree view and links
5 years ago