Fix #77601
* statement.cs (Goto.Resolve): Move responsibility for resolving
'goto' to FlowBranching.AddGotoOrigin.
(Goto.SetResolvedTarget): New. Callback to set the
LabeledStatement that's the target of the goto.
(Goto.DoEmit): Use Leave instead of Br when crossing an
unwind-protect boundary.
* flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
LookupLabel and adjust to new semantics.
(FlowBranchingToplevel.AddGotoOrigin): Likewise.
(FlowBranchingBlock.AddGotoOrigin): Likewise. Use
Goto.SetResolvedTarget to update target.
(FlowBranchingLabeled.AddGotoOrigin): Likewise.
(FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
AddBreakOrigin & co. Delay propagation until ...
(FlowBranchingException.Merge): ... this.
In gmcs:
Fix #77601
* statement.cs (Goto.Resolve): Move responsibility for resolving
'goto' to FlowBranching.AddGotoOrigin.
(Goto.SetResolvedTarget): New. Callback to set the
LabeledStatement that's the target of the goto.
(Goto.DoEmit): Use Leave instead of Br when crossing an
unwind-protect boundary.
* flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
LookupLabel and adjust to new semantics.
(FlowBranchingToplevel.AddGotoOrigin): Likewise.
(FlowBranchingBlock.AddGotoOrigin): Likewise. Use
Goto.SetResolvedTarget to update target.
(FlowBranchingLabeled.AddGotoOrigin): Likewise.
(FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
AddBreakOrigin & co. Delay propagation until ...
(FlowBranchingException.Merge): ... this.
In tests:
* test-518.cs: New test based on #77601.
svn path=/trunk/mcs/; revision=60827