21 instantiations of PendingBranch
Microsoft.CodeAnalysis.CSharp (21)
FlowAnalysis\AbstractFlowPass.cs (12)
1878
PendingBranches.Add(new
PendingBranch
(node, this.State, label: null));
2154
PendingBranches.Add(new
PendingBranch
(node, this.State, null));
2602
PendingBranches.Add(new
PendingBranch
(node, this.State, null));
2688
PendingBranches.Add(new
PendingBranch
(node, this.State, null));
3029
PendingBranches.Add(new
PendingBranch
(node, this.State, node.Label));
3037
PendingBranches.Add(new
PendingBranch
(node, this.State, node.Label));
3140
PendingBranches.Add(new
PendingBranch
(node, this.State, node.Label));
3206
PendingBranches.Add(new
PendingBranch
(node, this.State, null));
3237
PendingBranches.Add(new
PendingBranch
(node, this.State, null));
3245
PendingBranches.Add(new
PendingBranch
(node, this.State, null));
3354
PendingBranches.Add(new
PendingBranch
(node, this.StateWhenTrue, node.Label));
3359
PendingBranches.Add(new
PendingBranch
(node, this.StateWhenFalse, node.Label));
FlowAnalysis\AbstractFlowPass_LocalFunctions.cs (1)
101
PendingBranches.Add(new
PendingBranch
(null, this.State, null));
FlowAnalysis\AbstractFlowPass_Switch.cs (3)
69
PendingBranches.Add(new
PendingBranch
(label, this.State, label.Label));
135
PendingBranches.Add(new
PendingBranch
(node, state, node.DefaultLabel));
138
PendingBranches.Add(new
PendingBranch
(node, state, label));
FlowAnalysis\NullableWalker.cs (4)
2808
PendingBranches.Add(new
PendingBranch
(node, this.State, label: null));
2855
PendingBranches.Add(new
PendingBranch
(node, joinedState, label: null, this.IsConditionalState, this.StateWhenTrue, this.StateWhenFalse));
2859
PendingBranches.Add(new
PendingBranch
(node, this.State, label: null));
3109
PendingBranches.Add(new
PendingBranch
(null, this.State, null));
FlowAnalysis\NullableWalker_Patterns.cs (1)
269
PendingBranches.Add(new
PendingBranch
(label, this.State, label.Label));
59 references to PendingBranch
Microsoft.CodeAnalysis.CSharp (59)
FlowAnalysis\AbstractFlowPass.cs (11)
422
protected virtual ImmutableArray<
PendingBranch
> Scan(ref bool badRegion)
433
ImmutableArray<
PendingBranch
> result = RemoveReturns();
437
protected ImmutableArray<
PendingBranch
> Analyze(ref bool badRegion, Optional<TLocalState> initialState = default)
439
ImmutableArray<
PendingBranch
> returns;
532
protected virtual ImmutableArray<
PendingBranch
> RemoveReturns()
534
ImmutableArray<
PendingBranch
> result;
743
foreach (
var
pending in pendingBranches)
755
protected virtual void NoteBranch(
PendingBranch
pending, BoundNode gotoStmt, BoundStatement target)
775
foreach (
var
pending in pendingBranches)
785
protected virtual void ResolveBranch(
PendingBranch
pending, LabelSymbol label, BoundStatement? target, ref bool labelStateChanged)
1716
foreach (
var
pend in tryAndCatchPending.PendingBranches.AsEnumerable())
FlowAnalysis\AbstractFlowPass.PendingBranchesCollection.cs (15)
16
private ArrayBuilder<
PendingBranch
> _unlabeledBranches;
17
private PooledDictionary<LabelSymbol, ArrayBuilder<
PendingBranch
>>? _labeledBranches;
21
_unlabeledBranches = ArrayBuilder<
PendingBranch
>.GetInstance();
53
internal ImmutableArray<
PendingBranch
> ToImmutable()
60
internal ArrayBuilder<
PendingBranch
>? GetAndRemoveBranches(LabelSymbol? label)
62
ArrayBuilder<
PendingBranch
>? result;
72
_unlabeledBranches = ArrayBuilder<
PendingBranch
>.GetInstance();
86
internal void Add(
PendingBranch
branch)
113
private ArrayBuilder<
PendingBranch
> GetOrAddLabeledBranches(LabelSymbol label)
117
_labeledBranches = PooledDictionary<LabelSymbol, ArrayBuilder<
PendingBranch
>>.GetInstance();
121
branches = ArrayBuilder<
PendingBranch
>.GetInstance();
130
internal IEnumerable<
PendingBranch
> AsEnumerable()
136
IEnumerable<
PendingBranch
> asEnumerableCore()
138
foreach (
var
branch in _unlabeledBranches)
144
foreach (
var
branch in branches)
FlowAnalysis\AbstractFlowPass_LocalFunctions.cs (2)
106
ImmutableArray<
PendingBranch
> pendingReturns = RemoveReturns();
120
foreach (
PendingBranch
pending in pendingReturns)
FlowAnalysis\AbstractRegionControlFlowPass.cs (2)
39
ImmutableArray<
PendingBranch
> pendingReturns = RemoveReturns();
42
foreach (
PendingBranch
returnBranch in pendingReturns)
FlowAnalysis\AbstractRegionDataFlowPass.cs (1)
32
protected override ImmutableArray<
PendingBranch
> Scan(ref bool badRegion)
FlowAnalysis\AlwaysAssignedWalker.cs (2)
81
protected override void ResolveBranch(
PendingBranch
pending, LabelSymbol label, BoundStatement target, ref bool labelStateChanged)
134
foreach (
var
branch in PendingBranches.AsEnumerable())
FlowAnalysis\ControlFlowPass.cs (5)
133
protected override ImmutableArray<
PendingBranch
> Scan(ref bool badRegion)
193
ImmutableArray<
PendingBranch
> returns = Analyze(ref badRegion);
204
protected override ImmutableArray<
PendingBranch
> RemoveReturns()
207
foreach (
var
pending in result)
300
foreach (
var
branch in PendingBranches.AsEnumerable())
FlowAnalysis\DataFlowsInWalker.cs (1)
80
PendingBranch
pending,
FlowAnalysis\DataFlowsOutWalker.cs (1)
67
protected override ImmutableArray<
PendingBranch
> Scan(ref bool badRegion)
FlowAnalysis\DefiniteAssignment.cs (8)
330
protected override ImmutableArray<
PendingBranch
> Scan(ref bool badRegion)
372
ImmutableArray<
PendingBranch
> pendingReturns = base.Scan(ref badRegion);
384
foreach (
PendingBranch
returnBranch in pendingReturns)
398
protected override ImmutableArray<
PendingBranch
> RemoveReturns()
420
private static bool HasAwait(
PendingBranch
pending)
661
ImmutableArray<
PendingBranch
> returns = Analyze(ref badRegion);
2277
ImmutableArray<
PendingBranch
> pendingReturns = RemoveReturns();
2282
foreach (
PendingBranch
pending in pendingReturns)
FlowAnalysis\EntryPointsWalker.cs (1)
58
protected override void NoteBranch(
PendingBranch
pending, BoundNode gotoStmt, BoundStatement targetStmt)
FlowAnalysis\ExitPointsWalker.cs (1)
122
foreach (
var
pending in PendingBranches.AsEnumerable())
FlowAnalysis\NullableWalker.cs (8)
545
protected override ImmutableArray<
PendingBranch
> Scan(ref bool badRegion)
567
ImmutableArray<
PendingBranch
> pendingReturns = base.Scan(ref badRegion);
574
foreach (
var
pendingReturn in pendingReturns)
770
void enforceMemberNotNullWhenForPendingReturn(
PendingBranch
pendingReturn, BoundReturnStatement returnStatement)
1105
private void EnforceNotNullWhenForPendingReturn(
PendingBranch
pendingReturn, BoundReturnStatement returnStatement)
1740
ImmutableArray<
PendingBranch
> returns = walker.Analyze(ref badRegion, initialState);
3118
ImmutableArray<
PendingBranch
> pendingReturns = RemoveReturns();
3119
foreach (
var
pendingReturn in pendingReturns)
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
184
protected override ImmutableArray<
PendingBranch
> Scan(ref bool badRegion)