Daniel Grunwald
0a9df3d373
Fix #1252 : Incorrect comparison type for lifted comparisons in expression trees.
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
Wenxuan Zhao
3e937cf7cb
Fix delegate in yield return issue for assembly compiled with Mono
7 years ago
Daniel Grunwald
ef866040b4
Update to SRM 1.6.0 and Roslyn 2.9. Adjust decompiler to new code pattern used for lifted nullable comparisons.
7 years ago
Daniel Grunwald
12e74daf48
Handle Comp in InferType().
7 years ago
Chicken-Bones
ab9397d099
Add ReduceNestingTransform
7 years ago
Chicken-Bones
e9b766d708
Improve persistence of IL offsets through various transforms.
7 years ago
Siegfried Pammer
6719dacabd
Fix #1279 : Event fields in object initializers
7 years ago
Siegfried Pammer
65cf13ce27
Fix #1270 : Bad decompilation of mcs switch-on-string
7 years ago
Chicken-Bones
52a279f861
Restore HighLevelLoopTransform pattern match for loop contents within if body
7 years ago
Chicken-Bones
7017d998d0
Improve switch decompilation in loops via early detection of continue blocks.
7 years ago
Chicken-Bones
62b2ad4f8d
Improve UseCSharpSwitch to reduce over-aggressive use of switch producing poor quality code.
7 years ago
Siegfried Pammer
cf1d05042f
Add detection of local functions, so we do not hide the methods/display classes.
7 years ago
Siegfried Pammer
1dcae5bff8
Extend HandleCall to NewObj instructions as well.
7 years ago
Siegfried Pammer
b701bed2ff
SplitVariables: analyze address usage in virtual calls as well. Treat them the same as call instructions.
7 years ago
Siegfried Pammer
4fab913bf6
Fix #1249 : Bug in detection of multiple nested expression trees in query expressions.
7 years ago
Siegfried Pammer
08af55aa57
Avoid ITypeDefinition.FullName. Use Name and Namespace separately to avoid string allocation. Reorder checks to improve performance on pattern mismatch.
7 years ago
Siegfried Pammer
ebbe25fba7
Apply suggested refactorings on TransformArrayInitializers.cs
7 years ago
Siegfried Pammer
772b529d16
Add support for stackalloc initializer pattern that uses initblk.
7 years ago
Siegfried Pammer
057ab82534
Add basic stackalloc initializer transforms.
7 years ago
Siegfried Pammer
2a537fcecb
Reorder code in TransformArrayInitializers.cs
7 years ago
Andrew Au
9837933e9d
Fix issue #1224
7 years ago
Daniel Grunwald
2f54eee5db
#1195 : Fix comparison of object reference with ldc.i4 0.
7 years ago
Daniel Grunwald
ba0a3af3c4
#1195 : Fix several issues decompiling SharpSvn.dll (C++/CLI)
7 years ago
Daniel Grunwald
066da1ea16
Fix #1200 : assertion in TransformInlineAssignmentLocal when reconstructed stack slot (after async-await transform) has small integer type.
...
The assertion was unnecessary, because we already check 'IsImplicitTruncation(inst.Value, inst.Variable.Type)'.
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
Daniel Grunwald
9479e8af13
Support overloaded operator &&/||.
7 years ago
Chicken-Bones
f539bee362
Move binary->logical AND to ExpressionTransforms and use SemanticHelper.IsPure
7 years ago
Chicken-Bones
fe6a85fa68
Reverse Roslyn optimisation to favour && over & on boolean operands.
7 years ago
Daniel Grunwald
90d866d78a
Fix #1193 : Performance issues with deeply nested block structures
7 years ago
Daniel Grunwald
b396d203bd
Merge IDecompilerTypeSystem with ICompilation.
7 years ago
Daniel Grunwald
1f3916d554
Use the resolve methods in MetadataModule, and remove the wrappers in DecompilerTypeSystem.
7 years ago
Daniel Grunwald
c54632e7cb
Fix some type system bugs.
7 years ago
Daniel Grunwald
107fe5eb1c
Eliminate SpecializingDecompilerTypeSystem and use GenericContext instead.
7 years ago
Daniel Grunwald
4580eab7ab
Disable ref inline assignments.
...
This increases the chances that we'll avoid CS8174: A declaration of a by-reference variable must have an initializer.
7 years ago
Daniel Grunwald
7ee686cb67
Allow splitting a variable even if it has its address taken and stored in a ref-local.
...
The currently implementation is somewhat minimal and only works in a very limited set of circumstances:
* the ref local is single-assignment
* the ref local is initialized directly with 'ldloca target; stloc ref_local',
not a derived pointer (e.g. 'ldloca target; ldflda F; stloc ref_local').
* all uses of the ref_local are immediately consuming the address
This improves variable splitting cases where the compiler re-uses a stack slot containing a reference,
e.g. in some cases of '?.' on Nullable<T>.
7 years ago
Daniel Grunwald
3b46776c5e
Rename IAssembly -> IModule.
...
While support for multi-module assemblies isn't fully working yet; it is clear at this point that we want
to treat each module in a multi-module assembly separately for the purposes of the type system.
7 years ago
Daniel Grunwald
33ef82f75c
Fix #1082 : Add support for compound assignment with string.Concat().
...
Currently only supports the binary overloads of string.Concat().
7 years ago
Daniel Grunwald
d166101387
Allow splitting variables that have their address taken.
...
This works if all addresses are immediately used in calls (as common with method calls on value-type,
which take 'this' by-reference); as long as the call doesn't return the reference again.
Closes #1136 .
7 years ago
Daniel Grunwald
b149238777
Introduce IType.IsByRefLike.
7 years ago
Siegfried Pammer
20ccd51948
Fix bug in SwitchOnStringTransform.SimplifyCascadingIfStatements: Do not eliminate unrelated stores right before the start of the switch.
7 years ago
Siegfried Pammer
68123fc6b3
Fix build.
7 years ago
Siegfried Pammer
78dab4f44b
Cleanup
7 years ago
Siegfried Pammer
4540b93e19
Use ArgumentOutOfRangeException or BadImageFormatException in switch-default sections.
7 years ago
Siegfried Pammer
51c62353bd
Replace exception with assertion in DelegateConstruction.
7 years ago
Siegfried Pammer
0377f406f8
Remove some NotImplementedExceptions/NotSupportedExceptions
7 years ago
Siegfried Pammer
bcfb3742eb
Clean up PEFile, move Pdb related types to DebugInfo namespace
7 years ago
Siegfried Pammer
c593ef960a
AssignVariableNames: unwrap modified / pinned types to ensure variables get nice names.
7 years ago
Siegfried Pammer
069e4072de
Fix compile errors after merge.
7 years ago
Siegfried Pammer
4cca07aeb3
TransformExpressionTrees: Fix bug in Expression.Quote handling
7 years ago