blob: 4845fc732aabf6d6078511096276bc4fc3e26994 (
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
|
- // MIR for `test` before ElaborateDrops
+ // MIR for `test` after ElaborateDrops
fn test() -> () {
let mut _0: ();
let _1: S;
let _3: ();
let mut _4: S;
let mut _5: S;
+ let mut _6: bool;
scope 1 {
debug u => _1;
let mut _2: S;
scope 2 {
debug v => _2;
}
}
bb0: {
+ _6 = const false;
StorageLive(_1);
+ _6 = const true;
_1 = S;
StorageLive(_2);
_2 = S;
StorageLive(_3);
StorageLive(_4);
_4 = move _2;
_3 = std::mem::drop::<S>(move _4) -> [return: bb1, unwind: bb7];
}
bb1: {
StorageDead(_4);
StorageDead(_3);
StorageLive(_5);
+ _6 = const false;
_5 = move _1;
- drop(_2) -> [return: bb2, unwind: bb3];
+ goto -> bb2;
}
bb2: {
_2 = move _5;
- drop(_5) -> [return: bb4, unwind: bb8];
+ goto -> bb4;
}
bb3 (cleanup): {
_2 = move _5;
- drop(_5) -> [return: bb8, unwind terminate];
+ goto -> bb8;
}
bb4: {
StorageDead(_5);
_0 = const ();
drop(_2) -> [return: bb5, unwind: bb9];
}
bb5: {
StorageDead(_2);
- drop(_1) -> [return: bb6, unwind continue];
+ goto -> bb6;
}
bb6: {
+ _6 = const false;
StorageDead(_1);
return;
}
bb7 (cleanup): {
- drop(_4) -> [return: bb8, unwind terminate];
+ goto -> bb8;
}
bb8 (cleanup): {
- drop(_2) -> [return: bb9, unwind terminate];
+ goto -> bb9;
}
bb9 (cleanup): {
- drop(_1) -> [return: bb10, unwind terminate];
+ goto -> bb12;
}
bb10 (cleanup): {
resume;
+ }
+
+ bb11 (cleanup): {
+ drop(_1) -> [return: bb10, unwind terminate];
+ }
+
+ bb12 (cleanup): {
+ switchInt(_6) -> [0: bb10, otherwise: bb11];
}
}
|