3 instantiations of CaptureId
Microsoft.CodeAnalysis (3)
Operations\ControlFlowGraphBuilder.RegionBuilder.cs (1)
73
CaptureIds.Add(new
CaptureId
(captureId));
Operations\OperationNodes.cs (2)
642
this(new
CaptureId
(id), isInitialization, semanticModel: null, syntax: syntax, type: type, constantValue: constantValue, isImplicit: true)
650
this(new
CaptureId
(id), value, semanticModel: null, syntax: syntax, isImplicit: true)
120 references to CaptureId
ILLink.RoslynAnalyzer (22)
DataFlow\LocalDataFlowAnalysis.cs (1)
119
ImmutableDictionary<
CaptureId
, FlowCaptureKind> lValueFlowCaptures,
DataFlow\LocalDataFlowVisitor.cs (4)
49
private readonly ImmutableDictionary<
CaptureId
, FlowCaptureKind> lValueFlowCaptures;
53
bool IsLValueFlowCapture (
CaptureId
captureId)
56
bool IsRValueFlowCapture (
CaptureId
captureId)
64
ImmutableDictionary<
CaptureId
, FlowCaptureKind> lValueFlowCaptures,
DataFlow\LocalStateLattice.cs (8)
15
readonly
CaptureId
? CaptureId;
19
public LocalKey (
CaptureId
captureId) => (Local, CaptureId) = (null, captureId);
46
public DefaultValueDictionary<
CaptureId
, ValueSet<CapturedReferenceValue>> CapturedReferences;
50
new DefaultValueDictionary<
CaptureId
, ValueSet<CapturedReferenceValue>> (default (ValueSet<CapturedReferenceValue>)))
54
public LocalState (DefaultValueDictionary<LocalKey, TValue> dictionary, DefaultValueDictionary<
CaptureId
, ValueSet<CapturedReferenceValue>> capturedReferences)
61
: this (dictionary, new DefaultValueDictionary<
CaptureId
, ValueSet<CapturedReferenceValue>> (default (ValueSet<CapturedReferenceValue>)))
86
public readonly DictionaryLattice<
CaptureId
, ValueSet<CapturedReferenceValue>, ValueSetLattice<CapturedReferenceValue>> CapturedReferenceLattice;
91
CapturedReferenceLattice = new DictionaryLattice<
CaptureId
, ValueSet<CapturedReferenceValue>, ValueSetLattice<CapturedReferenceValue>> (default (ValueSetLattice<CapturedReferenceValue>));
DataFlow\LValueFlowCaptureProvider.cs (7)
23
/// <see cref="
CaptureId
"/> as this flow capture, dereferences and writes to this location
51
public static ImmutableDictionary<
CaptureId
, FlowCaptureKind> CreateLValueFlowCaptures (ControlFlowGraph cfg)
60
ImmutableDictionary<
CaptureId
, FlowCaptureKind>.Builder? lvalueFlowCaptureIdBuilder = null;
61
var rvalueFlowCaptureIds = new HashSet<
CaptureId
> ();
65
lvalueFlowCaptureIdBuilder ??= ImmutableDictionary.CreateBuilder<
CaptureId
, FlowCaptureKind> ();
78
var
captureId = kvp.Key;
85
return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable () : ImmutableDictionary<
CaptureId
, FlowCaptureKind>.Empty;
TrimAnalysis\TrimAnalysisVisitor.cs (1)
51
ImmutableDictionary<
CaptureId
, FlowCaptureKind> lValueFlowCaptures,
TrimAnalysis\TrimDataFlowAnalysis.cs (1)
63
ImmutableDictionary<
CaptureId
, FlowCaptureKind> lValueFlowCaptures,
Microsoft.CodeAnalysis (19)
Generated\FlowAnalysis.Generated.cs (2)
31
CaptureId
Id { get; }
55
CaptureId
Id { get; }
Generated\Operations.Generated.cs (4)
8814
internal FlowCaptureOperation(
CaptureId
id, IOperation value, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit)
8820
public
CaptureId
Id { get; }
8867
internal FlowCaptureReferenceOperation(
CaptureId
id, bool isInitialization, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit)
8875
public
CaptureId
Id { get; }
Operations\CaptureId.cs (5)
13
public readonly struct CaptureId : IEquatable<
CaptureId
>
24
/// Compares <see cref="
CaptureId
"/>s.
26
public bool Equals(
CaptureId
other) => Value == other.Value;
29
public override bool Equals(object? obj) => obj is
CaptureId
&& Equals((
CaptureId
)obj);
Operations\ControlFlowGraphBuilder.cs (2)
1698
/// track <see cref="
CaptureId
"/>s used by the stack spilling, etc.
1868
var idsStillOnTheStack = PooledHashSet<
CaptureId
>.GetInstance();
Operations\ControlFlowGraphBuilder.RegionBuilder.cs (4)
25
public ArrayBuilder<
CaptureId
>? CaptureIds = null;
70
CaptureIds = ArrayBuilder<
CaptureId
>.GetInstance();
76
public void AddCaptureIds(ArrayBuilder<
CaptureId
>? others)
87
CaptureIds = ArrayBuilder<
CaptureId
>.GetInstance();
Operations\ControlFlowRegion.cs (2)
61
public ImmutableArray<
CaptureId
> CaptureIds { get; }
67
ImmutableArray<
CaptureId
> captureIds,
Microsoft.CodeAnalysis.CodeStyle (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (6)
22
/// <see cref="
CaptureId
"/> as this flow capture, dereferences and writes to this location
40
public static ImmutableDictionary<
CaptureId
, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg)
49
ImmutableDictionary<
CaptureId
, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null;
50
var rvalueFlowCaptureIds = PooledHashSet<
CaptureId
>.GetInstance();
60
lvalueFlowCaptureIdBuilder ??= ImmutableDictionary.CreateBuilder<
CaptureId
, FlowCaptureKind>();
80
return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<
CaptureId
, FlowCaptureKind>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (4)
130
public abstract bool IsLValueFlowCapture(
CaptureId
captureId);
131
public abstract bool IsRValueFlowCapture(
CaptureId
captureId);
132
public abstract void OnLValueCaptureFound(ISymbol symbol, IOperation operation,
CaptureId
captureId);
133
public abstract void OnLValueDereferenceFound(
CaptureId
captureId);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (7)
41
private readonly PooledDictionary<
CaptureId
, PooledHashSet<(ISymbol, IOperation)>> _lValueFlowCapturesMap;
99
_lValueFlowCapturesMap = PooledDictionary<
CaptureId
, PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
181
public ImmutableDictionary<
CaptureId
, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
457
public override bool IsLValueFlowCapture(
CaptureId
captureId)
460
public override bool IsRValueFlowCapture(
CaptureId
captureId)
463
public override void OnLValueCaptureFound(ISymbol symbol, IOperation operation,
CaptureId
captureId)
474
public override void OnLValueDereferenceFound(
CaptureId
captureId)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (4)
62
public override bool IsLValueFlowCapture(
CaptureId
captureId)
64
public override bool IsRValueFlowCapture(
CaptureId
captureId)
66
public override void OnLValueCaptureFound(ISymbol symbol, IOperation operation,
CaptureId
captureId)
68
public override void OnLValueDereferenceFound(
CaptureId
captureId)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (2)
102
private void OnLValueCaptureFound(ISymbol symbol, IOperation operation,
CaptureId
captureId)
105
private void OnLValueDereferenceFound(
CaptureId
captureId)
Microsoft.CodeAnalysis.Test.Utilities (33)
Compilation\ControlFlowGraphVerifier.cs (33)
120
var referencedCaptureIds = PooledHashSet<
CaptureId
>.GetInstance();
382
var longLivedIds = PooledHashSet<
CaptureId
>.GetInstance();
383
var referencedIds = PooledHashSet<
CaptureId
>.GetInstance();
384
var entryStates = ArrayBuilder<PooledHashSet<
CaptureId
>>.GetInstance(blocks.Length, fillWithValue: null);
390
PooledHashSet<
CaptureId
> currentState = entryStates[i] ?? PooledHashSet<
CaptureId
>.GetInstance();
401
foreach (
CaptureId
id in region.CaptureIds)
446
foreach (PooledHashSet<
CaptureId
> state in entryStates)
457
void verifyLeftRegions(BasicBlock block, PooledHashSet<
CaptureId
> longLivedIds, PooledHashSet<
CaptureId
> referencedIds, ArrayBuilder<ControlFlowRegion> regions, Func<string> finalGraph)
491
var referencedInLastOperation = PooledHashSet<
CaptureId
>.GetInstance();
503
foreach (
CaptureId
id in region.CaptureIds)
534
bool isWithStatementTargetCapture(ControlFlowRegion region, BasicBlock block,
CaptureId
id)
561
bool isConditionalXMLAccessReceiverCapture(ControlFlowRegion region, BasicBlock block,
CaptureId
id)
600
bool isSwitchTargetCapture(ControlFlowRegion region, BasicBlock block,
CaptureId
id)
643
bool isForEachEnumeratorCapture(ControlFlowRegion region, BasicBlock block,
CaptureId
id)
681
bool isAggregateGroupCapture(IOperation operation, ControlFlowRegion region, BasicBlock block,
CaptureId
id)
713
void adjustEntryStateForDestination(ArrayBuilder<PooledHashSet<
CaptureId
>> entryStates, ControlFlowBranch branch, PooledHashSet<
CaptureId
> state)
719
PooledHashSet<
CaptureId
> entryState = adjustAndGetEntryState(entryStates, branch.Destination, state);
752
PooledHashSet<
CaptureId
> adjustAndGetEntryState(ArrayBuilder<PooledHashSet<
CaptureId
>> entryStates, BasicBlock block, PooledHashSet<
CaptureId
> state)
754
PooledHashSet<
CaptureId
> entryState = entryStates[block.Ordinal];
757
entryState = PooledHashSet<
CaptureId
>.GetInstance();
770
PooledHashSet<
CaptureId
> state, IOperation operation, BasicBlock block, int operationIndex,
771
PooledHashSet<
CaptureId
> longLivedIds, PooledHashSet<
CaptureId
> referencedIds, Func<string> finalGraph)
775
CaptureId
id = reference.Id;
1021
bool isCaptureFromEnclosingGraph(
CaptureId
id)
1038
bool isConditionalAccessCaptureUsedAfterNullCheck(IOperation operation, ControlFlowRegion region, BasicBlock block,
CaptureId
id)
1405
foreach (
CaptureId
id in region.CaptureIds)
1675
foreach (
CaptureId
id in region.CaptureIds)
Microsoft.CodeAnalysis.Workspaces (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (6)
22
/// <see cref="
CaptureId
"/> as this flow capture, dereferences and writes to this location
40
public static ImmutableDictionary<
CaptureId
, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg)
49
ImmutableDictionary<
CaptureId
, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null;
50
var rvalueFlowCaptureIds = PooledHashSet<
CaptureId
>.GetInstance();
60
lvalueFlowCaptureIdBuilder ??= ImmutableDictionary.CreateBuilder<
CaptureId
, FlowCaptureKind>();
80
return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<
CaptureId
, FlowCaptureKind>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (4)
130
public abstract bool IsLValueFlowCapture(
CaptureId
captureId);
131
public abstract bool IsRValueFlowCapture(
CaptureId
captureId);
132
public abstract void OnLValueCaptureFound(ISymbol symbol, IOperation operation,
CaptureId
captureId);
133
public abstract void OnLValueDereferenceFound(
CaptureId
captureId);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (7)
41
private readonly PooledDictionary<
CaptureId
, PooledHashSet<(ISymbol, IOperation)>> _lValueFlowCapturesMap;
99
_lValueFlowCapturesMap = PooledDictionary<
CaptureId
, PooledHashSet<(ISymbol, IOperation)>>.GetInstance();
181
public ImmutableDictionary<
CaptureId
, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
457
public override bool IsLValueFlowCapture(
CaptureId
captureId)
460
public override bool IsRValueFlowCapture(
CaptureId
captureId)
463
public override void OnLValueCaptureFound(ISymbol symbol, IOperation operation,
CaptureId
captureId)
474
public override void OnLValueDereferenceFound(
CaptureId
captureId)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (4)
62
public override bool IsLValueFlowCapture(
CaptureId
captureId)
64
public override bool IsRValueFlowCapture(
CaptureId
captureId)
66
public override void OnLValueCaptureFound(ISymbol symbol, IOperation operation,
CaptureId
captureId)
68
public override void OnLValueDereferenceFound(
CaptureId
captureId)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (2)
102
private void OnLValueCaptureFound(ISymbol symbol, IOperation operation,
CaptureId
captureId)
105
private void OnLValueDereferenceFound(
CaptureId
captureId)