2022-04-16 16:03:14 +03:00
|
|
|
- // MIR for `main` before Derefer
|
|
|
|
+ // MIR for `main` after Derefer
|
|
|
|
|
|
|
|
fn main() -> () {
|
2022-07-12 16:02:17 +03:00
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/derefer_terminator_test.rs:4:11: 4:11
|
|
|
|
let _1: bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:9: 5:10
|
|
|
|
let _3: (); // in scope 0 at $DIR/derefer_terminator_test.rs:7:5: 10:6
|
|
|
|
let mut _4: &&&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
|
|
|
let _5: &&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:17: 7:21
|
|
|
|
let _6: &&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:18: 7:21
|
|
|
|
let _7: &bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:19: 7:21
|
|
|
|
+ let mut _10: &&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
|
|
|
+ let mut _11: &&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
|
|
|
+ let mut _12: &bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
2022-04-16 16:03:14 +03:00
|
|
|
scope 1 {
|
2022-07-12 16:02:17 +03:00
|
|
|
debug b => _1; // in scope 1 at $DIR/derefer_terminator_test.rs:5:9: 5:10
|
|
|
|
let _2: bool; // in scope 1 at $DIR/derefer_terminator_test.rs:6:9: 6:10
|
2022-04-16 16:03:14 +03:00
|
|
|
scope 2 {
|
2022-07-12 16:02:17 +03:00
|
|
|
debug d => _2; // in scope 2 at $DIR/derefer_terminator_test.rs:6:9: 6:10
|
|
|
|
let _8: i32; // in scope 2 at $DIR/derefer_terminator_test.rs:8:22: 8:23
|
|
|
|
let _9: i32; // in scope 2 at $DIR/derefer_terminator_test.rs:11:9: 11:10
|
2022-04-16 16:03:14 +03:00
|
|
|
scope 3 {
|
2022-07-12 16:02:17 +03:00
|
|
|
debug x => _8; // in scope 3 at $DIR/derefer_terminator_test.rs:8:22: 8:23
|
2022-04-16 16:03:14 +03:00
|
|
|
}
|
|
|
|
scope 4 {
|
2022-07-12 16:02:17 +03:00
|
|
|
debug y => _9; // in scope 4 at $DIR/derefer_terminator_test.rs:11:9: 11:10
|
2022-04-16 16:03:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2022-07-12 16:02:17 +03:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/derefer_terminator_test.rs:5:9: 5:10
|
|
|
|
_1 = foo() -> bb1; // scope 0 at $DIR/derefer_terminator_test.rs:5:13: 5:18
|
2022-04-16 16:03:14 +03:00
|
|
|
// mir::Constant
|
2022-07-12 16:02:17 +03:00
|
|
|
// + span: $DIR/derefer_terminator_test.rs:5:13: 5:16
|
2022-07-06 10:14:46 -04:00
|
|
|
// + literal: Const { ty: fn() -> bool {foo}, val: Value(<ZST>) }
|
2022-04-16 16:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-07-12 16:02:17 +03:00
|
|
|
StorageLive(_2); // scope 1 at $DIR/derefer_terminator_test.rs:6:9: 6:10
|
|
|
|
_2 = foo() -> bb2; // scope 1 at $DIR/derefer_terminator_test.rs:6:13: 6:18
|
2022-04-16 16:03:14 +03:00
|
|
|
// mir::Constant
|
2022-07-12 16:02:17 +03:00
|
|
|
// + span: $DIR/derefer_terminator_test.rs:6:13: 6:16
|
2022-07-06 10:14:46 -04:00
|
|
|
// + literal: Const { ty: fn() -> bool {foo}, val: Value(<ZST>) }
|
2022-04-16 16:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2022-07-12 16:02:17 +03:00
|
|
|
StorageLive(_3); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 10:6
|
|
|
|
StorageLive(_4); // scope 2 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
|
|
|
StorageLive(_5); // scope 2 at $DIR/derefer_terminator_test.rs:7:17: 7:21
|
|
|
|
StorageLive(_6); // scope 2 at $DIR/derefer_terminator_test.rs:7:18: 7:21
|
|
|
|
StorageLive(_7); // scope 2 at $DIR/derefer_terminator_test.rs:7:19: 7:21
|
|
|
|
_7 = &_1; // scope 2 at $DIR/derefer_terminator_test.rs:7:19: 7:21
|
|
|
|
_6 = &_7; // scope 2 at $DIR/derefer_terminator_test.rs:7:18: 7:21
|
|
|
|
_5 = &_6; // scope 2 at $DIR/derefer_terminator_test.rs:7:17: 7:21
|
|
|
|
_4 = &_5; // scope 2 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
|
|
|
- switchInt((*(*(*(*_4))))) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ StorageLive(_10); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ _10 = deref_copy (*_4); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ StorageLive(_11); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ _11 = deref_copy (*_10); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ StorageDead(_10); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ StorageLive(_12); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ _12 = deref_copy (*_11); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ StorageDead(_11); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
+ switchInt((*_12)) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
2022-04-16 16:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2022-07-12 16:02:17 +03:00
|
|
|
+ StorageDead(_12); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
_3 = const (); // scope 2 at $DIR/derefer_terminator_test.rs:9:18: 9:20
|
|
|
|
goto -> bb5; // scope 2 at $DIR/derefer_terminator_test.rs:9:18: 9:20
|
2022-04-16 16:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2022-07-12 16:02:17 +03:00
|
|
|
+ StorageDead(_12); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
|
|
|
StorageLive(_8); // scope 2 at $DIR/derefer_terminator_test.rs:8:22: 8:23
|
|
|
|
_8 = const 5_i32; // scope 2 at $DIR/derefer_terminator_test.rs:8:26: 8:27
|
|
|
|
_3 = const (); // scope 2 at $DIR/derefer_terminator_test.rs:8:17: 8:29
|
|
|
|
StorageDead(_8); // scope 2 at $DIR/derefer_terminator_test.rs:8:28: 8:29
|
|
|
|
goto -> bb5; // scope 2 at $DIR/derefer_terminator_test.rs:8:28: 8:29
|
2022-04-16 16:03:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2022-07-12 16:02:17 +03:00
|
|
|
StorageDead(_7); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
|
|
|
StorageDead(_6); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
|
|
|
StorageDead(_5); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
|
|
|
StorageDead(_4); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
|
|
|
StorageDead(_3); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
|
|
|
StorageLive(_9); // scope 2 at $DIR/derefer_terminator_test.rs:11:9: 11:10
|
|
|
|
_9 = const 42_i32; // scope 2 at $DIR/derefer_terminator_test.rs:11:13: 11:15
|
|
|
|
_0 = const (); // scope 0 at $DIR/derefer_terminator_test.rs:4:11: 12:2
|
|
|
|
StorageDead(_9); // scope 2 at $DIR/derefer_terminator_test.rs:12:1: 12:2
|
|
|
|
StorageDead(_2); // scope 1 at $DIR/derefer_terminator_test.rs:12:1: 12:2
|
|
|
|
StorageDead(_1); // scope 0 at $DIR/derefer_terminator_test.rs:12:1: 12:2
|
|
|
|
return; // scope 0 at $DIR/derefer_terminator_test.rs:12:2: 12:2
|
2022-06-13 16:37:41 +03:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bb6 (cleanup): {
|
2022-07-12 16:02:17 +03:00
|
|
|
+ resume; // scope 0 at $DIR/derefer_terminator_test.rs:4:1: 12:2
|
2022-04-16 16:03:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|