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