110 references to ControlFlowBranchSemantics
ILLink.RoslynAnalyzer (1)
DataFlow\LocalDataFlowVisitor.cs (1)
107 if (block.Block.FallThroughSuccessor?.Semantics == ControlFlowBranchSemantics.Throw)
Microsoft.CodeAnalysis (56)
Operations\ControlFlowBranch.cs (2)
25ControlFlowBranchSemantics semantics, 47public ControlFlowBranchSemantics Semantics { get; }
Operations\ControlFlowGraphBuilder.BasicBlockBuilder.cs (1)
318public ControlFlowBranchSemantics Kind { get; set; }
Operations\ControlFlowGraphBuilder.cs (53)
295if (current.Ordinal == lastBlockOrdinal && branch.Kind != ControlFlowBranchSemantics.Throw && branch.Kind != ControlFlowBranchSemantics.Rethrow) 317case ControlFlowBranchSemantics.None: 318case ControlFlowBranchSemantics.ProgramTermination: 319case ControlFlowBranchSemantics.StructuredExceptionHandling: 320case ControlFlowBranchSemantics.Throw: 321case ControlFlowBranchSemantics.Rethrow: 322case ControlFlowBranchSemantics.Error: 326case ControlFlowBranchSemantics.Regular: 327case ControlFlowBranchSemantics.Return: 390blocks[@finally.LastBlockOrdinal].FallThrough.Kind == ControlFlowBranchSemantics.StructuredExceptionHandling; 705Debug.Assert(predecessor.FallThrough.Kind == ControlFlowBranchSemantics.Regular); 718Debug.Assert((block.BranchValue != null && !block.HasCondition) == (next.Kind == ControlFlowBranchSemantics.Return || next.Kind == ControlFlowBranchSemantics.Throw)); 720(next.Kind == ControlFlowBranchSemantics.ProgramTermination || 721next.Kind == ControlFlowBranchSemantics.Throw || 722next.Kind == ControlFlowBranchSemantics.Rethrow || 723next.Kind == ControlFlowBranchSemantics.Error || 724next.Kind == ControlFlowBranchSemantics.StructuredExceptionHandling)); 727if (next.Kind == ControlFlowBranchSemantics.StructuredExceptionHandling) 753next.Destination == null && next.Kind == ControlFlowBranchSemantics.StructuredExceptionHandling && 795if (next.Kind == ControlFlowBranchSemantics.StructuredExceptionHandling) 828Debug.Assert(next.Kind == ControlFlowBranchSemantics.Regular || 829next.Kind == ControlFlowBranchSemantics.Return || 830next.Kind == ControlFlowBranchSemantics.Throw || 831next.Kind == ControlFlowBranchSemantics.Rethrow || 832next.Kind == ControlFlowBranchSemantics.Error || 833next.Kind == ControlFlowBranchSemantics.ProgramTermination); 855if (!block.HasPredecessors && next.Kind == ControlFlowBranchSemantics.Return) 944if (next.Kind == ControlFlowBranchSemantics.StructuredExceptionHandling) 949Debug.Assert(next.Kind == ControlFlowBranchSemantics.Regular || 950next.Kind == ControlFlowBranchSemantics.Return || 951next.Kind == ControlFlowBranchSemantics.Throw || 952next.Kind == ControlFlowBranchSemantics.Rethrow || 953next.Kind == ControlFlowBranchSemantics.Error || 954next.Kind == ControlFlowBranchSemantics.ProgramTermination); 1097Debug.Assert(predecessorBranch.Kind == ControlFlowBranchSemantics.Regular); 1226Debug.Assert(branch.Kind == ControlFlowBranchSemantics.Regular); 1228branch.Kind = ControlFlowBranchSemantics.Error; 1368private static void LinkBlocks(BasicBlockBuilder prevBlock, BasicBlockBuilder nextBlock, ControlFlowBranchSemantics branchKind = ControlFlowBranchSemantics.Regular) 3285return new BasicBlockBuilder.Branch() { Destination = destination, Kind = ControlFlowBranchSemantics.Regular }; 3708continueDispatchBlock.FallThrough.Kind = ControlFlowBranchSemantics.StructuredExceptionHandling; 3770continueDispatchBlock.FallThrough.Kind = ControlFlowBranchSemantics.StructuredExceptionHandling; 3841LinkBlocks(CurrentBasicBlock, _exit, returnedValue is null ? ControlFlowBranchSemantics.Regular : ControlFlowBranchSemantics.Return); 3942Debug.Assert(current.FallThrough.Kind == ControlFlowBranchSemantics.None); 3944current.FallThrough.Kind = exception == null ? ControlFlowBranchSemantics.Rethrow : ControlFlowBranchSemantics.Throw; 4118endOfFinally.FallThrough.Kind = ControlFlowBranchSemantics.StructuredExceptionHandling; 4400endOfFinally.FallThrough.Kind = ControlFlowBranchSemantics.StructuredExceptionHandling; 5708Debug.Assert(current.FallThrough.Kind == ControlFlowBranchSemantics.None); 5709current.FallThrough.Kind = ControlFlowBranchSemantics.ProgramTermination;
Microsoft.CodeAnalysis.CodeStyle (11)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (11)
179continueDispatchAfterFinally[current.EnclosingRegion] = branch.Semantics != ControlFlowBranchSemantics.Throw && 180branch.Semantics != ControlFlowBranchSemantics.Rethrow && 181current.FallThroughSuccessor.Semantics == ControlFlowBranchSemantics.StructuredExceptionHandling; 212case ControlFlowBranchSemantics.None: 213case ControlFlowBranchSemantics.ProgramTermination: 214case ControlFlowBranchSemantics.StructuredExceptionHandling: 215case ControlFlowBranchSemantics.Error: 219case ControlFlowBranchSemantics.Throw: 220case ControlFlowBranchSemantics.Rethrow: 225case ControlFlowBranchSemantics.Regular: 226case ControlFlowBranchSemantics.Return:
Microsoft.CodeAnalysis.Test.Utilities (31)
Compilation\ControlFlowGraphVerifier.cs (20)
254Assert.NotEqual(ControlFlowBranchSemantics.Return, conditionalBranch.Semantics); 255Assert.NotEqual(ControlFlowBranchSemantics.Throw, conditionalBranch.Semantics); 256Assert.NotEqual(ControlFlowBranchSemantics.StructuredExceptionHandling, conditionalBranch.Semantics); 293if (nextBranch.Semantics == ControlFlowBranchSemantics.StructuredExceptionHandling) 305Assert.True(ControlFlowBranchSemantics.Return == nextBranch.Semantics || ControlFlowBranchSemantics.Throw == nextBranch.Semantics); 311Assert.NotEqual(ControlFlowBranchSemantics.Return, nextBranch.Semantics); 312Assert.NotEqual(ControlFlowBranchSemantics.Throw, nextBranch.Semantics); 727else if (branch.Semantics == ControlFlowBranchSemantics.Throw || 728branch.Semantics == ControlFlowBranchSemantics.Rethrow || 729branch.Semantics == ControlFlowBranchSemantics.Error || 730branch.Semantics == ControlFlowBranchSemantics.StructuredExceptionHandling) 1576Assert.True(ControlFlowBranchSemantics.None == branch.Semantics || ControlFlowBranchSemantics.Throw == branch.Semantics || 1577ControlFlowBranchSemantics.Rethrow == branch.Semantics || ControlFlowBranchSemantics.StructuredExceptionHandling == branch.Semantics || 1578ControlFlowBranchSemantics.ProgramTermination == branch.Semantics || ControlFlowBranchSemantics.Error == branch.Semantics); 1582Assert.True(ControlFlowBranchSemantics.Regular == branch.Semantics || ControlFlowBranchSemantics.Return == branch.Semantics);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (11)
179continueDispatchAfterFinally[current.EnclosingRegion] = branch.Semantics != ControlFlowBranchSemantics.Throw && 180branch.Semantics != ControlFlowBranchSemantics.Rethrow && 181current.FallThroughSuccessor.Semantics == ControlFlowBranchSemantics.StructuredExceptionHandling; 212case ControlFlowBranchSemantics.None: 213case ControlFlowBranchSemantics.ProgramTermination: 214case ControlFlowBranchSemantics.StructuredExceptionHandling: 215case ControlFlowBranchSemantics.Error: 219case ControlFlowBranchSemantics.Throw: 220case ControlFlowBranchSemantics.Rethrow: 225case ControlFlowBranchSemantics.Regular: 226case ControlFlowBranchSemantics.Return:
Microsoft.CodeAnalysis.Workspaces (11)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (11)
179continueDispatchAfterFinally[current.EnclosingRegion] = branch.Semantics != ControlFlowBranchSemantics.Throw && 180branch.Semantics != ControlFlowBranchSemantics.Rethrow && 181current.FallThroughSuccessor.Semantics == ControlFlowBranchSemantics.StructuredExceptionHandling; 212case ControlFlowBranchSemantics.None: 213case ControlFlowBranchSemantics.ProgramTermination: 214case ControlFlowBranchSemantics.StructuredExceptionHandling: 215case ControlFlowBranchSemantics.Error: 219case ControlFlowBranchSemantics.Throw: 220case ControlFlowBranchSemantics.Rethrow: 225case ControlFlowBranchSemantics.Regular: 226case ControlFlowBranchSemantics.Return: