1 instantiation of PooledSortedSet
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
53() => new PooledSortedSet<T>(pool, comparer),
21 references to PooledSortedSet
Microsoft.CodeAnalysis.AnalyzerUtilities (21)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (15)
22private readonly ObjectPool<PooledSortedSet<T>>? _pool; 24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 46private static readonly ObjectPool<PooledSortedSet<T>> s_poolInstance = CreatePool(); 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 51ObjectPool<PooledSortedSet<T>>? pool = null; 52pool = new ObjectPool<PooledSortedSet<T>>( 59/// Gets a pooled instance of a <see cref="PooledSortedSet{T}"/> with an optional comparer. 62/// <returns>An empty <see cref="PooledSortedSet{T}"/>.</returns> 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 68var instance = pool.Allocate(); 74/// Gets a pooled instance of a <see cref="PooledSortedSet{T}"/> with the given initializer and an optional comparer. 78/// <returns>An empty <see cref="PooledSortedSet{T}"/>.</returns> 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null) 81var instance = GetInstance(comparer);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysis.cs (6)
69using var worklist = PooledSortedSet<int>.GetInstance(); 70using var pendingBlocksNeedingAtLeastOnePass = PooledSortedSet<int>.GetInstance(cfg.Blocks.Select(b => b.Ordinal)); 184PooledSortedSet<int> worklist, 185PooledSortedSet<int> pendingBlocksNeedingAtLeastOnePass,