9 writes to SlotCount
Microsoft.CodeAnalysis (8)
Syntax\InternalSyntax\SyntaxList.WithManyChildren.cs (2)
35this.SlotCount = (byte)n; 39this.SlotCount = byte.MaxValue;
Syntax\InternalSyntax\SyntaxList.WithThreeChildren.cs (3)
25this.SlotCount = 3; 37this.SlotCount = 3; 49this.SlotCount = 3;
Syntax\InternalSyntax\SyntaxList.WithTwoChildren.cs (3)
25this.SlotCount = 2; 35this.SlotCount = 2; 45this.SlotCount = 2;
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\InternalSyntax\SyntaxNode.vb (1)
102Me.SlotCount = value
80 references to SlotCount
Microsoft.CodeAnalysis (53)
SourceGeneration\ISyntaxHelper.cs (1)
77for (int i = 0, n = node.SlotCount; i < n; i++)
Syntax\ChildSyntaxList.cs (3)
40for (int i = 0, s = green.SlotCount; i < s; i++) 51n += child.SlotCount; 83return green.IsList ? green.SlotCount : 1;
Syntax\GreenNode.cs (12)
245Debug.Assert(i < SlotCount); 708int n = node.SlotCount; 724int n = node.SlotCount; 775for (int i = 0, n = node.SlotCount; i < n; i++) 797for (int i = node.SlotCount - 1; i >= 0; i--) 819for (int i = node.SlotCount - 1; i >= 0; i--) 859if (node1.IsList && node1.SlotCount == 1) 864if (node2.IsList && node2.SlotCount == 1) 880var n = node1.SlotCount; 881if (n != node2.SlotCount) 985this.SlotCount <= GreenNode.MaxCachedChildNum; 994int cnt = this.SlotCount;
Syntax\InternalSyntax\ChildSyntaxList.Enumerator.cs (3)
34if (_listIndex < _list.SlotCount) 48if (_childIndex == _node.SlotCount) 64if (_listIndex < _list.SlotCount)
Syntax\InternalSyntax\ChildSyntaxList.Reversed.Enumerator.cs (2)
24_childIndex = node.SlotCount; 65_listIndex = _list.SlotCount;
Syntax\InternalSyntax\SyntaxDiagnosticInfoList.cs (1)
87if (slotIndex < node.SlotCount - 1)
Syntax\InternalSyntax\SyntaxList.cs (6)
123var tmp = new ArrayElement<GreenNode>[left.SlotCount + right.SlotCount]; 125rightList.CopyTo(tmp, left.SlotCount); 130var tmp = new ArrayElement<GreenNode>[left.SlotCount + 1]; 132tmp[left.SlotCount].Value = right; 138var tmp = new ArrayElement<GreenNode>[rightList.SlotCount + 1];
Syntax\InternalSyntax\SyntaxList.WithManyChildren.cs (2)
93var separated = this.SlotCount > 1 && HasNodeTokenPattern(); 110for (int i = 0; i < this.SlotCount; i++)
Syntax\InternalSyntax\SyntaxList`1.cs (3)
27return _node == null ? 0 : (_node.IsList ? _node.SlotCount : 1); 42Debug.Assert(index <= _node.SlotCount); 116return (TNode?)node.GetSlot(node.SlotCount - 1);
Syntax\InternalSyntax\SyntaxListBuilder.cs (1)
49int slotCount = item.SlotCount;
Syntax\InternalSyntax\SyntaxNodeCache.cs (2)
164if (child == null || child.SlotCount == 0) return true; 174var cnt = node.SlotCount;
Syntax\SyntaxList.SeparatedWithManyChildren.cs (2)
16_children = new ArrayElement<SyntaxNode?>[(green.SlotCount + 1) >> 1]; 52&& (valueIndex >= Green.SlotCount - 2 || GetCachedSlot(valueIndex + 2) is { }))
Syntax\SyntaxList.SeparatedWithManyWeakChildren.cs (1)
18_children = new ArrayElement<WeakReference<SyntaxNode>?>[(((green.SlotCount + 1) >> 1) - 1)];
Syntax\SyntaxList.WithManyChildren.cs (1)
18_children = new ArrayElement<SyntaxNode?>[green.SlotCount];
Syntax\SyntaxList.WithManyWeakChildren.cs (1)
24int count = green.SlotCount;
Syntax\SyntaxNode.cs (5)
85internal int SlotCount => this.Green.SlotCount; 484for (int i = current.SlotCount - 1; i >= 0; i--) 503for (int i = 0, n = triviaNode.SlotCount; i < n; i++) 593index += item.SlotCount; 651int slotCount = green.SlotCount;
Syntax\SyntaxToken.cs (1)
435index = leading.IsList ? leading.SlotCount : 1;
Syntax\SyntaxTokenList.cs (2)
106public int Count => Node == null ? 0 : (Node.IsList ? Node.SlotCount : 1); 123if (unchecked((uint)index < (uint)Node.SlotCount))
Syntax\SyntaxTriviaList.cs (2)
90get { return Node == null ? 0 : (Node.IsList ? Node.SlotCount : 1); } 113if (unchecked((uint)index < (uint)Node.SlotCount))
Syntax\SyntaxTriviaList.Enumerator.cs (2)
45_count = greenNode.IsList ? greenNode.SlotCount : 1; 73index = leading.IsList ? leading.SlotCount : 1;
Microsoft.CodeAnalysis.CSharp (10)
Parser\SyntaxParser.cs (1)
1007for (int i = 0, n = root.SlotCount; i < n; i++)
Syntax\CSharpSyntaxRewriter.cs (3)
72Debug.Assert(leadingTrivia == null || !leadingTrivia.IsList || leadingTrivia.SlotCount > 0); 73Debug.Assert(trailingTrivia == null || !trailingTrivia.IsList || trailingTrivia.SlotCount > 0); 86var index = leadingTrivia.IsList ? leadingTrivia.SlotCount : 1;
Syntax\InternalSyntax\CSharpSyntaxNode.cs (2)
167for (int i = 0, n = node.SlotCount; i < n; i++) 228for (int i = 0, n = node.SlotCount; i < n; i++)
Syntax\SyntaxEquivalence.cs (2)
210int slotCount = before.SlotCount; 211if (slotCount != after.SlotCount)
Syntax\SyntaxTreeDiagnosticEnumerator.cs (2)
74if (slotIndex < node.SlotCount - 1) 94if (node.SlotCount == 0)
Microsoft.CodeAnalysis.VisualBasic (17)
Parser\ParseXml.vb (2)
1470For index = 0 To node.SlotCount - 1 1482For index = 0 To node.SlotCount - 1
Scanner\Blender.vb (4)
55Dim cnt = nonterminal.SlotCount 271If _currentNode.SlotCount = 0 Then 407If node.SlotCount = 0 Then 481For i As Integer = 0 To asList.SlotCount - 1
Scanner\Directives.vb (1)
143Dim sCount = node.SlotCount
Syntax\InternalSyntax\DocumentationCommentTriviaSyntax.vb (1)
22Dim childCnt = node.SlotCount
Syntax\InternalSyntax\SyntaxNode.vb (2)
98Return Me.SlotCount 191Dim cnt = SlotCount()
Syntax\InternalSyntax\SyntaxNodeExtensions.vb (1)
626For i = 0 To this.SlotCount() - 1
Syntax\InternalSyntax\SyntaxReplacer.vb (2)
86For i As Integer = 0 To node.SlotCount - 1 94allChildrenCnt += child.SlotCount
Syntax\SyntaxEquivalence.vb (2)
166Dim slotCount1 = before.SlotCount 168If slotCount1 <> after.SlotCount Then
Syntax\SyntaxTreeDiagnosticEnumerator.vb (2)
78If slotIndex < node.SlotCount - 1 Then 97If node.SlotCount = 0 Then