]>
Commit | Line | Data |
---|---|---|
1 | // MIR for `while_loop` after PreCodegen | |
2 | ||
3 | fn while_loop(_1: bool) -> () { | |
4 | debug c => _1; // in scope 0 at $DIR/while_storage.rs:+0:15: +0:16 | |
5 | let mut _0: (); // return place in scope 0 at $DIR/while_storage.rs:+0:24: +0:24 | |
6 | let mut _2: bool; // in scope 0 at $DIR/while_storage.rs:+1:11: +1:22 | |
7 | let mut _3: bool; // in scope 0 at $DIR/while_storage.rs:+2:12: +2:23 | |
8 | ||
9 | bb0: { | |
10 | goto -> bb1; // scope 0 at $DIR/while_storage.rs:+1:5: +5:6 | |
11 | } | |
12 | ||
13 | bb1: { | |
14 | StorageLive(_2); // scope 0 at $DIR/while_storage.rs:+1:11: +1:22 | |
15 | _2 = get_bool(_1) -> bb2; // scope 0 at $DIR/while_storage.rs:+1:11: +1:22 | |
16 | // mir::Constant | |
17 | // + span: $DIR/while_storage.rs:11:11: 11:19 | |
18 | // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) } | |
19 | } | |
20 | ||
21 | bb2: { | |
22 | switchInt(move _2) -> [0: bb7, otherwise: bb3]; // scope 0 at $DIR/while_storage.rs:+1:11: +1:22 | |
23 | } | |
24 | ||
25 | bb3: { | |
26 | StorageLive(_3); // scope 0 at $DIR/while_storage.rs:+2:12: +2:23 | |
27 | _3 = get_bool(_1) -> bb4; // scope 0 at $DIR/while_storage.rs:+2:12: +2:23 | |
28 | // mir::Constant | |
29 | // + span: $DIR/while_storage.rs:12:12: 12:20 | |
30 | // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) } | |
31 | } | |
32 | ||
33 | bb4: { | |
34 | switchInt(move _3) -> [0: bb6, otherwise: bb5]; // scope 0 at $DIR/while_storage.rs:+2:12: +2:23 | |
35 | } | |
36 | ||
37 | bb5: { | |
38 | StorageDead(_3); // scope 0 at $DIR/while_storage.rs:+4:9: +4:10 | |
39 | goto -> bb7; // scope 0 at no-location | |
40 | } | |
41 | ||
42 | bb6: { | |
43 | StorageDead(_3); // scope 0 at $DIR/while_storage.rs:+4:9: +4:10 | |
44 | StorageDead(_2); // scope 0 at $DIR/while_storage.rs:+5:5: +5:6 | |
45 | goto -> bb1; // scope 0 at $DIR/while_storage.rs:+1:5: +5:6 | |
46 | } | |
47 | ||
48 | bb7: { | |
49 | StorageDead(_2); // scope 0 at $DIR/while_storage.rs:+5:5: +5:6 | |
50 | return; // scope 0 at $DIR/while_storage.rs:+6:2: +6:2 | |
51 | } | |
52 | } |