Daniel Grunwald
beed6b5e24
Remove MarkGeneratedVariables() step in AsyncAwaitDecompiler.
This was left-over from earlier versions; but ILSpy stopped caring so much about variable vs. stack slot since Roslyn started to optimize more aggressively.
The change of variable type caused problems for debug information and could even cause an assertion.
Closes #1456 , closes #1562 .
6 years ago
Daniel Grunwald
5a8796c05c
Reuse the existing TSAB.
6 years ago
Siegfried Pammer
37e14f43e3
Refactor/Clean up local functions representation in type system.
6 years ago
Siegfried Pammer
0719aa9f08
Enable DecompilerSettings.IntroduceLocalFunctions
6 years ago
Siegfried Pammer
b83cb41f2e
Add pretty tests for local functions.
6 years ago
Siegfried Pammer
305b47245e
Refactor representation of local functions in ILAst.
6 years ago
Siegfried Pammer
8d1522f387
Transform display classes used in local functions.
6 years ago
Siegfried Pammer
bd77b8301f
Basic implementation of local functions.
6 years ago
Daniel Grunwald
961923f4fd
#1499 , #1240 : Translate pointer arithmetic on managed pointers (ref T) using the System.Runtime.CompilerServices.Unsafe intrinsics
6 years ago
Daniel Grunwald
a5505ab00d
Expose IMethod.AccessorKind. This makes it easier to determine if a method is a setter, particular in generic classes where "m.AccessorOwner?.Setter == m" ended up being wrong.
6 years ago
Siegfried Pammer
54ff546221
Fix deactivated Generics pretty tests: remove redundant boxing conversion from is-expressions.
7 years ago
Daniel Grunwald
6a47826fe2
Add sequence point on closing brace if there's an implicit void return.
7 years ago
Daniel Grunwald
2eafa0c695
Fix #1389 : Translation of "isinst" was incorrect for value types was causing an assertion.
7 years ago
Siegfried Pammer
deeb603fd7
Fix #1395 : do-while loop missing entry-point label.
7 years ago
Daniel Grunwald
e041454987
Add pretty tests for "yield return" and fix some minor bugs:
* remove redundant casts on yield-return-expression
* keep variable name from metadata for foreach loops
* fix 'yield break;' in nested try-finally sometimes causing a decompiler error
7 years ago
Siegfried Pammer
fbb3f230d0
StatementBuilder: do not insert continue statement at end of loop, if it's already present.
7 years ago
Siegfried Pammer
e00e7b691a
Move memcpy/memset comments before statement.
7 years ago
Daniel Grunwald
dd5845e83d
Support short-circuiting operators with dynamic. (e.g. "if (x.A && x.B)" where "x" is dynamic)
7 years ago
Siegfried Pammer
57597caf1f
Fix #1227 : System.InvalidCastException: Cast from Int64 to Empty not supported.
7 years ago
Daniel Grunwald
b396d203bd
Merge IDecompilerTypeSystem with ICompilation.
7 years ago
Daniel Grunwald
796612209d
Fix #1147 : Use C# 7.3 syntax for ref reassignment.
7 years ago
Siegfried Pammer
4540b93e19
Use ArgumentOutOfRangeException or BadImageFormatException in switch-default sections.
7 years ago
Daniel Grunwald
64547de4a0
foreach loops now use "var" if the element type is a tuple and can be inferred from the collection type.
Additionally, the tuple element names inferred from the collection type are now used when translating the foreach body.
7 years ago
Siegfried Pammer
b44a725eaa
Fix type of foreach variable
7 years ago
Daniel Grunwald
140e22d2a4
Remove unnecessary cast to IEnumerable when using foreach loop on dynamic collection.
7 years ago
Daniel Grunwald
bcc1586f72
ILAst transform for named arguments.
7 years ago
Siegfried Pammer
5dd7eaf129
Fix #1093 : Remove usage of type or this qualifiers, when possible.
7 years ago
Siegfried Pammer
384111f0dd
Fix #1075 : NullReferenceException in StatementBuilder.TranslateSwitch
8 years ago
Siegfried Pammer
7544eac5b4
Add support for mcs 2.6.4 switch-on-string
8 years ago
Daniel Grunwald
480ddc0c8f
#1055 : Use more type hints in ExpressionBuilder.
8 years ago
Siegfried Pammer
7cbcdd9f0e
#1049 : add back some decompiler settings
8 years ago
Siegfried Pammer
ebf213d85e
Fix #1047 : Unsupported method
8 years ago
Siegfried Pammer
29a2d3ec34
Refactoring of ILFunction: allow Method and CecilMethod to be null for expression trees.
8 years ago
Siegfried Pammer
d424d93dce
Fix invalid variable inlining in foreach ( fixes #889 )
8 years ago
Siegfried Pammer
7c395d77ed
Handle do-while loops with empty bodies as while loops.
8 years ago
Siegfried Pammer
b3370506ae
Fix small regressions
8 years ago
Siegfried Pammer
bfb310b4a3
Remove DetectedLoop
8 years ago
Siegfried Pammer
1de895524f
Adapt StatementBuilder.ConvertLoop to new HighLevelLoopTransform changes.
8 years ago
Daniel Grunwald
90d37ec72e
Fix missing label in #447 .
8 years ago
Siegfried Pammer
2c68d99336
Fix #959 : Crash in CSharp.StatementBuilder.TranslateSwitch (due to empty sequence)
8 years ago
Siegfried Pammer
9e25ed562a
Remove unused RequiredGetCurrentTransformation.UninlineAndUseExistingVariable
8 years ago
Siegfried Pammer
086325afdf
Fix #917 : InvalidCastException: Cast from Int64 to Boolean not supported.
8 years ago
Siegfried Pammer
4ca4d97011
Improve SequencePointBuilder
8 years ago
Siegfried Pammer
f2ee1c55f9
Add test case for switch without default + remove empty default sections in StatementBuilder.
8 years ago
Siegfried Pammer
b3c7f53c86
Add nullable handling to StatementBuilder.CreateTypedCaseLabel
8 years ago
Siegfried Pammer
403a79099a
Introduce BlockContainer.FindClosestSwitchContainer
8 years ago
Siegfried Pammer
596fca2b37
Fix unit tests
8 years ago
Siegfried Pammer
4c44f05af1
Fix bug in StatementBuilder: do not inline blocks into switch case that are outside of the switchContainer.
8 years ago
Siegfried Pammer
01c6f414f9
Implement goto default in StatementBuilder
8 years ago
Daniel Grunwald
164f9b82a8
Fix DeclareVariables.FindInsertionPoint not treating lambda bodies as capture scopes
8 years ago