1 instantiation of PooledDictionary
Microsoft.CodeAnalysis.CodeStyle (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
46
pool = new ObjectPool<PooledDictionary<K, V>>(() => new
PooledDictionary
<K, V>(pool!, keyComparer), 128);
76 references to PooledDictionary
Microsoft.CodeAnalysis.CodeStyle (76)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (24)
157
using var _1 =
PooledDictionary
<string, List<(SyntaxTrivia pragma, bool isDisable)>>.GetInstance(out
var
idToPragmasMap);
159
using var _3 =
PooledDictionary
<SyntaxTrivia, bool>.GetInstance(out
var
pragmasToIsUsedMap);
166
using var _5 =
PooledDictionary
<string, List<SyntaxNode>>.GetInstance(out
var
idToSuppressMessageAttributesMap);
167
using var _6 =
PooledDictionary
<SyntaxNode, bool>.GetInstance(out
var
suppressMessageAttributesToIsUsedMap);
228
PooledDictionary
<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
229
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap,
510
PooledDictionary
<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
511
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap,
512
PooledDictionary
<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
513
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
546
PooledDictionary
<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
547
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap)
586
PooledDictionary
<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
587
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
609
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap,
611
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
631
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap,
663
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
736
PooledDictionary
<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
737
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (1)
97
public static ImmutableSegmentedDictionary<K, ImmutableArray<V>> ToImmutableSegmentedDictionaryAndFree<K, V>(this
PooledDictionary
<K, ArrayBuilder<V>> dictionary)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
80
private
PooledDictionary
<K, ValueSet>? _dictionary;
88
_dictionary ??=
PooledDictionary
<K, ValueSet>.GetInstance();
src\Dependencies\PooledObjects\PooledDictionary.cs (8)
16
private readonly ObjectPool<
PooledDictionary
<K, V>> _pool;
18
private PooledDictionary(ObjectPool<
PooledDictionary
<K, V>> pool, IEqualityComparer<K> keyComparer)
40
private static readonly ObjectPool<
PooledDictionary
<K, V>> s_poolInstance = CreatePool(EqualityComparer<K>.Default);
43
public static ObjectPool<
PooledDictionary
<K, V>> CreatePool(IEqualityComparer<K> keyComparer)
45
ObjectPool<
PooledDictionary
<K, V>>? pool = null;
46
pool = new ObjectPool<
PooledDictionary
<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128);
50
public static
PooledDictionary
<K, V> GetInstance()
52
var
instance = s_poolInstance.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (2)
533
using var _ =
PooledDictionary
<ISymbol, int>.GetInstance(out
var
result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
34
var
continueDispatchAfterFinally =
PooledDictionary
<ControlFlowRegion, bool>.GetInstance();
75
PooledDictionary
<ControlFlowRegion, bool> continueDispatchAfterFinally,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (6)
61
protected abstract
PooledDictionary
<(ISymbol symbol, IOperation operation), bool> SymbolsWriteBuilder { get; }
143
protected static
PooledDictionary
<(ISymbol Symbol, IOperation Write), bool> CreateSymbolsWriteMap(
146
var
symbolsWriteMap =
PooledDictionary
<(ISymbol Symbol, IOperation Write), bool>.GetInstance();
150
protected static
PooledDictionary
<(ISymbol Symbol, IOperation Write), bool> UpdateSymbolsWriteMap(
151
PooledDictionary
<(ISymbol Symbol, IOperation Write), bool> symbolsWriteMap,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (20)
31
private readonly
PooledDictionary
<BasicBlock, BasicBlockAnalysisData> _analysisDataByBasicBlockMap;
41
private readonly
PooledDictionary
<CaptureId, PooledHashSet<(ISymbol, IOperation)>> _lValueFlowCapturesMap;
48
private readonly
PooledDictionary
<IOperation, PooledHashSet<IOperation>> _reachingDelegateCreationTargets;
55
private readonly
PooledDictionary
<IMethodSymbol, ControlFlowGraph> _localFunctionTargetsToAccessingCfgMap;
62
private readonly
PooledDictionary
<IFlowAnonymousFunctionOperation, ControlFlowGraph> _lambdaTargetsToAccessingCfgMap;
69
private readonly
PooledDictionary
<(int firstBlockOrdinal, int lastBlockOrdinal), PooledHashSet<(ISymbol, IOperation)>> _symbolWritesInsideBlockRangeMap;
76
PooledDictionary
<BasicBlock, BasicBlockAnalysisData> analysisDataByBasicBlockMap,
77
PooledDictionary
<(ISymbol symbol, IOperation operation), bool> symbolsWriteMap,
81
PooledDictionary
<IOperation, PooledHashSet<IOperation>> reachingDelegateCreationTargets,
82
PooledDictionary
<IMethodSymbol, ControlFlowGraph> localFunctionTargetsToAccessingCfgMap,
83
PooledDictionary
<IFlowAnonymousFunctionOperation, ControlFlowGraph> lambdaTargetsToAccessingCfgMap)
99
_lValueFlowCapturesMap =
PooledDictionary
<CaptureId, PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
103
_symbolWritesInsideBlockRangeMap =
PooledDictionary
<(int firstBlockOrdinal, int lastBlockOrdinal), PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
110
protected override
PooledDictionary
<(ISymbol symbol, IOperation operation), bool> SymbolsWriteBuilder { get; }
134
reachingDelegateCreationTargets:
PooledDictionary
<IOperation, PooledHashSet<IOperation>>.GetInstance(),
135
localFunctionTargetsToAccessingCfgMap:
PooledDictionary
<IMethodSymbol, ControlFlowGraph>.GetInstance(),
136
lambdaTargetsToAccessingCfgMap:
PooledDictionary
<IFlowAnonymousFunctionOperation, ControlFlowGraph>.GetInstance());
164
private static
PooledDictionary
<BasicBlock, BasicBlockAnalysisData> CreateAnalysisDataByBasicBlockMap(
167
var
builder =
PooledDictionary
<BasicBlock, BasicBlockAnalysisData>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (2)
24
PooledDictionary
<(ISymbol symbol, IOperation operation), bool> symbolsWriteMap,
37
protected override
PooledDictionary
<(ISymbol symbol, IOperation operation), bool> SymbolsWriteBuilder { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (2)
30
private
PooledDictionary
<IAssignmentOperation, PooledHashSet<(ISymbol, IOperation)>> _pendingWritesMap;
59
_pendingWritesMap =
PooledDictionary
<IAssignmentOperation, PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledDictionary.cs (3)
9
public static PooledDisposer<
PooledDictionary
<K, V>> GetInstance(out
PooledDictionary
<K, V> instance)
12
return new PooledDisposer<
PooledDictionary
<K, V>>(instance);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (3)
15
public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this
PooledDictionary
<K, V> builders)
29
public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this
PooledDictionary
<K, ArrayBuilder<V>> builders)
43
public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this
PooledDictionary
<K, ArrayBuilder<V>> builders)