2023-05-20 04:14:16 -05:00
|
|
|
// MIR for `test_complex` after built
|
|
|
|
|
|
|
|
fn test_complex() -> () {
|
|
|
|
let mut _0: ();
|
|
|
|
let _1: ();
|
|
|
|
let mut _2: E;
|
|
|
|
let mut _3: isize;
|
|
|
|
let mut _4: bool;
|
|
|
|
let mut _5: bool;
|
2023-06-20 03:29:39 -05:00
|
|
|
let mut _6: u8;
|
|
|
|
let mut _7: Droppy;
|
|
|
|
let mut _8: bool;
|
|
|
|
let mut _9: u8;
|
|
|
|
let mut _10: Droppy;
|
|
|
|
let mut _11: bool;
|
|
|
|
let mut _12: E;
|
|
|
|
let mut _13: isize;
|
2023-05-20 04:14:16 -05:00
|
|
|
|
|
|
|
bb0: {
|
|
|
|
StorageLive(_1);
|
|
|
|
StorageLive(_2);
|
2024-06-17 13:16:53 -05:00
|
|
|
_2 = E::f() -> [return: bb1, unwind: bb34];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-10-15 04:00:32 -05:00
|
|
|
PlaceMention(_2);
|
2023-05-20 04:14:16 -05:00
|
|
|
_3 = discriminant(_2);
|
2024-06-17 13:16:53 -05:00
|
|
|
switchInt(move _3) -> [0: bb3, otherwise: bb2];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb21;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2024-06-17 13:16:53 -05:00
|
|
|
falseEdge -> [real: bb5, imaginary: bb2];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2024-02-15 19:57:24 -06:00
|
|
|
goto -> bb2;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2024-06-17 13:16:53 -05:00
|
|
|
StorageLive(_4);
|
|
|
|
_4 = always_true() -> [return: bb6, unwind: bb34];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2024-06-17 13:16:53 -05:00
|
|
|
switchInt(move _4) -> [0: bb8, otherwise: bb7];
|
2024-02-11 21:56:03 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb7: {
|
2023-06-20 03:29:39 -05:00
|
|
|
StorageLive(_5);
|
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = Droppy(const 0_u8);
|
|
|
|
_6 = copy (_7.0: u8);
|
|
|
|
_5 = Gt(move _6, const 0_u8);
|
2024-06-17 13:16:53 -05:00
|
|
|
switchInt(move _5) -> [0: bb10, otherwise: bb9];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb8: {
|
|
|
|
goto -> bb14;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb9: {
|
|
|
|
drop(_7) -> [return: bb11, unwind: bb34];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb10: {
|
|
|
|
goto -> bb12;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb11: {
|
2024-02-11 21:56:03 -06:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb18;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb12: {
|
|
|
|
drop(_7) -> [return: bb13, unwind: bb34];
|
2024-02-11 21:56:03 -06:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb13: {
|
2023-06-20 03:29:39 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb14;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb14: {
|
2023-06-20 03:29:39 -05:00
|
|
|
StorageLive(_8);
|
|
|
|
StorageLive(_9);
|
|
|
|
StorageLive(_10);
|
|
|
|
_10 = Droppy(const 1_u8);
|
|
|
|
_9 = copy (_10.0: u8);
|
|
|
|
_8 = Gt(move _9, const 1_u8);
|
2024-06-17 13:16:53 -05:00
|
|
|
switchInt(move _8) -> [0: bb16, otherwise: bb15];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb15: {
|
|
|
|
drop(_10) -> [return: bb17, unwind: bb34];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb16: {
|
|
|
|
goto -> bb19;
|
2024-02-11 21:56:03 -06:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb17: {
|
2023-06-20 03:29:39 -05:00
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_9);
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb18;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb18: {
|
2024-02-28 01:21:24 -06:00
|
|
|
_1 = const ();
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb22;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb19: {
|
|
|
|
drop(_10) -> [return: bb20, unwind: bb34];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb20: {
|
2024-02-28 01:21:24 -06:00
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_9);
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb21;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb21: {
|
2024-02-28 01:21:24 -06:00
|
|
|
_1 = const ();
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb22;
|
2024-02-28 01:21:24 -06:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb22: {
|
2023-06-20 03:29:39 -05:00
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_5);
|
|
|
|
StorageDead(_4);
|
|
|
|
StorageDead(_2);
|
|
|
|
StorageDead(_1);
|
|
|
|
StorageLive(_11);
|
2024-06-17 13:16:53 -05:00
|
|
|
_11 = always_true() -> [return: bb23, unwind: bb34];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb23: {
|
|
|
|
switchInt(move _11) -> [0: bb25, otherwise: bb24];
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb24: {
|
|
|
|
goto -> bb32;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb25: {
|
|
|
|
goto -> bb26;
|
2023-05-20 04:14:16 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb26: {
|
2024-02-28 01:21:24 -06:00
|
|
|
StorageLive(_12);
|
2024-06-17 13:16:53 -05:00
|
|
|
_12 = E::f() -> [return: bb27, unwind: bb34];
|
2023-06-20 03:29:39 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb27: {
|
2024-02-28 01:21:24 -06:00
|
|
|
PlaceMention(_12);
|
|
|
|
_13 = discriminant(_12);
|
2024-06-17 13:16:53 -05:00
|
|
|
switchInt(move _13) -> [1: bb29, otherwise: bb28];
|
2023-06-20 03:29:39 -05:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb28: {
|
|
|
|
goto -> bb32;
|
2024-02-15 19:57:24 -06:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb29: {
|
|
|
|
falseEdge -> [real: bb31, imaginary: bb28];
|
2024-02-15 19:57:24 -06:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb30: {
|
|
|
|
goto -> bb28;
|
2024-02-11 21:56:03 -06:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb31: {
|
2024-02-11 21:56:03 -06:00
|
|
|
_0 = const ();
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb33;
|
2024-02-11 21:56:03 -06:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb32: {
|
2024-02-28 01:21:24 -06:00
|
|
|
_0 = const ();
|
2024-06-17 13:16:53 -05:00
|
|
|
goto -> bb33;
|
2024-02-28 01:21:24 -06:00
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb33: {
|
2023-06-20 03:29:39 -05:00
|
|
|
StorageDead(_11);
|
|
|
|
StorageDead(_12);
|
2023-05-20 04:14:16 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-06-17 13:16:53 -05:00
|
|
|
bb34 (cleanup): {
|
2023-05-20 04:14:16 -05:00
|
|
|
resume;
|
|
|
|
}
|
|
|
|
}
|