Siegfried Pammer
ffcd468d22
Fix #1572 : parameters of lambdas and local functions are renamed, if there are with names from outer scopes collisions.
2 months ago
Siegfried Pammer
03aecf047d
Add VariableScope and rework AssignVariableNames step to support renaming parameters of nested ILFunctions in the future.
2 months ago
Siegfried Pammer
a599aae54d
#1572 : Do not generate variable names that match C# keywords.
2 months ago
Siegfried Pammer
966b99a7f9
Fix #3278 : Missing variable declaration in nested for-loop after many other loops
8 months ago
Siegfried Pammer
58e993d71d
Fix #3272 : Missing variable declarations in repeated nested for-loops
8 months ago
Siegfried Pammer
2ca5b5affe
Rewrite AssignVariableNames algorithm to use variable usages instead of the list of variables.
10 months ago
Siegfried Pammer
c67d086e2f
Add test cases for naming conflicts related to foreach, using and fixed variables. Remove unnecessary ConflictWithLocal check in AssignVariableNames.
10 months ago
Siegfried Pammer
3fb153940b
AssignVariableNames: Handle fixed statement special cases
10 months ago
Siegfried Pammer
566af5c2fb
Fix #3113 : Remove GetAlternativeName and instead reuse existing names, if there are no conflicts.
1 year ago
Siegfried Pammer
0fc003459f
Fix #3079 : Replace parameter names that consist of only whitespace
2 years ago
Siegfried Pammer
51a8eb28f1
Add support for var sub patterns.
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.
2 years ago
Siegfried Pammer
619d2af9b2
Add GetNamespaceByFullName and use it to speed up AssignVariableNames.CollectAllLowerCaseTypeNames
2 years ago
Daniel Grunwald
b4b070468f
Revert "Performance Optimization: Do no longer collect all lower case type and member names."
...
This reverts commit 6584a2f576
.
3 years ago
Siegfried Pammer
6584a2f576
Performance Optimization: Do no longer collect all lower case type and member names.
3 years ago
Daniel Grunwald
bd9aabeae2
Update to dotnet-format 5.1.225507.
...
This makes the formatting expected by our CI consistent with that generated by VS2019.9.
4 years ago
Siegfried Pammer
d60f158dfd
Fix #2342 : Do not generate empty names for foreach loop variables.
4 years ago
Siegfried Pammer
669fe6417e
Fix #2280 : Add additional checks to GenerateVariableName
4 years ago
Siegfried Pammer
288c6a75e7
Use ToLower instead of ToLowerInvariant.
4 years ago
Siegfried Pammer
dd84f17ea1
#2263 : Fix IsLowerCase to take script without upper/lower case distinction into account.
4 years ago
Siegfried Pammer
06bae54b91
Fix #2263 : Add lower-case type and member names to the list of existing names, to prevent collisions.
4 years ago
Siegfried Pammer
c986dbe889
Fixes #2232 : We only need a small percentage of features provided by Humanizer. Therefore we copy the relevant parts and remove the dependency in order to avoid such problems in the future.
5 years ago
Siegfried Pammer
d0d8299ef5
Use Name from DynamicInvokeMemberInstruction when inferring variable names.
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
Siegfried Pammer
acea95d0a1
Properly rename LocalFunctionMethod.Name on all instructions
5 years ago
Daniel Grunwald
1b2874eb5d
Use `nint` type for local IntPtr variables if arithmetic is performed on them.
5 years ago
Siegfried Pammer
371d732c0a
Fix #1881 : Not properly reusing names from PDB#2
5 years ago
Siegfried Pammer
92e1d6fe85
Fix #1907 : Discard parameter names containing non-printable or white space characters from set of possible names considered by AssignVariableNames.
5 years ago
Siegfried Pammer
a653b8b566
Fix #1841 : Not properly reusing names from PDB
6 years ago
Siegfried Pammer
c3e61b39fc
#1681 : Include fields from base types in AssignVariableNames.CollectReservedVariableNames
6 years ago
Siegfried Pammer
305b47245e
Refactor representation of local functions in ILAst.
6 years ago
Siegfried Pammer
8d1522f387
Transform display classes used in local functions.
6 years ago
Daniel Grunwald
a5505ab00d
Expose IMethod.AccessorKind. This makes it easier to determine if a method is a setter, particular in generic classes where "m.AccessorOwner?.Setter == m" ended up being wrong.
6 years ago
Siegfried Pammer
b0309ca9e3
Fix #1180 : Fix generation of Windows Forms InitializeComponent.
6 years ago
Daniel Grunwald
763683748b
Emit debug info for display class locals, so that the debugger can show the values of captured variables.
6 years ago
Daniel Grunwald
e041454987
Add pretty tests for "yield return" and fix some minor bugs:
...
* remove redundant casts on yield-return-expression
* keep variable name from metadata for foreach loops
* fix 'yield break;' in nested try-finally sometimes causing a decompiler error
7 years ago
Daniel Grunwald
12e74daf48
Handle Comp in InferType().
7 years ago
Daniel Grunwald
9479e8af13
Support overloaded operator &&/||.
7 years ago
Siegfried Pammer
c593ef960a
AssignVariableNames: unwrap modified / pinned types to ensure variables get nice names.
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
Siegfried Pammer
eeeecb2259
Remove "do what I mean" logic from AssignVariableNames
7 years ago
Siegfried Pammer
3d4e38ddce
Fix #538 : Give higher priority to out parameters when naming variables
7 years ago
Siegfried Pammer
359fc4ffcd
AssignVariableNames: use 'val' for dynamic variables.
7 years ago
Siegfried Pammer
b3db473211
Fix bug in AssignVariableNames: The first parameter of indexer getters was not properly handled.
7 years ago
Siegfried Pammer
5d5fa23709
Port AssignVariableNames
7 years ago
Daniel Grunwald
96d9e63f4c
Don't unnecessarily default-initialize variables prior to a call with out-parameter.
7 years ago
Siegfried Pammer
69c764722c
Fix #989 : Local variable naming conflict
8 years ago
Siegfried Pammer
9b160c13e7
Fix #982 : ILSpy should ignore the parameter name of property setter and always use "value" instead in C#
8 years ago
Siegfried Pammer
3f24807fbf
Fix bug in AssignVariableNames
8 years ago