Daniel Grunwald
a4d4c1253e
Fix two minor bugs in NullableLiftingTransform, and enable the LiftedOperators tests that are not affected by redundant casts.
8 years ago
Siegfried Pammer
1ebc7581d8
Fix IsUsedAsThisPointerInCall: if we deal with an unspecified generic type, we assume it's a value type as ldloca should be allowed as this pointer in those cases.
8 years ago
Daniel Grunwald
39bb6856b7
Fix various bugs with compound assignments.
8 years ago
Daniel Grunwald
61900e33c3
[nullables] Lifted compound assignments
8 years ago
Siegfried Pammer
a62e13a035
Improve detection of foreach-using in UsingTransform:
The C# compiler only expects:
- EnumeratorType GetEnumerator(); on the type of the in-expression.
- EnumeratorType must implement the following members:
* bool MoveNext();
* T Current { get; }
8 years ago
Daniel Grunwald
33e5011367
[nullables] support equality comparisons on System.Decimal
8 years ago
Daniel Grunwald
bb3ad5c811
[nullables] Lift user-defined equality operator calls if only one argument is nullable.
8 years ago
Daniel Grunwald
87a979b549
[nullables] Lift user-defined equality operator calls.
8 years ago
Siegfried Pammer
2857a8dcf9
ad #885 and #886 : add more tests
8 years ago
mohe2015
ccdeded6ba
Fix failed decompilation of catch-when if the method is async.
8 years ago
Siegfried Pammer
b5e46c3545
Fix #882 : Invalid assignment code after decompiling
8 years ago
Daniel Grunwald
ba009e790d
Fix #880 : NullReferenceException in NullableLiftingTransform.
8 years ago
Daniel Grunwald
cf5f3738a9
Fix performance issue due to aggressive debug checks that was causing AppVeyor to time-out.
8 years ago
Siegfried Pammer
c118a24cbf
Use Humanizer in GenerateForeachVariableName
8 years ago
Daniel Grunwald
a6559d941b
Allow inlining into object/collection initializers.
8 years ago
Daniel Grunwald
7017c6f6e6
Replace LoopingBlockTransform with StatementTransform.
This transform interleaves statement-combining transforms so that nested structures can be detected better.
8 years ago
Siegfried Pammer
63cb56b996
Improve AssignVariableNames.IsPlural
8 years ago
Siegfried Pammer
c09c4ee404
Fix annotations on identifiers and use correct check for fallback case.
8 years ago
Siegfried Pammer
9bdfdd09ff
Add special case for non-generic foreach and add more tests.
8 years ago
Siegfried Pammer
7bbbf39e3a
Fix #867 : Async delegate tries to access variables with "this." although they are local.
8 years ago
Siegfried Pammer
48f344ed03
Add another pattern for generics/nullable using.
8 years ago
Siegfried Pammer
2b1976c6b5
Fix naming conflict in AssignVariableNames
8 years ago
Siegfried Pammer
2c40b45717
Add support for using on nullables.
8 years ago
Siegfried Pammer
98e4e3418d
[using] check variable type and variable usage more strictly.
8 years ago
Daniel Grunwald
6988260ea3
Add ILInlining.IsUsedAsThisPointerInCall().
8 years ago
Siegfried Pammer
e2dab8699f
Fix generic using patterns.
8 years ago
Siegfried Pammer
d15d1b86a6
Add transform for new T().
8 years ago
Siegfried Pammer
d1a514b451
Redesign of UsingInstruction.
8 years ago
Siegfried Pammer
5b2c67bf3e
Choose better variable names for type parameters.
8 years ago
Siegfried Pammer
48b77d4742
ExpressionTransform: comp(box T(..) [!=]= ldnull) -> comp(.. [!=]= ldnull) where T.Kind == TypeParameter
8 years ago
Daniel Grunwald
b5e8571382
[nullables] Support lifting calls to user-defined operators.
Not yet handled: op_Equality and op_Inequality.
8 years ago
Daniel Grunwald
f380c29852
Refactor IsGeneratedValueTypeTemporary.
8 years ago
Siegfried Pammer
27aa58a532
Improve GenerateForeachVariableName.
8 years ago
Siegfried Pammer
dfeb39f6ee
TransformForeach: handle optional return statement after loop.
8 years ago
Daniel Grunwald
46e36f7e9a
Fix #868 : incorrect inlining of readonly fields.
8 years ago
Siegfried Pammer
44687a01e2
Fix bug in UsingTransform: Do not transform to using, if disposable instance is used after the finally block.
8 years ago
Siegfried Pammer
4f7a479320
Add ILAstWritingOptions parameter to LockInstruction/UsingInstruction.WriteTo, fix merge errors.
8 years ago
Siegfried Pammer
fa25b5d2e8
Implement foreach loop detection in StatementBuilder.
8 years ago
Siegfried Pammer
86d3101b22
Add UnwrapNestedContainerIfPossible to reduce block container nesting in foreach pattern.
8 years ago
Siegfried Pammer
d067f0cb6c
Add support for pattern with as-cast to IDisposable.
8 years ago
Siegfried Pammer
31469c8ef1
Implement UsingTransform in ILAst.
8 years ago
Siegfried Pammer
6da8058587
Add Patterns correctness tests; add missing file headers
8 years ago
Daniel Grunwald
c81f9f366e
Remove LdAddressUsagesTransform.
The transform was incorrect (moving and cloning instructions without verifying that they don't have side-effects), and had a negative effect on our ability to detect compound assignments.
8 years ago
Daniel Grunwald
b7320b25e4
[nullables] Lift three-valued logic operators ('&' and '|' on bool?)
8 years ago
Daniel Grunwald
735f8e070d
Compound assignment doesn't support lifting yet.
8 years ago
Daniel Grunwald
96c6b03d9b
[nullables] operator! on bool?
8 years ago
Daniel Grunwald
02af1b0ab5
[nullables] Lifting support for: bool? == true, bool? != true, bool? == false, bool? != false
8 years ago
Daniel Grunwald
63d6f4bbca
[nullables] Add lifting for operator~.
8 years ago
Daniel Grunwald
b318327db3
[nullables] Fix lifted != operator.
8 years ago
Daniel Grunwald
919219524b
Eliminate the dedicated logic.not instruction, and treat it as syntax sugar similar to logic.and/logic.or.
'logic.not(arg)' is now represented using 'comp(arg == ldc.i4 0)'.
8 years ago