* flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
(FlowBranching.CreateBranching): Update to changes.
(FlowBranchingBlock.AddSibling): Add sanity check.
* codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
Update to changes.
svn path=/trunk/mcs/; revision=99676
2008-04-02 Raja R Harinath <harinath@hurrynot.org>
+ * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
+ (FlowBranching.CreateBranching): Update to changes.
+ (FlowBranchingBlock.AddSibling): Add sanity check.
+ * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
+ Update to changes.
+
* iterators.cs (Iterator.MarkFinally): Remove.
* statement.cs (ExceptionStatement): Update to changes.
// </summary>
public FlowBranching StartFlowBranching (Block block)
{
- FlowBranching.BranchingType type;
-
- if ((CurrentBranching != null) &&
- (CurrentBranching.Type == FlowBranching.BranchingType.Switch))
- type = FlowBranching.BranchingType.SwitchSection;
- else
- type = FlowBranching.BranchingType.Block;
-
flags |= Flags.DoFlowAnalysis;
current_flow_branching = FlowBranching.CreateBranching (
- CurrentBranching, type, block, block.StartLocation);
+ CurrentBranching, FlowBranching.BranchingType.Block, block, block.StartLocation);
return current_flow_branching;
}
// Switch block.
Switch,
- // Switch section.
- SwitchSection,
-
// The toplevel block of a function
Toplevel
}
case BranchingType.Switch:
return new FlowBranchingBreakable (parent, type, SiblingType.SwitchSection, block, loc);
- case BranchingType.SwitchSection:
- return new FlowBranchingBlock (parent, type, SiblingType.Block, block, loc);
-
case BranchingType.Block:
return new FlowBranchingBlock (parent, type, SiblingType.Block, block, loc);
protected override void AddSibling (UsageVector sibling)
{
+ if (sibling.Type == SiblingType.Block && sibling_list != null)
+ throw new InternalErrorException ("Blocks don't have sibling flow paths");
sibling.Next = sibling_list;
sibling_list = sibling;
}