1 instantiation of PooledDictionary
Microsoft.CodeAnalysis (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
46pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool!, keyComparer), 128);
73 references to PooledDictionary
Microsoft.CodeAnalysis (37)
CodeGen\SynthesizedLocalOrdinalsDispenser.cs (2)
17private PooledDictionary<long, int>? _lazyMap; 50_lazyMap = PooledDictionary<long, int>.GetInstance();
Collections\OrderPreservingMultiDictionary.cs (2)
80private PooledDictionary<K, ValueSet>? _dictionary; 88_dictionary ??= PooledDictionary<K, ValueSet>.GetInstance();
Collections\TopologicalSort.cs (4)
48PooledDictionary<TNode, int> predecessorCounts = PredecessorCounts(nodes, addSuccessors, out ImmutableArray<TNode> allNodes); 95private static PooledDictionary<TNode, int> PredecessorCounts<TNode>( 101var predecessorCounts = PooledDictionary<TNode, int>.GetInstance();
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
1154var programmaticSuppressionsBuilder = PooledDictionary<Diagnostic, ArrayBuilder<Suppression>>.GetInstance();
DiagnosticAnalyzer\AnalyzerExecutor.cs (4)
930var nodeActionsByKind = PooledDictionary<TLanguageKindEnum, ArrayBuilder<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>.GetInstance(); 1029var operationActionsByKind = PooledDictionary<OperationKind, ArrayBuilder<OperationAnalyzerAction>>.GetInstance();
Operations\ControlFlowGraphBuilder.cs (12)
34private readonly PooledDictionary<BasicBlockBuilder, RegionBuilder> _regionMap; 37private PooledDictionary<ILabelSymbol, BasicBlockBuilder>? _labeledBlocks; 69_regionMap = PooledDictionary<BasicBlockBuilder, RegionBuilder>.GetInstance(); 228var continueDispatchAfterFinally = PooledDictionary<ControlFlowRegion, bool>.GetInstance(); 244PooledDictionary<ControlFlowRegion, bool> continueDispatchAfterFinally, 494private static void Pack(ArrayBuilder<BasicBlockBuilder> blocks, RegionBuilder root, PooledDictionary<BasicBlockBuilder, RegionBuilder> regionMap) 511private static bool PackRegions(RegionBuilder root, ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<BasicBlockBuilder, RegionBuilder> regionMap) 614private static void MergeSubRegionAndFree(RegionBuilder subRegion, ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<BasicBlockBuilder, RegionBuilder> regionMap, bool canHaveEmptyRegion = false) 670private static bool PackBlocks(ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<BasicBlockBuilder, RegionBuilder> regionMap) 1186private static void CheckUnresolvedBranches(ArrayBuilder<BasicBlockBuilder> blocks, PooledDictionary<ILabelSymbol, BasicBlockBuilder>? labeledBlocks) 3887_labeledBlocks = PooledDictionary<ILabelSymbol, BasicBlockBuilder>.GetInstance();
Operations\ControlFlowGraphBuilder.ImplicitInstanceInfo.cs (3)
33public PooledDictionary<IPropertySymbol, IOperation>? AnonymousTypePropertyValues { get; } 49AnonymousTypePropertyValues = PooledDictionary<IPropertySymbol, IOperation>.GetInstance(); 66AnonymousTypePropertyValues = PooledDictionary<IPropertySymbol, IOperation>.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();
Microsoft.CodeAnalysis.CSharp (35)
Binder\Binder_Lambda.cs (1)
439var bindings = PooledDictionary<SyntaxNode, int>.GetInstance();
Binder\DecisionDagBuilder.cs (3)
771var tempIdentifierMap = PooledDictionary<BoundDagEvaluation, int>.GetInstance(); 997var uniqueNodes = PooledDictionary<BoundDecisionDagNode, BoundDecisionDagNode>.GetInstance(); 1655var stateIdentifierMap = PooledDictionary<DagState, int>.GetInstance();
Binder\PatternExplainer.cs (1)
38var dist = PooledDictionary<BoundDecisionDagNode, (int distance, BoundDecisionDagNode next)>.GetInstance();
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
127var lookedInInterfaces = PooledDictionary<TypeSymbol, bool>.GetInstance();
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1862var resultsByContainingType = PooledDictionary<NamedTypeSymbol, OneOrMany<TMemberResolution>>.GetInstance();
BoundTree\BoundDecisionDag.cs (1)
102var replacement = PooledDictionary<BoundDecisionDagNode, BoundDecisionDagNode>.GetInstance();
BoundTree\LengthBasedStringSwitchData.cs (1)
231var countPerChar = PooledDictionary<char, int>.GetInstance();
CodeGen\Optimizer.cs (1)
66var locals = PooledDictionary<LocalSymbol, LocalDefUseInfo>.GetInstance();
Compilation\SyntaxAndDeclarationManager.cs (7)
57var ordinalMapBuilder = PooledDictionary<SyntaxTree, int>.GetInstance(); 58var loadDirectiveMapBuilder = PooledDictionary<SyntaxTree, ImmutableArray<LoadDirective>>.GetInstance(); 59var loadedSyntaxTreeMapBuilder = PooledDictionary<string, SyntaxTree>.GetInstance(); 60var declMapBuilder = PooledDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>>.GetInstance(); 61var lastComputedMemberNamesMap = PooledDictionary<SyntaxTree, OneOrMany<WeakReference<StrongBox<ImmutableSegmentedHashSet<string>>>>>.GetInstance(); 334var ordinalMapBuilder = PooledDictionary<SyntaxTree, int>.GetInstance(); 524var ordinalMapBuilder = PooledDictionary<SyntaxTree, int>.GetInstance();
Declarations\MergedNamespaceDeclaration.cs (1)
196var typeGroups = PooledDictionary<SingleTypeDeclaration.TypeDeclarationIdentity, object>.GetInstance();
FlowAnalysis\NullableWalker_Patterns.cs (4)
405var originalInputMap = PooledDictionary<int, BoundExpression>.GetInstance(); 409var tempMap = PooledDictionary<BoundDagTemp, (int slot, TypeSymbol type)>.GetInstance(); 413var nodeStateMap = PooledDictionary<BoundDecisionDagNode, (PossiblyConditionalState state, bool believedReachable)>.GetInstance(); 416var labelStateMap = PooledDictionary<LabelSymbol, (LocalState state, bool believedReachable)>.GetInstance();
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (2)
363var closuresCapturingScopeVariables = PooledDictionary<Scope, PooledHashSet<NestedFunction>>.GetInstance(); 367var environmentsToScopes = PooledDictionary<ClosureEnvironment, Scope>.GetInstance();
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (2)
1002var whenExpressionMap = PooledDictionary<BoundExpression, (LabelSymbol LabelToWhenExpression, ArrayBuilder<BoundWhenDecisionDagNode> WhenNodes)>.GetInstance(); 1003var whenNodeMap = PooledDictionary<BoundWhenDecisionDagNode, (LabelSymbol LabelToWhenExpression, int WhenNodeIdentifier)>.GetInstance();
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
262var placeholderValues = PooledDictionary<BoundEarlyValuePlaceholderBase, BoundExpression>.GetInstance(); 288var placeholderValues = PooledDictionary<BoundEarlyValuePlaceholderBase, BoundExpression>.GetInstance();
Lowering\SpillSequenceSpiller.cs (2)
234var tempSubstitution = PooledDictionary<LocalSymbol, LocalSymbol>.GetInstance(); 235var receiverSubstitution = PooledDictionary<LocalSymbol, BoundComplexConditionalReceiver>.GetInstance();
Symbols\AbstractTypeMap.cs (1)
364var map = PooledDictionary<TypeSymbol, int>.GetInstance();
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1986var map = PooledDictionary<MethodDefinitionHandle, PEMethodSymbol>.GetInstance();
Symbols\ReferenceManager.cs (1)
346var assemblyReferencesBySimpleName = PooledDictionary<string, List<ReferencedAssemblyIdentity>>.GetInstance();
Symbols\Source\ConstantEvaluationHelpers.cs (1)
59var graph = PooledDictionary<SourceFieldSymbolWithSyntaxReference, Node<SourceFieldSymbolWithSyntaxReference>>.GetInstance();
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4201var fieldsByName = PooledDictionary<string, Symbol>.GetInstance();
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Native.cs (1)
396var localKindsByName = PooledDictionary<string, LocalKind>.GetInstance();