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