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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
|
- // MIR for `f_with_arg` before ElaborateDrops
+ // MIR for `f_with_arg` after ElaborateDrops
fn f_with_arg(_1: String, _2: String) -> () {
debug _arg1 => _1;
debug _arg2 => _2;
let mut _0: ();
let mut _3: !;
let _4: std::string::String;
let _8: ();
let mut _9: std::string::String;
let mut _10: std::string::String;
let mut _11: std::string::String;
+ let mut _12: bool;
scope 1 {
debug _a => _4;
let _5: i32;
scope 2 {
debug _b => _5;
let _6: std::string::String;
scope 3 {
debug _c => _6;
let _7: std::string::String;
scope 4 {
debug _d => _7;
}
}
}
}
bb0: {
+ _12 = const false;
StorageLive(_4);
_4 = String::new() -> [return: bb1, unwind: bb27];
}
bb1: {
StorageLive(_5);
_5 = const 12_i32;
StorageLive(_6);
_6 = String::new() -> [return: bb2, unwind: bb26];
}
bb2: {
+ _12 = const true;
StorageLive(_7);
_7 = String::new() -> [return: bb3, unwind: bb25];
}
bb3: {
StorageLive(_8);
StorageLive(_9);
+ _12 = const false;
_9 = move _6;
_8 = std::mem::drop::<String>(move _9) -> [return: bb4, unwind: bb23];
}
bb4: {
StorageDead(_9);
StorageDead(_8);
StorageLive(_10);
_10 = String::new() -> [return: bb5, unwind: bb24];
}
bb5: {
StorageLive(_11);
_11 = String::new() -> [return: bb6, unwind: bb22];
}
bb6: {
drop(_7) -> [return: bb7, unwind: bb20];
}
bb7: {
StorageDead(_7);
- drop(_6) -> [return: bb8, unwind: bb18];
+ goto -> bb8;
}
bb8: {
+ _12 = const false;
StorageDead(_6);
StorageDead(_5);
drop(_4) -> [return: bb9, unwind: bb16];
}
bb9: {
StorageDead(_4);
drop(_2) -> [return: bb10, unwind: bb14];
}
bb10: {
drop(_1) -> [return: bb11, unwind: bb12];
}
bb11: {
tailcall g_with_arg(Spanned { node: move _10, span: $DIR/tail_call_drops.rs:36:23: 36:36 (#0) }, Spanned { node: move _11, span: $DIR/tail_call_drops.rs:36:38: 36:51 (#0) });
}
bb12 (cleanup): {
drop(_10) -> [return: bb13, unwind terminate(cleanup)];
}
bb13 (cleanup): {
drop(_11) -> [return: bb29, unwind terminate(cleanup)];
}
bb14 (cleanup): {
drop(_10) -> [return: bb15, unwind terminate(cleanup)];
}
bb15 (cleanup): {
drop(_11) -> [return: bb28, unwind terminate(cleanup)];
}
bb16 (cleanup): {
drop(_10) -> [return: bb17, unwind terminate(cleanup)];
}
bb17 (cleanup): {
drop(_11) -> [return: bb27, unwind terminate(cleanup)];
}
bb18 (cleanup): {
- drop(_10) -> [return: bb19, unwind terminate(cleanup)];
+ goto -> bb19;
}
bb19 (cleanup): {
- drop(_11) -> [return: bb26, unwind terminate(cleanup)];
+ goto -> bb26;
}
bb20 (cleanup): {
drop(_10) -> [return: bb21, unwind terminate(cleanup)];
}
bb21 (cleanup): {
drop(_11) -> [return: bb25, unwind terminate(cleanup)];
}
bb22 (cleanup): {
drop(_10) -> [return: bb24, unwind terminate(cleanup)];
}
bb23 (cleanup): {
- drop(_9) -> [return: bb24, unwind terminate(cleanup)];
+ goto -> bb24;
}
bb24 (cleanup): {
drop(_7) -> [return: bb25, unwind terminate(cleanup)];
}
bb25 (cleanup): {
- drop(_6) -> [return: bb26, unwind terminate(cleanup)];
+ goto -> bb31;
}
bb26 (cleanup): {
drop(_4) -> [return: bb27, unwind terminate(cleanup)];
}
bb27 (cleanup): {
drop(_2) -> [return: bb28, unwind terminate(cleanup)];
}
bb28 (cleanup): {
drop(_1) -> [return: bb29, unwind terminate(cleanup)];
}
bb29 (cleanup): {
resume;
+ }
+
+ bb30 (cleanup): {
+ drop(_6) -> [return: bb26, unwind terminate(cleanup)];
+ }
+
+ bb31 (cleanup): {
+ switchInt(copy _12) -> [0: bb26, otherwise: bb30];
}
}
|