Siegfried Pammer
89e7f5b662
Expose node.Slot and key child positions on SlotKind
...
Introduce the successor to node.Role for child-slot identity: the generator
emits a CSharpSlotInfo per [Slot], exposed as node.Slot, plus a shared SlotKind
enum for the polymorphic "is this node in an embedded-statement / condition /
base-type slot?" comparisons a per-node identity cannot express. Migrate the
printer and transform position checks from node.Role to node.Slot and
node.Slot.Kind, and read identifier children and role-keyed writes through the
typed properties. Role is still present and is removed later; output is
unchanged.
Assisted-by: Claude:claude-opus-4-8:Claude Code
2 weeks ago
Peter Crabtree
e1e16b64f5
dev: Strip BOM mark from text files
10 months ago
Siegfried Pammer
49368caf1c
Rename option to "UseObjectCreationOfGenericTypeParameter"
1 year ago
DoctorKrolic
47eeacd7aa
Add an option to not transform `Activator.CreateInstance<T>()` to `new T()`
1 year ago
Siegfried Pammer
2fb90b49e0
Adjust string.Concat handling in ReplaceMethodCallsWithOperators to support unexpanded string.Concat calls.
1 year ago
Siegfried Pammer
fd1de09489
Avoid using operator + for string concatenation when ref-like types are involved.
2 years ago
Daniel Grunwald
b80d20b15d
Add support for calling `operator checked`.
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
Daniel Grunwald
6bcb26db70
Add option for `string.Concat` decompilation.
6 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
6 years ago
Daniel Grunwald
748c54a1c1
Support array slicing.
6 years ago
Daniel Grunwald
b9675f58b3
Fix #1865 : At least one of the first two operands in string concatenation needs to be of type `string`, so we can't always drop `ToString()` calls.
7 years ago
Daniel Grunwald
4b90e43187
Avoid making explicit ToString() implicit when doing so changes the semantics for mutable value types.
7 years ago
Daniel Grunwald
b5eecb8afc
Don't remove redundant ToString() calls in expression trees.
7 years ago
Daniel Grunwald
7a5d8af57d
#1691 : Further improvements for decompiling the new VS 2019.3 string concatenation IL pattern
7 years ago
Daniel Grunwald
bfa5ae8ac0
Fix #1691 : Remove ToString() calls inserted by C# compiler.
7 years ago
Daniel Grunwald
c32361d464
#1691 : Avoid replacing string.Concat() with operator+ when the evaluation order depends on the compiler version.
7 years ago
Siegfried Pammer
6ecd99f893
Fix #1618 : Unwrap in-arguments, when converting method calls to operators.
7 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
Siegfried Pammer
6338bd1b85
Partially revert CheckNoNamedOrOptionalArguments.
7 years ago
Siegfried Pammer
e99bc2b145
Fix #1567 : Do not transform string.Concat method calls to + operators if named arguments are used.
7 years ago
Siegfried Pammer
0fc5c8b988
Add support for FormattableString patterns.
8 years ago
Siegfried Pammer
d0683afec4
System.Activator.CreateInstance<T>() -> new T() transform is only valid if T has new() constraint.
8 years ago
Siegfried Pammer
d10ba668e1
Comment dead code
8 years ago
Siegfried Pammer
7358fae977
Wrap conditional expressions in parentheses, if used in string interpolation literals.
9 years ago
Siegfried Pammer
f59504bbce
Fix bug in StringInterpolation transform: do not transform if arguments use string literals, nested string literals are not allowed.
9 years ago
Siegfried Pammer
d1bc4f4b54
Implement string interpolation pattern in ReplaceMethodCallsWithOperators
9 years ago
Siegfried Pammer
877638b27a
Fix #995 : Missing variable type for string concat statement
9 years ago
Daniel Grunwald
dd1c509651
Fix #926 : missing explicit casts for implicit operators
9 years ago
Siegfried Pammer
4ca4d97011
Improve SequencePointBuilder
9 years ago
Siegfried Pammer
d15d1b86a6
Add transform for new T().
9 years ago
Siegfried Pammer
fd66914ade
Fix detection of String.Concat calls with partially non-string arguments.
9 years ago
Siegfried Pammer
a09afe18d7
A bit of clean-up
9 years ago
Daniel Grunwald
905cb0f388
Split PrettifyAssignments pass out from ReplaceMethodCallsWithOperators and fix pass ordering.
...
This simplifies the code; and fixes the assertion during NewtonsoftJson_pcl_debug decompilation.
9 years ago
Siegfried Pammer
03933708d0
Fix #837 - typeof(T) is not fully decompiled
9 years ago
Daniel Grunwald
867d330f1c
Fix cancellation.
9 years ago
Siegfried Pammer
610f0a922f
Remove AST-helper-methods
10 years ago
Siegfried Pammer
840ec04fde
Namespace adjustments for Syntax classes
10 years ago
Christoph Wille
1ce8349dd9
Adjust namespaces
10 years ago
Siegfried Pammer
b6cd1f3ccb
Use correct annotation to detect custom operators.
10 years ago
Siegfried Pammer
6f60dbe04e
implemented SwitchInstruction, StElem, NewArr instructions
11 years ago
Daniel Grunwald
08a5e81517
Re-enable IntroduceUsingDeclarations
12 years ago
Daniel Grunwald
2f83334c2e
Use NRefactory.TypeSystem for ILAst.
12 years ago
Daniel Grunwald
7e9f6bb9d6
Fix ConvertConstructorCallIntoInitializer transform.
12 years ago
Daniel Grunwald
fffa297b8f
Use ResolveResults as annotations.
12 years ago
Daniel Grunwald
e0a1666547
Add back AST transform infrastructure
12 years ago
Daniel Grunwald
0a01bc7b03
Adjust ILSpy to NRefactory API changes.
14 years ago
Daniel Grunwald
2e387958db
Add support for more language constructs to the ExpressionTreeConverter.
15 years ago
Pent Ploompuu
66fde6d0ee
Compound assignment support for overloaded operators
15 years ago
Siegfried Pammer
4c4374cc8c
add IntroduceIncrementAndDecrement setting for VB
15 years ago