Skip to content

Commit e2eacd5

Browse files
committed
rollup merge of #21085: pnkfelix/pp-flowgraph-kill-labels
Add `--xpretty flowgraph,unlabelled` variant to the (unstable) flowgraph printing `rustc` option. This makes the tests much easier to maintain; the particular details of the labels attached to exiting scopes is not worth the effort required to keep it up to date as things change in the compiler internals.
2 parents 46a490f + f0d7871 commit e2eacd5

File tree

11 files changed

+50
-36
lines changed

11 files changed

+50
-36
lines changed

src/librustc/middle/cfg/graphviz.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ pub struct LabelledCFG<'a, 'ast: 'a> {
2828
pub ast_map: &'a ast_map::Map<'ast>,
2929
pub cfg: &'a cfg::CFG,
3030
pub name: String,
31+
/// `labelled_edges` controls whether we emit labels on the edges
32+
pub labelled_edges: bool,
3133
}
3234

3335
fn replace_newline_with_backslash_l(s: String) -> String {
@@ -75,6 +77,9 @@ impl<'a, 'ast> dot::Labeller<'a, Node<'a>, Edge<'a>> for LabelledCFG<'a, 'ast> {
7577

7678
fn edge_label(&self, e: &Edge<'a>) -> dot::LabelText<'a> {
7779
let mut label = String::new();
80+
if !self.labelled_edges {
81+
return dot::LabelText::EscStr(label.into_cow());
82+
}
7883
let mut put_one = false;
7984
for (i, &node_id) in e.data.exiting_scopes.iter().enumerate() {
8085
if put_one {

src/librustc_driver/pretty.rs

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,20 @@ pub enum PpSourceMode {
5353
PpmExpandedHygiene,
5454
}
5555

56+
57+
#[derive(Copy, PartialEq, Show)]
58+
pub enum PpFlowGraphMode {
59+
Default,
60+
/// Drops the labels from the edges in the flowgraph output. This
61+
/// is mostly for use in the --xpretty flowgraph run-make tests,
62+
/// since the labels are largely uninteresting in those cases and
63+
/// have become a pain to maintain.
64+
UnlabelledEdges,
65+
}
5666
#[derive(Copy, PartialEq, Show)]
5767
pub enum PpMode {
5868
PpmSource(PpSourceMode),
59-
PpmFlowGraph,
69+
PpmFlowGraph(PpFlowGraphMode),
6070
}
6171

6272
pub fn parse_pretty(sess: &Session,
@@ -73,12 +83,13 @@ pub fn parse_pretty(sess: &Session,
7383
("expanded,identified", _) => PpmSource(PpmExpandedIdentified),
7484
("expanded,hygiene", _) => PpmSource(PpmExpandedHygiene),
7585
("identified", _) => PpmSource(PpmIdentified),
76-
("flowgraph", true) => PpmFlowGraph,
86+
("flowgraph", true) => PpmFlowGraph(PpFlowGraphMode::Default),
87+
("flowgraph,unlabelled", true) => PpmFlowGraph(PpFlowGraphMode::UnlabelledEdges),
7788
_ => {
7889
if extended {
7990
sess.fatal(format!(
8091
"argument to `xpretty` must be one of `normal`, \
81-
`expanded`, `flowgraph=<nodeid>`, `typed`, `identified`, \
92+
`expanded`, `flowgraph[,unlabelled]=<nodeid>`, `typed`, `identified`, \
8293
`expanded,identified`, or `everybody_loops`; got {}", name).as_slice());
8394
} else {
8495
sess.fatal(format!(
@@ -417,7 +428,7 @@ fn needs_ast_map(ppm: &PpMode, opt_uii: &Option<UserIdentifiedItem>) -> bool {
417428
PpmSource(PpmExpandedIdentified) |
418429
PpmSource(PpmExpandedHygiene) |
419430
PpmSource(PpmTyped) |
420-
PpmFlowGraph => true
431+
PpmFlowGraph(_) => true
421432
}
422433
}
423434

@@ -431,7 +442,7 @@ fn needs_expansion(ppm: &PpMode) -> bool {
431442
PpmSource(PpmExpandedIdentified) |
432443
PpmSource(PpmExpandedHygiene) |
433444
PpmSource(PpmTyped) |
434-
PpmFlowGraph => true
445+
PpmFlowGraph(_) => true
435446
}
436447
}
437448

@@ -589,7 +600,7 @@ pub fn pretty_print_input(sess: Session,
589600
pp::eof(&mut pp_state.s)
590601
}),
591602

592-
(PpmFlowGraph, opt_uii) => {
603+
(PpmFlowGraph(mode), opt_uii) => {
593604
debug!("pretty printing flow graph for {:?}", opt_uii);
594605
let uii = opt_uii.unwrap_or_else(|| {
595606
sess.fatal(&format!("`pretty flowgraph=..` needs NodeId (int) or
@@ -613,7 +624,7 @@ pub fn pretty_print_input(sess: Session,
613624
&arenas,
614625
id,
615626
resolve::MakeGlobMap::No);
616-
print_flowgraph(variants, analysis, code, out)
627+
print_flowgraph(variants, analysis, code, mode, out)
617628
}
618629
None => {
619630
let message = format!("--pretty=flowgraph needs \
@@ -635,20 +646,23 @@ pub fn pretty_print_input(sess: Session,
635646
fn print_flowgraph<W:io::Writer>(variants: Vec<borrowck_dot::Variant>,
636647
analysis: ty::CrateAnalysis,
637648
code: blocks::Code,
649+
mode: PpFlowGraphMode,
638650
mut out: W) -> io::IoResult<()> {
639651
let ty_cx = &analysis.ty_cx;
640652
let cfg = match code {
641653
blocks::BlockCode(block) => cfg::CFG::new(ty_cx, &*block),
642654
blocks::FnLikeCode(fn_like) => cfg::CFG::new(ty_cx, &*fn_like.body()),
643655
};
656+
let labelled_edges = mode != PpFlowGraphMode::UnlabelledEdges;
657+
let lcfg = LabelledCFG {
658+
ast_map: &ty_cx.map,
659+
cfg: &cfg,
660+
name: format!("node_{}", code.id()),
661+
labelled_edges: labelled_edges,
662+
};
644663

645664
match code {
646665
_ if variants.len() == 0 => {
647-
let lcfg = LabelledCFG {
648-
ast_map: &ty_cx.map,
649-
cfg: &cfg,
650-
name: format!("node_{}", code.id()),
651-
};
652666
let r = dot::render(&lcfg, &mut out);
653667
return expand_err_details(r);
654668
}
@@ -662,11 +676,6 @@ fn print_flowgraph<W:io::Writer>(variants: Vec<borrowck_dot::Variant>,
662676
let (bccx, analysis_data) =
663677
borrowck::build_borrowck_dataflow_data_for_fn(ty_cx, fn_parts);
664678

665-
let lcfg = LabelledCFG {
666-
ast_map: &ty_cx.map,
667-
cfg: &cfg,
668-
name: format!("node_{}", code.id()),
669-
};
670679
let lcfg = borrowck_dot::DataflowLabeller {
671680
inner: lcfg,
672681
variants: variants,

src/test/run-make/graphviz-flowgraph/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $(TMPDIR)/%.pp: %.rs
2828

2929
$(TMPDIR)/%.dot: %.rs
3030
$(eval $(call FIND_LAST_BLOCK,$<))
31-
$(RUSTC_LIB) -Z unstable-options --xpretty flowgraph=$(LASTBLOCKNUM_$<) $< -o $@.tmp
31+
$(RUSTC_LIB) -Z unstable-options --xpretty flowgraph,unlabelled=$(LASTBLOCKNUM_$<) $< -o $@.tmp
3232
cat $@.tmp | sed -e 's@ (id=[0-9]*)@@g' \
3333
-e 's@\[label=""\]@@' \
3434
-e 's@digraph [a-zA-Z0-9_]* @digraph block @' \

src/test/run-make/graphviz-flowgraph/f12.dot-expected.dot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ digraph block {
3434
N11 -> N12;
3535
N12 -> N13;
3636
N13 -> N14;
37-
N14 -> N6[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 2is { break ; \"unreachable\"; },\lexiting scope_4 block { x -= 1is; if x == 2is { break ; \"unreachable\"; } }"];
37+
N14 -> N6;
3838
N15 -> N16;
3939
N16 -> N17;
4040
N17 -> N18;

src/test/run-make/graphviz-flowgraph/f15.dot-expected.dot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ digraph block {
6161
N12 -> N13;
6262
N13 -> N14;
6363
N14 -> N15;
64-
N15 -> N9[label="exiting scope_0 expr break \'outer,\lexiting scope_1 stmt break \'outer ;,\lexiting scope_2 block { break \'outer ; \"unreachable\"; },\lexiting scope_3 expr if x == 1is { break \'outer ; \"unreachable\"; },\lexiting scope_4 stmt if x == 1is { break \'outer ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l }\l y -= 4is;\l x -= 5is;\l}\l"];
64+
N15 -> N9;
6565
N16 -> N17;
6666
N17 -> N18;
6767
N18 -> N19;
@@ -73,7 +73,7 @@ digraph block {
7373
N23 -> N24;
7474
N24 -> N25;
7575
N25 -> N26;
76-
N26 -> N11[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if y >= 2is { break ; \"unreachable\"; },\lexiting scope_4 stmt if y >= 2is { break ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l}\l"];
76+
N26 -> N11;
7777
N27 -> N28;
7878
N28 -> N29;
7979
N29 -> N30;

src/test/run-make/graphviz-flowgraph/f16.dot-expected.dot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ digraph block {
6464
N12 -> N13;
6565
N13 -> N14;
6666
N14 -> N15;
67-
N15 -> N8[label="exiting scope_0 expr continue \'outer,\lexiting scope_1 stmt continue \'outer ;,\lexiting scope_2 block { continue \'outer ; \"unreachable\"; },\lexiting scope_3 expr if x == 1is { continue \'outer ; \"unreachable\"; },\lexiting scope_4 stmt if x == 1is { continue \'outer ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l y -= 1is;\l x -= 1is;\l}\l"];
67+
N15 -> N8;
6868
N16 -> N17;
6969
N17 -> N18;
7070
N18 -> N19;
@@ -76,7 +76,7 @@ digraph block {
7676
N23 -> N24;
7777
N24 -> N25;
7878
N25 -> N26;
79-
N26 -> N11[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if y >= 1is { break ; \"unreachable\"; },\lexiting scope_4 stmt if y >= 1is { break ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l}\l"];
79+
N26 -> N11;
8080
N27 -> N28;
8181
N28 -> N29;
8282
N29 -> N30;

src/test/run-make/graphviz-flowgraph/f21.dot-expected.dot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ digraph block {
5959
N12 -> N13;
6060
N13 -> N14;
6161
N14 -> N15;
62-
N15 -> N9[label="exiting scope_0 expr break \'outer,\lexiting scope_1 stmt break \'outer ;,\lexiting scope_2 block { break \'outer ; \"unreachable\"; },\lexiting scope_3 expr if x == 1is { break \'outer ; \"unreachable\"; },\lexiting scope_4 stmt if x == 1is { break \'outer ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l \"unreachable\";\l}\l"];
62+
N15 -> N9;
6363
N16 -> N17;
6464
N17 -> N18;
6565
N18 -> N19;
@@ -71,7 +71,7 @@ digraph block {
7171
N23 -> N24;
7272
N24 -> N25;
7373
N25 -> N26;
74-
N26 -> N1[label="exiting scope_0 expr \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l,\lexiting scope_1 expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l \"unreachable\";\l }\l"];
74+
N26 -> N1;
7575
N27 -> N28;
7676
N28 -> N29;
7777
N29 -> N30;

src/test/run-make/graphviz-flowgraph/f22.dot-expected.dot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ digraph block {
6262
N12 -> N13;
6363
N13 -> N14;
6464
N14 -> N15;
65-
N15 -> N8[label="exiting scope_0 expr continue \'outer,\lexiting scope_1 stmt continue \'outer ;,\lexiting scope_2 block { continue \'outer ; \"unreachable\"; },\lexiting scope_3 expr if x == 1is { continue \'outer ; \"unreachable\"; },\lexiting scope_4 stmt if x == 1is { continue \'outer ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l \"unreachable\";\l}\l"];
65+
N15 -> N8;
6666
N16 -> N17;
6767
N17 -> N18;
6868
N18 -> N19;
@@ -74,7 +74,7 @@ digraph block {
7474
N23 -> N24;
7575
N24 -> N25;
7676
N25 -> N26;
77-
N26 -> N1[label="exiting scope_0 expr \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l,\lexiting scope_1 expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l \"unreachable\";\l }\l"];
77+
N26 -> N1;
7878
N27 -> N28;
7979
N28 -> N29;
8080
N29 -> N30;

src/test/run-make/graphviz-flowgraph/f23.dot-expected.dot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ digraph block {
9595
N40 -> N41;
9696
N41 -> N42;
9797
N42 -> N43;
98-
N43 -> N1[label="exiting scope_0 expr while y > 0is {\l y -= 1is;\l while z > 0is { z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l}\l,\lexiting scope_1 expr while x > 0is {\l x -= 1is;\l while y > 0is {\l y -= 1is;\l while z > 0is { z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l}\l"];
98+
N43 -> N1;
9999
N44 -> N45;
100100
N45 -> N46;
101101
N46 -> N47;

src/test/run-make/graphviz-flowgraph/f24.dot-expected.dot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ digraph block {
9090
N13 -> N14;
9191
N14 -> N15;
9292
N15 -> N16;
93-
N16 -> N12[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 0is { break ; \"unreachable\"; },\lexiting scope_4 stmt if x == 0is { break ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l}\l"];
93+
N16 -> N12;
9494
N17 -> N18;
9595
N18 -> N19;
9696
N19 -> N20;
@@ -107,7 +107,7 @@ digraph block {
107107
N30 -> N31;
108108
N31 -> N32;
109109
N32 -> N33;
110-
N33 -> N29[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if y == 0is { break ; \"unreachable\"; },\lexiting scope_4 stmt if y == 0is { break ; \"unreachable\"; },\lexiting scope_5 block {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l}\l"];
110+
N33 -> N29;
111111
N34 -> N35;
112112
N35 -> N36;
113113
N36 -> N37;
@@ -124,7 +124,7 @@ digraph block {
124124
N47 -> N48;
125125
N48 -> N49;
126126
N49 -> N50;
127-
N50 -> N46[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if z == 0is { break ; \"unreachable\"; },\lexiting scope_4 stmt if z == 0is { break ; \"unreachable\"; },\lexiting scope_5 block { if z == 0is { break ; \"unreachable\"; } z -= 1is; }"];
127+
N50 -> N46;
128128
N51 -> N52;
129129
N52 -> N53;
130130
N53 -> N54;
@@ -143,7 +143,7 @@ digraph block {
143143
N64 -> N65;
144144
N65 -> N66;
145145
N66 -> N67;
146-
N67 -> N1[label="exiting scope_0 expr loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l}\l,\lexiting scope_1 expr loop {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l}\l"];
146+
N67 -> N1;
147147
N68 -> N69;
148148
N69 -> N70;
149149
N70 -> N71;

src/test/run-make/graphviz-flowgraph/f25.dot-expected.dot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ digraph block {
9090
N13 -> N14;
9191
N14 -> N15;
9292
N15 -> N16;
93-
N16 -> N12[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 0is { break ; \"unreachable\"; },\lexiting scope_4 stmt if x == 0is { break ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l \'a:\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { continue \'a ; \"unreachable\"; }\l }\l}\l"];
93+
N16 -> N12;
9494
N17 -> N18;
9595
N18 -> N19;
9696
N19 -> N20;
@@ -107,7 +107,7 @@ digraph block {
107107
N30 -> N31;
108108
N31 -> N32;
109109
N32 -> N33;
110-
N33 -> N29[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if y == 0is { break ; \"unreachable\"; },\lexiting scope_4 stmt if y == 0is { break ; \"unreachable\"; },\lexiting scope_5 block {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { continue \'a ; \"unreachable\"; }\l}\l"];
110+
N33 -> N29;
111111
N34 -> N35;
112112
N35 -> N36;
113113
N36 -> N37;
@@ -124,7 +124,7 @@ digraph block {
124124
N47 -> N48;
125125
N48 -> N49;
126126
N49 -> N50;
127-
N50 -> N46[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if z == 0is { break ; \"unreachable\"; },\lexiting scope_4 stmt if z == 0is { break ; \"unreachable\"; },\lexiting scope_5 block { if z == 0is { break ; \"unreachable\"; } z -= 1is; }"];
127+
N50 -> N46;
128128
N51 -> N52;
129129
N52 -> N53;
130130
N53 -> N54;
@@ -143,7 +143,7 @@ digraph block {
143143
N64 -> N65;
144144
N65 -> N66;
145145
N66 -> N67;
146-
N67 -> N28[label="exiting scope_0 expr continue \'a,\lexiting scope_1 stmt continue \'a ;,\lexiting scope_2 block { continue \'a ; \"unreachable\"; },\lexiting scope_3 expr if x > 10is { continue \'a ; \"unreachable\"; },\lexiting scope_4 block {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { continue \'a ; \"unreachable\"; }\l}\l"];
146+
N67 -> N28;
147147
N68 -> N69;
148148
N69 -> N70;
149149
N70 -> N71;

0 commit comments

Comments
 (0)