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