ds5678
f860777206
Add preprocessor directive
5 months ago
ds5678
15223daabd
WIP preincrement improvements
5 months ago
Siegfried Pammer
a599aae54d
#1572 : Do not generate variable names that match C# keywords.
10 months ago
Siegfried Pammer
8c440f42a8
Fix #2166 : Unnecessary uint casts/conversions for certain bitwise operations
1 year ago
Siegfried Pammer
7b1f8a305c
Implemented support for string concatenation compound assignments involving ReadOnlySpan<char>.
1 year ago
Siegfried Pammer
13227e433e
Fix compound assignments with local variables.
3 years ago
Daniel Grunwald
8b9ba20847
Builtin unsigned right shift operator.
3 years ago
Daniel Grunwald
3c46271a11
Add support for unsigned right shift.
...
Only for user-defined operators so far; builtin right shifts still cast to the appropriate type.
3 years ago
ElektroKill
21ddd402c2
Extend unit test for pointer compound assign
3 years ago
ElektroKill
7d9e558565
Re-enable a test case in compound assignment pretty test code
3 years ago
Siegfried Pammer
ec6a9afc57
Fix #2448 : Decompiler shows some enum values as hexdecimal instead of decimal
4 years ago
Siegfried Pammer
d2fc380e0e
Fix #2349 : Use proper ExpressionType with DynamicCompoundAssign.
5 years ago
Siegfried Pammer
cc19e9043e
Fix #603 : Single element arrays should not span multiple lines
...
Fix #1079 : CSharpFormattingOptions.AutoPropertyFormatting has no effect
5 years ago
Siegfried Pammer
be57dc454c
Run tests with different versions of Roslyn
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
5 years ago
Daniel Grunwald
93806b46fa
Fix compound assignments with type `bool`.
...
This required removing the "Replace bit.and with logic.and" transform, as it interfered with the compound assignment transform.
6 years ago
Siegfried Pammer
a781e37d98
Fix #1779 : Do not inline compound assignment target, if it is a temporary struct.
6 years ago
Chicken-Bones
661acdfc08
Transform post-increment on float/double. Fixes #1764
6 years ago
Daniel Grunwald
7a5d8af57d
#1691 : Further improvements for decompiling the new VS 2019.3 string concatenation IL pattern
6 years ago
Daniel Grunwald
539e3a906d
Fix #1552 : user-defined and decimal increments
...
For user-defined increments, there were problems with Roslyn was optimizing out one of the stores.
The new transform FixRemainingIncrements now takes increments/decrements that were not detected by TransformAssignment and introduces a temporary variable that can be incremented.
This sometimes requires un-inlining via the new ILInstruction.Extract() operation.
Extract() is not supported in all possible contexts, so it is possible but unlikely that some op_Increment calls remain.
For decimals, the situation is different: legacy csc actually was optimizing "d + 1m" to "op_Increment(d)", so we can get rid of any left-over increments by undoing this optimization. This now happens in ReplaceMethodCallsWithOperators.
7 years ago
Daniel Grunwald
33c7425fa2
Fix several bugs with compound assignments on indexers.
...
Closes #1580 .
7 years ago
Siegfried Pammer
cf77457afa
Merge IncrementDecrement.cs into CompoundAssignmentTest
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.
8 years ago
Daniel Grunwald
33ef82f75c
Fix #1082 : Add support for compound assignment with string.Concat().
...
Currently only supports the binary overloads of string.Concat().
8 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.
8 years ago
Daniel Grunwald
f4bbd100b9
Fix user-defined op_Addition 'p += 1;' being turned into 'p++;'
8 years ago
Siegfried Pammer
f4b2c83f1e
Add test cases for UserDefinedCompoundAssign
8 years ago
Siegfried Pammer
5dd7eaf129
Fix #1093 : Remove usage of type or this qualifiers, when possible.
8 years ago
Siegfried Pammer
62770cf94c
Fix #1095 : C# decompilation, for flags enums always use hex prefix
8 years ago
Daniel Grunwald
0a1921ff67
Fix #1007 : post-increment transform incorrect due to variable splitting.
8 years ago
Siegfried Pammer
16c900ebfa
Remove sequential values from enum members + display powers of two (- 1) as hex.
8 years ago
Daniel Grunwald
174a0d9eca
Add some more tests for compound assignment on struct members.
...
Closes #864 .
8 years ago
Daniel Grunwald
deca445d89
Restore the CopyPropagation's pass old position before the statement transforms.
...
Instead run TransformAssignment twice to avoid pass ordering issues.
8 years ago
Daniel Grunwald
7847a69d69
Fix compound assignment and post-increment.
8 years ago
Daniel Grunwald
40a4f08a8d
Add support for compound assignment of short integers.
8 years ago
Daniel Grunwald
248a9ad76f
Fix #954 : don't use invalid compound assignments on enums
8 years ago
Daniel Grunwald
89963ff8a5
Add a whole bunch of (failing) tests for post-increments.
8 years ago
Daniel Grunwald
39bb6856b7
Fix various bugs with compound assignments.
8 years ago
Siegfried Pammer
b5e46c3545
Fix #882 : Invalid assignment code after decompiling
8 years ago
Siegfried Pammer
c5012e876e
Convert integers to char literals in comparisons with char operands.
8 years ago
Siegfried Pammer
efca6babbd
Allow implicit conversions in return statements.
8 years ago
Siegfried Pammer
e26af08a1c
Move test projects to their own directory in \
8 years ago
Daniel Grunwald
bedff74b61
Run correctness tests with roslyn, and add some roslyn-based pretty-tests as well.
9 years ago
Siegfried Pammer
d1026c4646
Fix/Add more pretty tests for compound assignment
9 years ago
Siegfried Pammer
a674b4cdf1
Extend TransformAssignment
10 years ago
Siegfried Pammer
c0effc817c
Add more test cases to CompoundAssignmentTest and InlineAssignmentTest
10 years ago
Siegfried Pammer
ae75c57e22
Basic implementation of CompoundAssignmentInstruction
10 years ago
Siegfried Pammer
a813dddc01
Add basic compound assignment test
10 years ago
Siegfried Pammer
ee1b26d04d
Add TransformInlineAssignment and InlineAssignmentTest
10 years ago
Siegfried Pammer
02022c7290
Add PrettyTestRunner
10 years ago