Daniel Grunwald
bafb6d1d49
Fix #1194 : empty if statements are decompiled into goto statements
7 years ago
Daniel Grunwald
d8c8a75c2e
Fix #1154 : Decompilation of fixed statement when pointer variable is unused
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
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
ce855885b1
Implement new declsec parser in ReflectionDisassembler + added unit tests.
7 years ago
Siegfried Pammer
bf8bd6b597
Add missing ApplyAttributesToType in MetadataAssembly.ResolveMethodSpecification.
7 years ago
Daniel Grunwald
8f588208b9
Fix tuple type in 'new List<(int, string)>'.
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
Daniel Grunwald
078b638149
Adjust Issue982.cs to [IndexerName]
7 years ago
Daniel Grunwald
c85927b579
Add support for IndexerNameAttribute.
7 years ago
Siegfried Pammer
4cca07aeb3
TransformExpressionTrees: Fix bug in Expression.Quote handling
7 years ago
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).
7 years ago
Daniel Grunwald
96e3b23ab3
Fix crash in ProxyCallReplacer
7 years ago
Siegfried Pammer
6096b7df29
#907 : CallBuilder: If type arguments cannot be inferred from the parameter list, add them before asking overload resolution, but remove them again, if it does not reduce the number of casts.
7 years ago
Siegfried Pammer
d04155132a
Use overload resolution to add only required casts to collection initializers.
7 years ago
Siegfried Pammer
a823d74004
Use overload resolution to ensure we call the correct indexer + added tests.
7 years ago
Siegfried Pammer
cf8bee2c01
Fix translation of generic and extension 'Add' methods in collection initializers.
7 years ago
Siegfried Pammer
58f7296986
Add CustomAttributeConflicts test
7 years ago
Siegfried Pammer
bb38ae2fd8
Rearrange pretty tests, so that they work with Roslyn compilers as well.
7 years ago
Siegfried Pammer
8cbf724901
Move CustomAttributeTests to PrettyTestRunner
7 years ago
Siegfried Pammer
5856df001a
Fix #1111 : Only hide "enum value initializers" when all of them can be hidden or only the first needs to be specified.
7 years ago
Siegfried Pammer
054216359e
Fix #1174 : Add some test cases to TupleTests.
7 years ago
Chicken-Bones
3fb7c71f8a
Improve control flow decompilation in ConditionDetection
7 years ago
Siegfried Pammer
74fc5ba8a4
Add more test cases
7 years ago
Siegfried Pammer
3d4e38ddce
Fix #538 : Give higher priority to out parameters when naming variables
7 years ago
Siegfried Pammer
78e81bee29
Add more dynamic tests
7 years ago
Siegfried Pammer
d0683afec4
System.Activator.CreateInstance<T>() -> new T() transform is only valid if T has new() constraint.
7 years ago
Siegfried Pammer
028cbe69a4
Fix decompilation of auto properties with explicit implementation
7 years ago
Siegfried Pammer
e933abb67f
Update dynamic tests
7 years ago
Siegfried Pammer
9fa5249afe
Update dynamic test cases
7 years ago
Siegfried Pammer
569434d516
Fix #1162 : decompilation of explicitly implemented events and properties
7 years ago
Siegfried Pammer
8f47e8429b
Fix #1157 : Decompilation of abstract events and overridden auto events
7 years ago
Siegfried Pammer
51e0aab6c8
Add more tests
7 years ago
Daniel Grunwald
e718d45f7d
Use tabs in dynamic tests.
7 years ago
Daniel Grunwald
6886d2f753
Add support for ?. operator on dynamic.
7 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.
7 years ago
Daniel Grunwald
dd92499ade
Add test case for named arguments.
7 years ago
Andreas Weizel
16b00bfabc
Added DynamicTests.
7 years ago
Daniel Grunwald
5cdd5ecdbc
Use target typing for tuples, where possible.
7 years ago
Siegfried Pammer
497de76a2f
Update test case for #1145
7 years ago
Siegfried Pammer
1646be7482
#1145 : Make type arguments optional in mcs auto event pattern.
7 years ago
Siegfried Pammer
e012fe04be
Fix #1146 : C#3+ property accessor generates bad "[field: " tag on the accessor
7 years ago
Daniel Grunwald
50509c4985
Fix #1140 : Fix assertion when finally block unconditionally throws an exception.
7 years ago
Siegfried Pammer
bd15d69ada
Add test cases for #1138
7 years ago
Daniel Grunwald
92b72c9570
Type system: add support for tuple conversions.
7 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.
7 years ago
Daniel Grunwald
395bc185a3
Decompile TupleElementNamesAttribute into tuple type syntax.
7 years ago