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
Siegfried Pammer
77d57b91dc
Drop token nodes and move comments and directives to trivia
...
Comments and preprocessor directives were positional children interleaved
into the child list, and punctuation, keywords and operators were token-node
children. Add a leading/trailing trivia side-channel for comments and
directives, emit it from the output visitor, and re-home every comment
receiver onto it (including inside-block comments as comment-only empty
statements and undecodable attribute arguments as an ErrorExpression). With
locations and sequence points no longer sourced from token nodes, stop
reconstructing them on the locations path and delete CSharpTokenNode,
CSharpModifierToken and InsertSpecialsDecorator. The AST no longer carries
token children or positional comments; output is byte-identical.
Assisted-by: Claude:claude-opus-4-8:Claude Code
2 weeks ago
Siegfried Pammer
c075f7b9c8
Fix out var for expressions appearing in a lambda and not in a statement.
9 months ago
Siegfried Pammer
d11c40719d
#3569 : Don't move out variable declarations out of lambdas.
9 months ago
ds5678
c54318173b
Fix lower case type name conflicting with variable name
9 months ago
Peter Crabtree
e1e16b64f5
dev: Strip BOM mark from text files
10 months ago
Siegfried Pammer
e56f12cf93
Fix #2165 : DeclareVariables step must update ResolveResult annotation when using out var.
11 months ago
Siegfried Pammer
02d2a8c1f8
Add metadata processing for C# 12 'ref readonly' parameters
2 years ago
Siegfried Pammer
539925f259
Fix #2983 : display-class locals should be named uniquely per top-level ILFunction. Add assertion to ResolveCollisions: ensure that colliding/merged variables have the same type.
3 years ago
Siegfried Pammer
47250d670b
Fix #2791 : Ensure that the capture scope used is either a loop or the ILFunction root container.
4 years ago
Daniel Grunwald
b4b070468f
Revert "Performance Optimization: Do no longer collect all lower case type and member names."
...
This reverts commit 6584a2f576 .
4 years ago
Siegfried Pammer
6584a2f576
Performance Optimization: Do no longer collect all lower case type and member names.
4 years ago
Siegfried Pammer
e1ca4db851
Fix #2527 : Support skip locals init
5 years ago
Siegfried Pammer
c641072685
Translate MatchInstruction to BinaryOperatorExpression with BinaryOperatorType.IsPattern.
5 years ago
Siegfried Pammer
669fe6417e
Fix #2280 : Add additional checks to GenerateVariableName
6 years ago
Siegfried Pammer
04f9603768
Fix #2140 : ILSpy 6.2p1 no longer respects "use discards" setting
6 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
6 years ago
Siegfried Pammer
b1b49b5a56
Fix bugs in foreach deconstruction and deconstruction declaration, if the same variable is used multiple times.
6 years ago
Siegfried Pammer
3390d3849d
Added support for `var (a, b, _) = ...;` syntax in deconstruction.
6 years ago
Siegfried Pammer
00b65453ee
Remove `out var _` hack
6 years ago
Daniel Grunwald
ddff831cf0
#1292 : Fix some more problems with pinned locals.
...
Let's distinguish between the original pinned locals and the PinnedRegion locals.
The format need declarations if any are left over after transformations; the latter don't.
6 years ago
Siegfried Pammer
4f7ca65408
Fix #1913 : Make sure to declare local variables captured by local functions before the first invocation of the local function.
6 years ago
Siegfried Pammer
8925b4ff7b
Inline variable declarations/modernize parts of our code base.
6 years ago
Siegfried Pammer
407c337168
Add ForStatement, DoWhileStatement and SeparateLocalVariableDeclarations settings.
7 years ago
Siegfried Pammer
9190515d8b
#1151 : Support for ref readonly locals.
7 years ago
Siegfried Pammer
d2f7258347
Fix #1681 : Use discard assignment, if possible.
7 years ago
Siegfried Pammer
13fa499c35
Fix #1630 : Do not convert while to for statement, if any iterator variables are to be declared in the loop body. This causes problems with ref-typed variables.
7 years ago
Siegfried Pammer
bd77b8301f
Basic implementation of local functions.
7 years ago
Siegfried Pammer
b0cb976357
Fix #1454 : Name collision after converting for-over-array to foreach.
7 years ago
Daniel Grunwald
47ca51a769
Clarify the meaning of ILVariable.Index
7 years ago
Daniel Grunwald
ba8b453b36
Fix #1404 : local variables with init flag are not declared in the correct scope
8 years ago
Daniel Grunwald
796612209d
Fix #1147 : Use C# 7.3 syntax for ref reassignment.
8 years ago
Siegfried Pammer
40659a2283
Add minimal support for C# 7 discards in out var declarations.
8 years ago
Daniel Grunwald
19e840856f
Use out variable declarations where possible.
8 years ago
Daniel Grunwald
3c720b2030
Implement ?. operator when the result of the call is not used
...
For example: "if (x != null) x.M();" -> "x?.M();"
9 years ago
Siegfried Pammer
69c764722c
Fix #989 : Local variable naming conflict
9 years ago
Siegfried Pammer
5814374306
Fix build.
9 years ago
Siegfried Pammer
9d70e6ed09
Fix #893 : Local variable name highlighter sometimes only finds subset of usages
9 years ago
Siegfried Pammer
4d5d4b3d6b
Fix #952 : Issue with discard expressions and variables
9 years ago
Daniel Grunwald
164f9b82a8
Fix DeclareVariables.FindInsertionPoint not treating lambda bodies as capture scopes
9 years ago
Siegfried Pammer
c64ce76047
Remove using-specific code from DeclareVariables.ResolveCollisions
9 years ago
Siegfried Pammer
31469c8ef1
Implement UsingTransform in ILAst.
9 years ago
Siegfried Pammer
d45e3bfb3c
Fix assertion fail in DeclareVariables: Make sure that we do not try to declare variables in non-assignment contexts.
9 years ago
Siegfried Pammer
d33c334f5a
Fix #284 - Ability to disable decompilation of anonymous types to "var"
9 years ago
Daniel Grunwald
e024641a5f
[async] Fix bug when async method uses this pointer.
9 years ago
Daniel Grunwald
b36ae9df7e
Start on new async/await decompiler.
9 years ago
Daniel Grunwald
cad933184a
Don't introduce foreach when doing so would create a conflict with another variable of the same name as the loop variable.
9 years ago
Daniel Grunwald
56a0ca2f13
Remove useless stack variables.
9 years ago
Siegfried Pammer
a5b67ffc0e
Add UsingLocal and ForeachLocal VariableKinds
10 years ago
Daniel Grunwald
4c07ba2448
Fix NullReferenceException in AssemblyTreeNode.get_ToolTip
10 years ago