10 writes to _items
Microsoft.CodeAnalysis (10)
src\Dependencies\Collections\SegmentedList`1.cs (10)
51
_items
= s_emptyArray;
64
_items
= s_emptyArray;
66
_items
= new SegmentedArray<T>(capacity);
80
_items
= (SegmentedArray<T>)segmentedList._items.Clone();
90
_items
= s_emptyArray;
95
_items
= new SegmentedArray<T>(count);
108
_items
= s_emptyArray;
139
_items
= s_emptyArray;
146
_items
= new SegmentedArray<T>(value);
151
_items
= CreateNewSegmentedArrayReusingOldSegments(_items, value);
84 references to _items
Microsoft.CodeAnalysis (84)
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (1)
135
return ref self._list.
_items
[index];
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
67
return ref ReadOnlyList.
_items
[index];
src\Dependencies\Collections\SegmentedList`1.cs (82)
80
_items = (SegmentedArray<T>)segmentedList.
_items
.Clone();
96
if (SegmentedCollectionsMarshal.AsSegments(
_items
) is { Length: 1 } segments)
126
get =>
_items
.Length;
134
if (value ==
_items
.Length)
143
if (
_items
.Length == 0)
151
_items = CreateNewSegmentedArrayReusingOldSegments(
_items
, value);
204
return
_items
[index];
213
_items
[index] = value;
251
var array =
_items
;
268
Debug.Assert(_size ==
_items
.Length);
272
_items
[size] = item;
307
if (
_items
.Length - _size < count)
314
SegmentedArray.Copy(list.
_items
, 0,
_items
, _size, list.Count);
318
SegmentedArray.Copy(array, 0,
_items
, _size, array.Length);
324
_items
[targetIndex++] = item;
373
return SegmentedArray.BinarySearch(
_items
, index, count, item, comparer);
399
SegmentedArray.Clear(
_items
, 0, size); // Clear the elements so that the gc can reclaim the references.
439
list.
_items
[i] = converter(
_items
[i]);
462
SegmentedArray.Copy(
_items
, 0, array!, arrayIndex, _size);
482
SegmentedArray.Copy(
_items
, index, array, arrayIndex, count);
488
SegmentedArray.Copy(
_items
, 0, array, arrayIndex, _size);
504
if (
_items
.Length < capacity)
509
return
_items
.Length;
518
Debug.Assert(
_items
.Length < capacity);
522
if (
_items
.Length < SegmentedArrayHelper.GetSegmentSize<T>() / 2)
526
newCapacity =
_items
.Length == 0 ? DefaultCapacity :
_items
.Length * 2;
528
else if (
_items
.Length < SegmentedArrayHelper.GetSegmentSize<T>())
536
if (0 == (
_items
.Length & SegmentedArrayHelper.GetOffsetMask<T>()))
543
var oldSegmentCount = (
_items
.Length + SegmentedArrayHelper.GetSegmentSize<T>() - 1) >> SegmentedArrayHelper.GetSegmentShift<T>();
583
if (match(
_items
[i]))
585
return
_items
[i];
601
if (match(
_items
[i]))
603
list.Add(
_items
[i]);
635
if (match(
_items
[i]))
650
if (match(
_items
[i]))
652
return
_items
[i];
697
if (match(
_items
[i]))
720
action(
_items
[i]);
763
SegmentedArray.Copy(
_items
, index, list.
_items
, 0, count);
791
=> SegmentedArray.IndexOf(
_items
, item, 0, _size);
815
return SegmentedArray.IndexOf(
_items
, item, index, _size - index);
835
return SegmentedArray.IndexOf(
_items
, item, index, count);
846
return SegmentedArray.IndexOf(
_items
, item, index, count, comparer);
860
if (_size ==
_items
.Length)
864
SegmentedArray.Copy(
_items
, index,
_items
, index + 1, _size - index);
866
_items
[index] = item;
907
if (
_items
.Length - _size < count)
913
SegmentedArray.Copy(
_items
, index,
_items
, index + count, _size - index);
920
SegmentedArray.Copy(
_items
, 0,
_items
, index, index);
922
SegmentedArray.Copy(
_items
, index + count,
_items
, index * 2, _size - index);
926
SegmentedArray.Copy(list.
_items
, 0,
_items
, index, list.Count);
930
SegmentedArray.Copy(array, 0,
_items
, index, array.Length);
936
_items
[targetIndex++] = item;
1026
return SegmentedArray.LastIndexOf(
_items
, item, index, count);
1057
return SegmentedArray.LastIndexOf(
_items
, item, index, count, comparer);
1094
while (freeIndex < _size && !match(
_items
[freeIndex]))
1103
while (current < _size && match(
_items
[current]))
1109
_items
[freeIndex++] =
_items
[current++];
1117
SegmentedArray.Clear(
_items
, freeIndex, _size - freeIndex); // Clear the elements so that the gc can reclaim the references.
1137
SegmentedArray.Copy(
_items
, index + 1,
_items
, index, _size - index);
1143
_items
[_size] = default!;
1169
SegmentedArray.Copy(
_items
, index + count,
_items
, index, _size - index);
1177
SegmentedArray.Clear(
_items
, _size, count);
1208
SegmentedArray.Reverse(
_items
, index, count);
1248
SegmentedArray.Sort(
_items
, index, count, comparer);
1262
var segment = new SegmentedArraySegment<T>(
_items
, 0, _size);
1278
SegmentedArray.Copy(
_items
, array, _size);
1293
var threshold = (int)(
_items
.Length * 0.9);
1309
if (!match(
_items
[i]))
1342
_current = localList.
_items
[_index];