src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (35)
41private readonly PooledDictionary<CaptureId, PooledHashSet<(ISymbol, IOperation)>> _lValueFlowCapturesMap;
48private readonly PooledDictionary<IOperation, PooledHashSet<IOperation>> _reachingDelegateCreationTargets;
69private readonly PooledDictionary<(int firstBlockOrdinal, int lastBlockOrdinal), PooledHashSet<(ISymbol, IOperation)>> _symbolWritesInsideBlockRangeMap;
78PooledHashSet<ISymbol> symbolsRead,
79PooledHashSet<IMethodSymbol> lambdaOrLocalFunctionsBeingAnalyzed,
81PooledDictionary<IOperation, PooledHashSet<IOperation>> reachingDelegateCreationTargets,
99_lValueFlowCapturesMap = PooledDictionary<CaptureId, PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
103_symbolWritesInsideBlockRangeMap = PooledDictionary<(int firstBlockOrdinal, int lastBlockOrdinal), PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
108protected override PooledHashSet<ISymbol> SymbolsReadBuilder { get; }
112protected override PooledHashSet<IMethodSymbol> LambdaOrLocalFunctionsBeingAnalyzed { get; }
131symbolsRead: PooledHashSet<ISymbol>.GetInstance(),
132lambdaOrLocalFunctionsBeingAnalyzed: PooledHashSet<IMethodSymbol>.GetInstance(),
134reachingDelegateCreationTargets: PooledDictionary<IOperation, PooledHashSet<IOperation>>.GetInstance(),
189using var _ = PooledHashSet<ILocalSymbol>.GetInstance(out var builder);
216private PooledHashSet<(ISymbol, IOperation)> GetOrCreateSymbolWritesInBlockRange(int firstBlockOrdinal, int lastBlockOrdinal, CancellationToken cancellationToken)
218if (!_symbolWritesInsideBlockRangeMap.TryGetValue((firstBlockOrdinal, lastBlockOrdinal), out var writesInBlockRange))
221var operations = PooledHashSet<IOperation>.GetInstance();
225writesInBlockRange = PooledHashSet<(ISymbol, IOperation)>.GetInstance();
242PooledHashSet<IOperation> operationsBuilder,
255_reachingDelegateCreationTargets.TryGetValue(invocation.Instance, out var targets))
274void AddDescendantOperationsFromDelegateCreationTargets(PooledHashSet<IOperation> targets)
465if (!_lValueFlowCapturesMap.TryGetValue(captureId, out var captures))
467captures = PooledHashSet<(ISymbol, IOperation)>.GetInstance();
476if (_lValueFlowCapturesMap.TryGetValue(captureId, out var captures))
523var targetsBuilder = PooledHashSet<IOperation>.GetInstance();
534if (!arg.self._reachingDelegateCreationTargets.TryGetValue(symbolWrite, out var targetsBuilderForSymbolWrite))
589var targetsBuilder = PooledHashSet<IOperation>.GetInstance();
601if (_reachingDelegateCreationTargets.TryGetValue(write, out var targetsBuilder))
630foreach (var creations in _reachingDelegateCreationTargets.Values)
651foreach (var captures in _lValueFlowCapturesMap.Values)
658foreach (var operations in _symbolWritesInsideBlockRangeMap.Values)