1 instantiation of PooledDictionary
Microsoft.CodeAnalysis.CodeStyle (1)
J\s\src\Dependencies\PooledObjects\PooledDictionary.cs\PooledDictionary.cs (1)
46
pool = new ObjectPool<PooledDictionary<K, V>>(() => new
PooledDictionary
<K, V>(pool!, keyComparer), 128);
83 references to PooledDictionary
Microsoft.CodeAnalysis.CodeStyle (73)
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (24)
155
using var _1 =
PooledDictionary
<string, List<(SyntaxTrivia pragma, bool isDisable)>>.GetInstance(out
var
idToPragmasMap);
157
using var _3 =
PooledDictionary
<SyntaxTrivia, bool>.GetInstance(out
var
pragmasToIsUsedMap);
164
using var _5 =
PooledDictionary
<string, List<SyntaxNode>>.GetInstance(out
var
idToSuppressMessageAttributesMap);
165
using var _6 =
PooledDictionary
<SyntaxNode, bool>.GetInstance(out
var
suppressMessageAttributesToIsUsedMap);
226
PooledDictionary
<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
227
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap,
508
PooledDictionary
<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
509
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap,
510
PooledDictionary
<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
511
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
543
PooledDictionary
<string, List<(SyntaxTrivia pragma, bool isDisable)>> idToPragmasMap,
544
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap)
583
PooledDictionary
<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
584
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
606
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap,
608
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
628
PooledDictionary
<SyntaxTrivia, bool> pragmasToIsUsedMap,
660
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
733
PooledDictionary
<string, List<SyntaxNode>> idToSuppressMessageAttributesMap,
734
PooledDictionary
<SyntaxNode, bool> suppressMessageAttributesToIsUsedMap,
CustomDataFlowAnalysis.cs (3)
34
var
continueDispatchAfterFinally =
PooledDictionary
<ControlFlowRegion, bool>.GetInstance();
75
PooledDictionary
<ControlFlowRegion, bool> continueDispatchAfterFinally,
J\s\src\Dependencies\PooledObjects\PooledDictionary.cs\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();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledDictionary.cs\PooledDictionary.cs (3)
9
public static PooledDisposer<
PooledDictionary
<K, V>> GetInstance(out
PooledDictionary
<K, V> instance)
12
return new PooledDisposer<
PooledDictionary
<K, V>>(instance);
OrderPreservingMultiDictionary.cs (2)
79
private
PooledDictionary
<K, ValueSet>? _dictionary;
87
_dictionary ??=
PooledDictionary
<K, ValueSet>.GetInstance();
PooledBuilderExtensions.cs (3)
14
public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this
PooledDictionary
<K, V> builders)
28
public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this
PooledDictionary
<K, ArrayBuilder<V>> builders)
42
public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this
PooledDictionary
<K, ArrayBuilder<V>> builders)
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,
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();
SymbolUsageAnalysis.OperationTreeAnalysisData.cs (2)
24
PooledDictionary
<(ISymbol symbol, IOperation operation), bool> symbolsWriteMap,
37
protected override
PooledDictionary
<(ISymbol symbol, IOperation operation), bool> SymbolsWriteBuilder { get; }
SymbolUsageAnalysis.Walker.cs (2)
30
private
PooledDictionary
<IAssignmentOperation, PooledHashSet<(ISymbol, IOperation)>> _pendingWritesMap;
59
_pendingWritesMap =
PooledDictionary
<IAssignmentOperation, PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
AbstractMultipleBlankLinesCodeFixProvider.cs (2)
54
using var _ =
PooledDictionary
<SyntaxToken, SyntaxToken>.GetInstance(out
var
replacements);
AbstractRemoveUnusedValuesCodeFixProvider.cs (4)
458
using var _1 =
PooledDictionary
<SyntaxNode, SyntaxNode>.GetInstance(out
var
nodeReplacementMap);
775
using var _1 =
PooledDictionary
<SyntaxNode, SyntaxNode>.GetInstance(out
var
memberDeclReplacementsMap);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
ConsecutiveBracePlacementCodeFixProvider.cs (2)
55
using var _ =
PooledDictionary
<SyntaxToken, SyntaxToken>.GetInstance(out
var
tokenToToken);
ConstructorInitializerPlacementCodeFixProvider.cs (2)
52
using var _ =
PooledDictionary
<SyntaxToken, SyntaxToken>.GetInstance(out
var
replacementMap);