Siegfried Pammer
dbbcbb87fe
Make pattern matching transform a simple ILTransform for both reference and value types. Check that the true branch dominates all uses of the pattern variable.
4 years ago
Siegfried Pammer
83727ea4b0
Add support for value type patterns
4 years ago
Daniel Grunwald
c26d9ad6f1
Mark stack slot for aggressive removal in InfeasiblePathTransform
...
This helps with pattern matching in short circuiting operators.
4 years ago
Siegfried Pammer
c641072685
Translate MatchInstruction to BinaryOperatorExpression with BinaryOperatorType.IsPattern.
4 years ago
Daniel Grunwald
040ab41c69
Initial implementation of the pattern matching transform.
4 years ago
Siegfried Pammer
8eafbb3d90
Fix #2092 : aggressively inline code in compiler-generated lambdas and expression trees.
4 years ago
Siegfried Pammer
bc5d078feb
Fix #1698 : Readonly auto properties from VB.NET are not properly decompiled
4 years ago
Siegfried Pammer
1f0f6404e0
Fix #2231 : Add support for ldloca; dup; initobj pattern used by Roslyn.
4 years ago
Daniel Grunwald
685a79dc31
DetectExitPoints: introduce exit points for loops+switch
...
This allows reverting the changes to HighLevelLoopTransform+ReduceNestingTransform from the previous commit, which fixes a bug in loop detection (the previous commit did not handle loops where the loop BlockContainer didn't have a Block as parent).
4 years ago
Daniel Grunwald
6757295b3b
Fix #2379 : Keep `return` statements around in original form for ConditionDetection, only transform to fall-through block-exit at the end of the transform pipeline.
...
This fixes an issue where `return` statements within try-blocks could turn into `goto` statements.
4 years ago
Siegfried Pammer
aa147870a2
Fix #2389 : missing extern keyword for properties and events.
4 years ago
Siegfried Pammer
8fc64669c2
Add annotations on local function parameter declarations
4 years ago
Siegfried Pammer
5734da4294
Fix #2314 : ILSpy incorrectly resolves a runtime dependency when dll is present in both WindowsDesktop.App and NETCore.App
4 years ago
Siegfried Pammer
afa4db00b6
Fix #2297 : Add an option to disable decompilation of getter-only auto properties.
4 years ago
Siegfried Pammer
34557ab76b
#2294 : Remove redundant condition
4 years ago
Siegfried Pammer
fdda8abd74
Fix #2282 : Finalizers must be void and cannot be declared in interfaces
4 years ago
Siegfried Pammer
a5858f1694
Add support for primary constructor syntax.
4 years ago
Daniel Grunwald
0bf6d552e0
Records: support for fields.
4 years ago
Daniel Grunwald
90ce77f400
Omit EqualityContract if it's automatically generated.
5 years ago
Daniel Grunwald
9e589faeea
Omit members from record definitions if they are always compiler-generated.
5 years ago
Daniel Grunwald
f869756fed
Use "record" instead of "class" for C# 9 record class types.
5 years ago
Siegfried Pammer
3a7c69e5b9
Fix #2192 : Add support for VB.NET delegate construction
5 years ago
Siegfried Pammer
31b4e6ae6a
Fix #2185 : Fix MemberIsHidden-check for local function display structs: Async State Machines that looked like local function display structs were not hidden once local function decompilation was disabled. This led to code duplication in the generated pdb.
5 years ago
Siegfried Pammer
13636c89cc
Add support for C# 9: foreach with GetEnumerator extension methods.
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
5 years ago
Daniel Grunwald
d388319cba
Add support for C# 9 init accessors.
5 years ago
Siegfried Pammer
3f10294a72
Add DeconstructionTransform + implement DeconstructInstruction in ExpressionBuilder
5 years ago
Siegfried Pammer
18ace00266
Refactor LocalFunctionDeclarationStatement + LocalFunctionMethod
5 years ago
Daniel Grunwald
f93ea325d4
Remove redundant StatementTransform pass.
...
This duplicate pass only made sense back when we ran CopyPropagation as part of the BlockILTransform.
5 years ago
Daniel Grunwald
7d3dfc3b81
Remove the hack where IndexRangeTransform looks at instructions prior to startPos.
...
Instead we now perform a partial transformation which we can then later extend.
This means we no longer need to rely on the previous instruction (prior to startPos) being already inlined.
This way the IndexRangeTransform also works without the duplicate StatementTransform pass.
5 years ago
Daniel Grunwald
1b2874eb5d
Use `nint` type for local IntPtr variables if arithmetic is performed on them.
5 years ago
Daniel Grunwald
016d9f8f4d
Fix #1903 : un-inline argument of unsupported `isinst` instructions.
5 years ago
Siegfried Pammer
30c8a22ded
Fix #1765 : Add another pattern of FSM initialization to ReadCodeMappingInfo
5 years ago
Siegfried Pammer
0df7e1e4a5
Fix #1999 : Compiler generated variables with weird names; by supporting a newer naming-convention used by mcs for anonymous delegates: See c2795c9cb5/mcs/mcs/delegate.cs (L808)
5 years ago
Siegfried Pammer
6382f8c41d
Fix #1990 : Empty default ctor with XML comment discarded from decompilation
5 years ago
Daniel Grunwald
cd04e80f5e
Use IsKnownType() when checking for System.Object
5 years ago
Siegfried Pammer
60e9c204cc
Fix #1940 : Make sure that we use the correct .NET Core version, when there are multiple frameworks loaded in the current assembly list.
5 years ago
Daniel Grunwald
12226c5f90
Add support for indexing a container with a System.Index instance.
5 years ago
Daniel Grunwald
0cf50aa827
Fix #1959 : Resolve the "F(G<A,B>(7));" grammar ambiguity by inserting parentheses when necessary.
5 years ago
Siegfried Pammer
df84ab8f6b
Fix #1882 : Provide a setting to desugar X? into Nullable<X> for value types
5 years ago
Daniel Grunwald
9e82b95373
Fix hexadecimal format of flags enum member initializers.
5 years ago
Siegfried Pammer
e189ad9ca3
Fix #1863 : Invalid decompilation: accessibility level for CompilerGenerated method
5 years ago
Siegfried Pammer
83c525c1c2
Fix #1758 : Input var name conflicting with framework class name
6 years ago
SilverFox
8c8dcf5630
Fix issue #1762
6 years ago
Daniel Grunwald
de33e79384
Add tests for 'async IAsyncEnumerable'.
...
Remove [AsyncIteratorStateMachine] attribute and left-over ldc.i4 instructions.
6 years ago
Daniel Grunwald
f8ee7c2bf3
Initial support for `async IAsyncEnumerator<T>` methods
6 years ago
Siegfried Pammer
9190515d8b
#1151 : Support for ref readonly locals.
6 years ago
Siegfried Pammer
51b48b9332
Fix #1685 : Add "Always show enum values" setting.
6 years ago
Siegfried Pammer
9358ea6d73
Fix ReadCodeMappingInfo for delegates that are embedded in the declaring type, not a nested type.
6 years ago
Siegfried Pammer
25f625af99
Move copy propagation after expression and statement transforms.
6 years ago