5 writes to SlotCount
Microsoft.CodeAnalysis (5)
Syntax\InternalSyntax\SyntaxList.WithManyChildren.cs (1)
36this.SlotCount = n < SlotCountTooLarge
Syntax\InternalSyntax\SyntaxList.WithThreeChildren.cs (2)
19this.SlotCount = 3; 31this.SlotCount = 3;
Syntax\InternalSyntax\SyntaxList.WithTwoChildren.cs (2)
18this.SlotCount = 2; 28this.SlotCount = 2;
56 references to SlotCount
Microsoft.CodeAnalysis (56)
Syntax\ChildSyntaxList.cs (3)
41for (int i = 0, s = green.SlotCount; i < s; i++) 52n += child.SlotCount; 84return green.IsList ? green.SlotCount : 1;
Syntax\GreenNode.cs (15)
230Debug.Assert(i < SlotCount); 686int n = node.SlotCount; 702int n = node.SlotCount; 753for (int i = 0, n = node.SlotCount; i < n; i++) 779for (int i = node.SlotCount - 1; i >= 0; i--) 805for (int i = node.SlotCount - 1; i >= 0; i--) 848if (node1.IsList && node1.SlotCount == 1) 853if (node2.IsList && node2.SlotCount == 1) 869var n = node1.SlotCount; 870if (n != node2.SlotCount) 974this.SlotCount <= GreenNode.MaxCachedChildNum; 983int cnt = this.SlotCount; 1002this.SlotCount == 1 && 1012this.SlotCount == 2 && 1023this.SlotCount == 3 &&
Syntax\GreenNode.NodeFlagsAndSlotCount.cs (1)
12/// Combination of <see cref="NodeFlags"/> and <see cref="SlotCount"/> stored in a single 16bit value.
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)
118var tmp = new ArrayElement<GreenNode>[left.SlotCount + right.SlotCount]; 120rightList.CopyTo(tmp, left.SlotCount); 125var tmp = new ArrayElement<GreenNode>[left.SlotCount + 1]; 127tmp[left.SlotCount].Value = right; 133var tmp = new ArrayElement<GreenNode>[rightList.SlotCount + 1];
Syntax\InternalSyntax\SyntaxList.WithManyChildren.cs (2)
63var separated = this.SlotCount > 1 && HasNodeTokenPattern(); 80for (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)
51int 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)
87internal int SlotCount => this.Green.SlotCount; 488for (int i = current.SlotCount - 1; i >= 0; i--) 507for (int i = 0, n = triviaNode.SlotCount; i < n; i++) 597index += item.SlotCount; 655int slotCount = green.SlotCount;
Syntax\SyntaxToken.cs (1)
433index = leading.IsList ? leading.SlotCount : 1;
Syntax\SyntaxTokenList.cs (2)
117public int Count => Node == null ? 0 : (Node.IsList ? Node.SlotCount : 1); 134if (unchecked((uint)index < (uint)Node.SlotCount))
Syntax\SyntaxTriviaList.cs (2)
109get { return Node == null ? 0 : (Node.IsList ? Node.SlotCount : 1); } 132if (unchecked((uint)index < (uint)Node.SlotCount))
Syntax\SyntaxTriviaList.Enumerator.cs (2)
45_count = greenNode.IsList ? greenNode.SlotCount : 1; 73index = leading.IsList ? leading.SlotCount : 1;