Siegfried Pammer
abbf3d0429
Fix #1158 : C# 1 switch pattern improvement
8 years ago
Siegfried Pammer
b9f14905b2
Fix #1155 : DictionaryInitializers setting not working
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
Daniel Grunwald
243a347da1
Revert "#1083: Add ArgumentToParameterMap to CallInstruction, in ILAst output call arguments are now prefixed with the parameter index they correspond to, if the mapping is different from the default."
...
This reverts commit 60ace84f26 .
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
60ace84f26
#1083 : Add ArgumentToParameterMap to CallInstruction, in ILAst output call arguments are now prefixed with the parameter index they correspond to, if the mapping is different from the default.
8 years ago
Daniel Grunwald
50509c4985
Fix #1140 : Fix assertion when finally block unconditionally throws an exception.
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
0552b335c9
Implement InferType() for ldelema.
...
This improves decompilation of compound assignment on array elements.
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
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
57d59a703e
Fix await in finally pattern with using statement.
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
0e9a163345
Improve on #1085 by setting UnknownType.IsReferenceType in more cases.
8 years ago
Siegfried Pammer
b9a6df374d
Fix #1101 : Error decompiling System.Threading.Tasks.Task System.Net.WebSockets.ClientWebSocket::ConnectAsyncCore(System.Uri,System.Threading.CancellationToken)
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
Daniel Grunwald
ed493c3037
Fix 'await default(SomeStruct)'.
8 years ago
Daniel Grunwald
7b8389dca5
Fix #1078 : Eliminate redundant variable in fixed statements.
8 years ago
Daniel Grunwald
ae45665ff7
Improve pinned region detection to also handle the case where the pinned variable has array type. ( #1078 )
8 years ago
Daniel Grunwald
b9337c6129
Fix #1021 : Compound assignments on pointer types.
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
4d00c65608
Use IReadOnlyList<T> instead of IList<T> in the resolved type system.
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