Daniel Grunwald
0f8c310de2
Started work on new resolved TS implementation that directly uses SRM.
...
This is a work-in-progress; ILSpy is not functional with this commit.
The old code path still exists but is broken because some classes were modified for the new system.
The new system is still highly incomplete (types only have fields, but no methods).
8 years ago
Daniel Grunwald
96e3b23ab3
Fix crash in ProxyCallReplacer
8 years ago
Daniel Grunwald
9a74f018b5
Decode metadata signatures directly into IType; without going through ITypeReference.
8 years ago
Daniel Grunwald
f86bec4e0c
Move named arguments to its own transform.
...
Like other statement transforms that build inline blocks, it's
important that the named argument transform runs after the
ExpressionTransforms.
8 years ago
Daniel Grunwald
ca09f09222
Don't use named arguments when IL stack is empty after the stloc.
...
An empty stack indicates the statement is complete, so the code
is usually more readable if we keep the local variable.
8 years ago
Daniel Grunwald
21d3881e37
Introduce named arguments only in the statement transform.
...
Don't use extension method syntax when 'this' parameter of
extension method is named.
8 years ago
Daniel Grunwald
810adea8b4
#1083 : Initial implementation of named arguments.
8 years ago
Daniel Grunwald
bcc1586f72
ILAst transform for named arguments.
8 years ago
Siegfried Pammer
b3db473211
Fix bug in AssignVariableNames: The first parameter of indexer getters was not properly handled.
8 years ago
Siegfried Pammer
9443983819
Fix #1144 : MatchRoslynCaseBlockHead did not handle inverse conditions properly.
8 years ago
Siegfried Pammer
bd15d69ada
Add test cases for #1138
8 years ago
Siegfried Pammer
5290677f80
Fix #1138 : Array-index out of bounds crash in TransformArrayInitializers.HandleSimpleArrayInitializer
8 years ago
Daniel Grunwald
469501210c
Add support for C# 7 tuple types:
...
* Use tuple literals instead of calling 'new ValueTuple<..>' constructor
* Where available, use element names for field access
* Make CallBuilder aware of tuple-name/dynamic type erasure, to avoid introducing casts when the types differ only in the tuple element names.
* Make CallBuilder provide a ResolveResult with the correct C# return type for the resulting expression.
Previously we were using the type-erased return type from the IL.
* Fix a bug that caused us to introduce returning casts when accessing an indexer.
8 years ago
Daniel Grunwald
0b48439170
Remove dead code from type system (CSharpConstantValue).
8 years ago
Siegfried Pammer
644941d25b
Fix C# 1.0 switch on string transform and add tests
8 years ago
Daniel Grunwald
f021ec4383
NumericCompoundAssign: implement ILiftableInstruction
8 years ago
Daniel Grunwald
3956fa685d
Refactor TransformAssignment to reduce code duplication.
8 years ago
Siegfried Pammer
110d4592a6
Add delayed type inference step for stack slots (in RemoveDeadVariableInit).
8 years ago
Siegfried Pammer
9ebfbe57dd
Add transforms for userdef compound assignment
...
fix bugs in other transforms
8 years ago
Siegfried Pammer
845c620a9f
Implement UserDefinedCompoundAssign
...
rename CompoundAssignmentInstruction -> NumericCompoundAssign
8 years ago
Daniel Grunwald
25706f2a39
Support logic.and/etc. in IsImplicitTruncation().
8 years ago
Daniel Grunwald
75a627d40b
Don't use compound assignment when the RHS value does not fit into the LHS type.
8 years ago
Pent Ploompuu
a63e65fae8
Reduced allocations in ILInlining
8 years ago
Siegfried Pammer
3eb694baee
Fix #1107 : bug in mcs switch on string detection.
8 years ago
Siegfried Pammer
61eead50c7
Fix TypeSystemLoaderTests
8 years ago
Siegfried Pammer
5d5fa23709
Port AssignVariableNames
8 years ago
Siegfried Pammer
0fec0c683a
Fix mismerged code
8 years ago
Siegfried Pammer
b311ba5a44
Port DelegateConstruction and TransformArrayInitializers
8 years ago
Siegfried Pammer
a2e27dd7ed
Port ProxyCallReplacer and TextTokenWriter to SRM
8 years ago
Siegfried Pammer
deb1b6918f
Fix bug and typo in IsInConstructorInitializer
8 years ago
Siegfried Pammer
96eb7e07dc
Force ILInlining to aggressively inline constructor initializer statements.
8 years ago
Siegfried Pammer
2d427cf534
Relax rules for object and collection initializer detection to properly decompile query expressions.
8 years ago
Siegfried Pammer
f31d5b4da5
ExpressionTrees: Add support for NewArrayInit with zero length arrays.
8 years ago
Siegfried Pammer
cdecc09fba
ProxyCallReplacer: Do not analyze method calls that are not defined in the current typedef hierarchy.
8 years ago
Daniel Grunwald
935575859f
Fix NullReferenceException in TransformDelegateConstruction()
8 years ago
Daniel Grunwald
a46ac9dc84
Also combine 'ldlen; conv.i4.ovf' to 'ldlen.i4'.
...
The VB compiler emits overflow checks when accessing the array length. (#1097 )
8 years ago
Pent Ploompuu
48dc32163e
Reduced allocations
8 years ago
Daniel Grunwald
7c91d48d68
#980 : Fix type substitution for lambdas.
8 years ago
Siegfried Pammer
1a0052a345
Cache UsingScope during decompiler run.
8 years ago
Siegfried Pammer
8da26dc315
Fix #1080 : Invalid null propagation decompilation with ambiguous extension method call
8 years ago
Siegfried Pammer
a06a04d48b
#1080 : Add ILTransformContext.RequiredNamespacesSuperset
8 years ago
Daniel Grunwald
8a589b2fd2
Add DecompilerSettings constructor that takes a language version.
8 years ago
Daniel Grunwald
96d9e63f4c
Don't unnecessarily default-initialize variables prior to a call with out-parameter.
8 years ago
Siegfried Pammer
3b31930b85
Fix #1071 : Sometimes uses Enumarator instead of Foreach
8 years ago
Siegfried Pammer
b400d89f57
Fix #1076 ; improve detection of mcs switch-on-string pattern
8 years ago
Siegfried Pammer
7544eac5b4
Add support for mcs 2.6.4 switch-on-string
8 years ago
Siegfried Pammer
713f4f1490
Fix #1060 : Enter/Exit V2 variation failing to convert to lock()
8 years ago
Daniel Grunwald
4177e182fe
#1050 : Add support for ?. operator applied to ref-parameters, and other cases where the compiler uses a generated ref local for the ?. operator.
...
Still not supported: ?. operator applied to a ref to unconstrained generic type.
8 years ago
Daniel Grunwald
aa9f2e7797
Fix interaction of using-transform with ?. operator.
8 years ago
Daniel Grunwald
36035de5fa
Improve decompilation of ?. in generic code.
8 years ago