2020-04-02 16:09:01 -05:00
|
|
|
// MIR for `while_loop` after PreCodegen
|
|
|
|
|
|
|
|
fn while_loop(_1: bool) -> () {
|
2022-11-02 16:54:49 -05:00
|
|
|
debug c => _1; // in scope 0 at $DIR/while_storage.rs:+0:15: +0:16
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/while_storage.rs:+0:24: +0:24
|
|
|
|
let mut _2: bool; // in scope 0 at $DIR/while_storage.rs:+1:11: +1:22
|
2023-01-12 12:23:48 -06:00
|
|
|
let mut _3: bool; // in scope 0 at $DIR/while_storage.rs:+2:12: +2:23
|
2020-04-02 16:09:01 -05:00
|
|
|
|
|
|
|
bb0: {
|
2022-11-02 16:54:49 -05:00
|
|
|
goto -> bb1; // scope 0 at $DIR/while_storage.rs:+1:5: +5:6
|
2021-09-17 19:00:00 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-11-02 16:54:49 -05:00
|
|
|
StorageLive(_2); // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
|
2023-01-12 12:23:48 -06:00
|
|
|
_2 = get_bool(_1) -> bb2; // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
|
2020-04-02 16:09:01 -05:00
|
|
|
// mir::Constant
|
2023-04-05 03:44:20 -05:00
|
|
|
// + span: $DIR/while_storage.rs:11:11: 11:19
|
2022-07-06 09:14:46 -05:00
|
|
|
// + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) }
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb2: {
|
2022-12-03 18:03:27 -06:00
|
|
|
switchInt(move _2) -> [0: bb7, otherwise: bb3]; // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb3: {
|
2023-01-12 12:23:48 -06:00
|
|
|
StorageLive(_3); // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
|
|
|
|
_3 = get_bool(_1) -> bb4; // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
|
2020-04-09 05:58:36 -05:00
|
|
|
// mir::Constant
|
2023-04-05 03:44:20 -05:00
|
|
|
// + span: $DIR/while_storage.rs:12:12: 12:20
|
2022-07-06 09:14:46 -05:00
|
|
|
// + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) }
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb4: {
|
2023-01-12 12:23:48 -06:00
|
|
|
switchInt(move _3) -> [0: bb6, otherwise: bb5]; // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb5: {
|
2023-01-12 12:23:48 -06:00
|
|
|
StorageDead(_3); // scope 0 at $DIR/while_storage.rs:+4:9: +4:10
|
2022-12-04 13:20:55 -06:00
|
|
|
goto -> bb7; // scope 0 at no-location
|
2021-08-08 09:49:13 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb6: {
|
2023-01-12 12:23:48 -06:00
|
|
|
StorageDead(_3); // scope 0 at $DIR/while_storage.rs:+4:9: +4:10
|
2022-11-02 16:54:49 -05:00
|
|
|
StorageDead(_2); // scope 0 at $DIR/while_storage.rs:+5:5: +5:6
|
|
|
|
goto -> bb1; // scope 0 at $DIR/while_storage.rs:+1:5: +5:6
|
2020-04-09 05:58:36 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb7: {
|
2022-11-02 16:54:49 -05:00
|
|
|
StorageDead(_2); // scope 0 at $DIR/while_storage.rs:+5:5: +5:6
|
|
|
|
return; // scope 0 at $DIR/while_storage.rs:+6:2: +6:2
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
}
|