blob: 8b91a65bf3d7dbf6838d5e29694b1f94e3ad80ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
- // MIR for `main` before Derefer
+ // MIR for `main` after Derefer
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/derefer_terminator_test.rs:2:11: 2:11
let _1: bool; // in scope 0 at $DIR/derefer_terminator_test.rs:3:9: 3:10
let _3: (); // in scope 0 at $DIR/derefer_terminator_test.rs:5:5: 8:6
let mut _4: &&&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:15: 5:22
let _5: &&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:17: 5:21
let _6: &&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:18: 5:21
let _7: &bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:19: 5:21
+ let mut _10: &&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:15: 5:22
+ let mut _11: &&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:15: 5:22
+ let mut _12: &bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:15: 5:22
scope 1 {
debug b => _1; // in scope 1 at $DIR/derefer_terminator_test.rs:3:9: 3:10
let _2: bool; // in scope 1 at $DIR/derefer_terminator_test.rs:4:9: 4:10
scope 2 {
debug d => _2; // in scope 2 at $DIR/derefer_terminator_test.rs:4:9: 4:10
let _8: i32; // in scope 2 at $DIR/derefer_terminator_test.rs:6:22: 6:23
let _9: i32; // in scope 2 at $DIR/derefer_terminator_test.rs:9:9: 9:10
scope 3 {
debug x => _8; // in scope 3 at $DIR/derefer_terminator_test.rs:6:22: 6:23
}
scope 4 {
debug y => _9; // in scope 4 at $DIR/derefer_terminator_test.rs:9:9: 9:10
}
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/derefer_terminator_test.rs:3:9: 3:10
_1 = foo() -> bb1; // scope 0 at $DIR/derefer_terminator_test.rs:3:13: 3:18
// mir::Constant
// + span: $DIR/derefer_terminator_test.rs:3:13: 3:16
// + literal: Const { ty: fn() -> bool {foo}, val: Value(Scalar(<ZST>)) }
}
bb1: {
StorageLive(_2); // scope 1 at $DIR/derefer_terminator_test.rs:4:9: 4:10
_2 = foo() -> bb2; // scope 1 at $DIR/derefer_terminator_test.rs:4:13: 4:18
// mir::Constant
// + span: $DIR/derefer_terminator_test.rs:4:13: 4:16
// + literal: Const { ty: fn() -> bool {foo}, val: Value(Scalar(<ZST>)) }
}
bb2: {
StorageLive(_3); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 8:6
StorageLive(_4); // scope 2 at $DIR/derefer_terminator_test.rs:5:15: 5:22
StorageLive(_5); // scope 2 at $DIR/derefer_terminator_test.rs:5:17: 5:21
StorageLive(_6); // scope 2 at $DIR/derefer_terminator_test.rs:5:18: 5:21
StorageLive(_7); // scope 2 at $DIR/derefer_terminator_test.rs:5:19: 5:21
_7 = &_1; // scope 2 at $DIR/derefer_terminator_test.rs:5:19: 5:21
_6 = &_7; // scope 2 at $DIR/derefer_terminator_test.rs:5:18: 5:21
_5 = &_6; // scope 2 at $DIR/derefer_terminator_test.rs:5:17: 5:21
_4 = &_5; // scope 2 at $DIR/derefer_terminator_test.rs:5:15: 5:22
- switchInt((*(*(*(*_4))))) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ StorageLive(_10); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ _10 = move (*_4); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ StorageLive(_11); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ _11 = move (*_10); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ StorageDead(_10); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ StorageLive(_12); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ _12 = move (*_11); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ StorageDead(_11); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
+ switchInt((*_12)) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
}
bb3: {
+ StorageDead(_12); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
_3 = const (); // scope 2 at $DIR/derefer_terminator_test.rs:7:18: 7:20
goto -> bb5; // scope 2 at $DIR/derefer_terminator_test.rs:7:18: 7:20
}
bb4: {
+ StorageDead(_12); // scope 2 at $DIR/derefer_terminator_test.rs:5:5: 5:22
StorageLive(_8); // scope 2 at $DIR/derefer_terminator_test.rs:6:22: 6:23
_8 = const 5_i32; // scope 2 at $DIR/derefer_terminator_test.rs:6:26: 6:27
_3 = const (); // scope 2 at $DIR/derefer_terminator_test.rs:6:17: 6:29
StorageDead(_8); // scope 2 at $DIR/derefer_terminator_test.rs:6:28: 6:29
goto -> bb5; // scope 2 at $DIR/derefer_terminator_test.rs:6:28: 6:29
}
bb5: {
StorageDead(_7); // scope 2 at $DIR/derefer_terminator_test.rs:8:5: 8:6
StorageDead(_6); // scope 2 at $DIR/derefer_terminator_test.rs:8:5: 8:6
StorageDead(_5); // scope 2 at $DIR/derefer_terminator_test.rs:8:5: 8:6
StorageDead(_4); // scope 2 at $DIR/derefer_terminator_test.rs:8:5: 8:6
StorageDead(_3); // scope 2 at $DIR/derefer_terminator_test.rs:8:5: 8:6
StorageLive(_9); // scope 2 at $DIR/derefer_terminator_test.rs:9:9: 9:10
_9 = const 42_i32; // scope 2 at $DIR/derefer_terminator_test.rs:9:13: 9:15
_0 = const (); // scope 0 at $DIR/derefer_terminator_test.rs:2:11: 10:2
StorageDead(_9); // scope 2 at $DIR/derefer_terminator_test.rs:10:1: 10:2
StorageDead(_2); // scope 1 at $DIR/derefer_terminator_test.rs:10:1: 10:2
StorageDead(_1); // scope 0 at $DIR/derefer_terminator_test.rs:10:1: 10:2
return; // scope 0 at $DIR/derefer_terminator_test.rs:10:2: 10:2
}
bb6 (cleanup): {
resume; // scope 0 at $DIR/derefer_terminator_test.rs:2:1: 10:2
}
}
|