1 instantiation of PooledDictionary
Microsoft.CodeAnalysis.Workspaces (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
46pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128);
99 references to PooledDictionary
Microsoft.CodeAnalysis.Workspaces (99)
Classification\IRemoteSemanticClassificationService.cs (2)
74using var _1 = PooledDictionary<string, int>.GetInstance(out var classificationTypeToId);
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (2)
112var builder = PooledDictionary<Document, ArrayBuilder<Diagnostic>>.GetInstance();
Diagnostics\DiagnosticAnalysisResult.cs (2)
127var diagnosticsWithDocumentId = PooledDictionary<DocumentId, ArrayBuilder<DiagnosticData>>.GetInstance();
FindSymbols\FindReferences\DependentProjectsFinder.cs (2)
197using var _1 = PooledDictionary<ProjectId, List<ProjectId>>.GetInstance(out var projectIdsToReferencingSubmissionIds);
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (7)
219using var _1 = PooledDictionary<ISymbol, PooledHashSet<string>>.GetInstance(out var symbolToGlobalAliases); 220using var _2 = PooledDictionary<Document, Dictionary<ISymbol, SymbolGroup>>.GetInstance(out var documentToSymbolsWithin); 345PooledDictionary<ISymbol, PooledHashSet<string>> symbolToGlobalAliases, 360private static PooledHashSet<string> GetGlobalAliasesSet<T>(PooledDictionary<T, PooledHashSet<string>> dictionary, T key) where T : notnull 363private static void FreeGlobalAliases(PooledDictionary<ISymbol, PooledHashSet<string>> symbolToGlobalAliases)
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (3)
77using var _ = PooledDictionary<ISymbol, PooledHashSet<string>>.GetInstance(out var symbolToGlobalAliases); 102PooledDictionary<ISymbol, PooledHashSet<string>> symbolToGlobalAliases)
FindSymbols\SymbolFinder.FindReferencesServerCallback.cs (2)
46using var _ = PooledDictionary<SerializableSymbolAndProjectId, ISymbol>.GetInstance(out var map);
FindSymbols\SymbolFinder_Helpers.cs (2)
103using var _ = PooledDictionary<INamedTypeSymbol, INamedTypeSymbol>.GetInstance(out var equivalentTypesWithDifferingAssemblies);
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex_Create.cs (2)
21using var _2 = PooledDictionary<string, ArrayBuilder<int>>.GetInstance(out var extensionMethodInfo);
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (2)
162using var _1 = PooledDictionary<string, string?>.GetInstance(out var aliases);
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (2)
49var builder = PooledDictionary<Document, ArrayBuilder<TextSpan>>.GetInstance();
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (2)
23using var _1 = PooledDictionary<string, DocumentAndHashBuilder>.GetInstance(out var filePathToNewDocumentsAndHashes);
ReassignedVariable\AbstractReassignedVariableService.cs (4)
48using var _1 = PooledDictionary<ISymbol, bool>.GetInstance(out var symbolToIsReassigned); 50using var _3 = PooledDictionary<SyntaxTree, SemanticModel>.GetInstance(out var syntaxTreeToModel);
Shared\Extensions\ILanguageMetadataExtensions.cs (2)
47using var _ = PooledDictionary<string, ArrayBuilder<Lazy<TInterface, TMetadata>>>.GetInstance(out var map);
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
80private PooledDictionary<K, ValueSet>? _dictionary; 88_dictionary ??= PooledDictionary<K, ValueSet>.GetInstance();
src\Dependencies\PooledObjects\PooledDictionary.cs (8)
16private readonly ObjectPool<PooledDictionary<K, V>> _pool; 18private PooledDictionary(ObjectPool<PooledDictionary<K, V>> pool, IEqualityComparer<K> keyComparer) 40private static readonly ObjectPool<PooledDictionary<K, V>> s_poolInstance = CreatePool(EqualityComparer<K>.Default); 43public static ObjectPool<PooledDictionary<K, V>> CreatePool(IEqualityComparer<K> keyComparer) 45ObjectPool<PooledDictionary<K, V>>? pool = null; 46pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128); 50public static PooledDictionary<K, V> GetInstance() 52var instance = s_poolInstance.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (2)
533using var _ = PooledDictionary<ISymbol, int>.GetInstance(out var result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
34var continueDispatchAfterFinally = PooledDictionary<ControlFlowRegion, bool>.GetInstance(); 75PooledDictionary<ControlFlowRegion, bool> continueDispatchAfterFinally,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (6)
61protected abstract PooledDictionary<(ISymbol symbol, IOperation operation), bool> SymbolsWriteBuilder { get; } 143protected static PooledDictionary<(ISymbol Symbol, IOperation Write), bool> CreateSymbolsWriteMap( 146var symbolsWriteMap = PooledDictionary<(ISymbol Symbol, IOperation Write), bool>.GetInstance(); 150protected static PooledDictionary<(ISymbol Symbol, IOperation Write), bool> UpdateSymbolsWriteMap( 151PooledDictionary<(ISymbol Symbol, IOperation Write), bool> symbolsWriteMap,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (20)
31private readonly PooledDictionary<BasicBlock, BasicBlockAnalysisData> _analysisDataByBasicBlockMap; 41private readonly PooledDictionary<CaptureId, PooledHashSet<(ISymbol, IOperation)>> _lValueFlowCapturesMap; 48private readonly PooledDictionary<IOperation, PooledHashSet<IOperation>> _reachingDelegateCreationTargets; 55private readonly PooledDictionary<IMethodSymbol, ControlFlowGraph> _localFunctionTargetsToAccessingCfgMap; 62private readonly PooledDictionary<IFlowAnonymousFunctionOperation, ControlFlowGraph> _lambdaTargetsToAccessingCfgMap; 69private readonly PooledDictionary<(int firstBlockOrdinal, int lastBlockOrdinal), PooledHashSet<(ISymbol, IOperation)>> _symbolWritesInsideBlockRangeMap; 76PooledDictionary<BasicBlock, BasicBlockAnalysisData> analysisDataByBasicBlockMap, 77PooledDictionary<(ISymbol symbol, IOperation operation), bool> symbolsWriteMap, 81PooledDictionary<IOperation, PooledHashSet<IOperation>> reachingDelegateCreationTargets, 82PooledDictionary<IMethodSymbol, ControlFlowGraph> localFunctionTargetsToAccessingCfgMap, 83PooledDictionary<IFlowAnonymousFunctionOperation, ControlFlowGraph> lambdaTargetsToAccessingCfgMap) 99_lValueFlowCapturesMap = PooledDictionary<CaptureId, PooledHashSet<(ISymbol, IOperation)>>.GetInstance(); 103_symbolWritesInsideBlockRangeMap = PooledDictionary<(int firstBlockOrdinal, int lastBlockOrdinal), PooledHashSet<(ISymbol, IOperation)>>.GetInstance(); 110protected override PooledDictionary<(ISymbol symbol, IOperation operation), bool> SymbolsWriteBuilder { get; } 134reachingDelegateCreationTargets: PooledDictionary<IOperation, PooledHashSet<IOperation>>.GetInstance(), 135localFunctionTargetsToAccessingCfgMap: PooledDictionary<IMethodSymbol, ControlFlowGraph>.GetInstance(), 136lambdaTargetsToAccessingCfgMap: PooledDictionary<IFlowAnonymousFunctionOperation, ControlFlowGraph>.GetInstance()); 164private static PooledDictionary<BasicBlock, BasicBlockAnalysisData> CreateAnalysisDataByBasicBlockMap( 167var builder = PooledDictionary<BasicBlock, BasicBlockAnalysisData>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (2)
24PooledDictionary<(ISymbol symbol, IOperation operation), bool> symbolsWriteMap, 37protected override PooledDictionary<(ISymbol symbol, IOperation operation), bool> SymbolsWriteBuilder { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (2)
30private PooledDictionary<IAssignmentOperation, PooledHashSet<(ISymbol, IOperation)>> _pendingWritesMap; 59_pendingWritesMap = PooledDictionary<IAssignmentOperation, PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledDictionary.cs (3)
9public static PooledDisposer<PooledDictionary<K, V>> GetInstance(out PooledDictionary<K, V> instance) 12return new PooledDisposer<PooledDictionary<K, V>>(instance);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (3)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
174using var _ = PooledDictionary<INamespaceSymbol, SyntaxNode>.GetInstance(out var importToSyntax);
Workspace\Solution\SolutionCompilationState.cs (2)
1601using var _ = PooledDictionary<ProjectId, ArrayBuilder<DocumentState>>.GetInstance(out var missingDocumentStates);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (2)
118using var _2 = PooledDictionary<DocumentId, int>.GetInstance(out var documentIdToIndex);
Workspace\Solution\SolutionCompilationState.TranslationAction_Actions.cs (2)
177using var _ = PooledDictionary<DocumentState, int>.GetInstance(out var documentToIndex);
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (2)
89using var _ = PooledDictionary<ISourceGenerator, AnalyzerReference>.GetInstance(out var generatorToAnalyzerReference);
Workspace\Workspace.cs (2)
364using var _ = PooledDictionary<DocumentId, DocumentState>.GetInstance(out var relatedDocumentIdsAndStates);