-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2_studyme_init.mir
236 lines (224 loc) · 21.2 KB
/
2_studyme_init.mir
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
// WARNING: This output format is intended for human consumers only
// and is subject to change without notice. Knock yourself out.
fn main() -> () {
let mut _0: (); // return place in scope 0 at init.rs:40:11: 40:11
let _1: &str; // "the_file" in scope 0 at init.rs:42:9: 42:17
let mut _3: std::result::Result<serde_json::Value, serde_json::Error>; // in scope 0 at init.rs:49:35: 49:65
let mut _4: &str; // in scope 0 at init.rs:49:56: 49:64
let mut _5: &str; // in scope 0 at init.rs:49:73: 49:102
let mut _6: &str; // in scope 0 at init.rs:49:73: 49:102
let _7: (); // in scope 0 at <::std::macros::println macros>:2:4: 2:71
let mut _8: std::fmt::Arguments; // in scope 0 at <::std::macros::println macros>:2:29: 2:70
let mut _9: &[&str]; // in scope 0 at init.rs:51:14: 51:18
let mut _10: &[&str; 2]; // in scope 0 at init.rs:51:14: 51:18
let mut _11: &[&str; 2]; // in scope 0 at init.rs:51:14: 51:18
let mut _12: &[std::fmt::ArgumentV1]; // in scope 0 at <::std::macros::println macros>:2:29: 2:70
let mut _13: &[std::fmt::ArgumentV1; 1]; // in scope 0 at <::std::macros::println macros>:2:29: 2:70
let mut _14: &[std::fmt::ArgumentV1; 1]; // in scope 0 at <::std::macros::println macros>:2:29: 2:70
let _15: [std::fmt::ArgumentV1; 1]; // in scope 0 at <::std::macros::println macros>:2:29: 2:70
let mut _16: (&serde_json::Value,); // in scope 0 at <::std::macros::println macros>:2:29: 2:70
let mut _17: &serde_json::Value; // in scope 0 at init.rs:51:20: 51:32
let mut _18: &serde_json::Value; // in scope 0 at init.rs:51:20: 51:32
let mut _19: &serde_json::Value; // in scope 0 at init.rs:51:20: 51:24
let mut _21: std::fmt::ArgumentV1; // in scope 0 at <::std::macros::println macros>:2:29: 2:70
let mut _22: &serde_json::Value; // in scope 0 at init.rs:51:20: 51:32
let mut _23: for<'r, 's, 't0> fn(&'r serde_json::Value, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 0 at init.rs:51:20: 51:32
scope 1 {
let _2: serde_json::Value as UserTypeProjection { base: UserType(0), projs: [] }; // "json" in scope 1 at init.rs:49:9: 49:13
scope 2 {
let _20: &serde_json::Value; // "arg0" in scope 2 at init.rs:51:20: 51:32
scope 3 {
}
}
}
bb0: {
StorageLive(_1); // bb0[0]: scope 0 at init.rs:42:9: 42:17
_1 = const "{\n\n \t\"language\":\"RUST\",\n \t\"init\":\"fn main() {println!(\\\"HI\\\")}\"\n\n }"; // bb0[1]: scope 0 at init.rs:42:20: 47:8
// ty::Const
// + ty: &str
// + val: Slice { data: Allocation { bytes: [123, 10, 10, 32, 32, 32, 32, 9, 34, 108, 97, 110, 103, 117, 97, 103, 101, 34, 58, 34, 82, 85, 83, 84, 34, 44, 10, 32, 32, 32, 32, 9, 34, 105, 110, 105, 116, 34, 58, 34, 102, 110, 32, 109, 97, 105, 110, 40, 41, 32, 123, 112, 114, 105, 110, 116, 108, 110, 33, 40, 92, 34, 72, 73, 92, 34, 41, 125, 34, 10, 10, 32, 32, 32, 32, 125], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [18446744073709551615, 4095], len: Size { raw: 76 } }, size: Size { raw: 76 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 76 }
// mir::Constant
// + span: init.rs:42:20: 47:8
// + literal: Const { ty: &str, val: Slice { data: Allocation { bytes: [123, 10, 10, 32, 32, 32, 32, 9, 34, 108, 97, 110, 103, 117, 97, 103, 101, 34, 58, 34, 82, 85, 83, 84, 34, 44, 10, 32, 32, 32, 32, 9, 34, 105, 110, 105, 116, 34, 58, 34, 102, 110, 32, 109, 97, 105, 110, 40, 41, 32, 123, 112, 114, 105, 110, 116, 108, 110, 33, 40, 92, 34, 72, 73, 92, 34, 41, 125, 34, 10, 10, 32, 32, 32, 32, 125], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [18446744073709551615, 4095], len: Size { raw: 76 } }, size: Size { raw: 76 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 76 } }
StorageLive(_2); // bb0[2]: scope 1 at init.rs:49:9: 49:13
StorageLive(_3); // bb0[3]: scope 1 at init.rs:49:35: 49:65
StorageLive(_4); // bb0[4]: scope 1 at init.rs:49:56: 49:64
_4 = _1; // bb0[5]: scope 1 at init.rs:49:56: 49:64
_3 = const serde_json::from_str::<serde_json::Value>(move _4) -> bb2; // bb0[6]: scope 1 at init.rs:49:35: 49:65
// ty::Const
// + ty: fn(&str) -> std::result::Result<serde_json::Value, serde_json::Error> {serde_json::from_str::<serde_json::Value>}
// + val: Scalar(<ZST>)
// mir::Constant
// + span: init.rs:49:35: 49:55
// + literal: Const { ty: fn(&str) -> std::result::Result<serde_json::Value, serde_json::Error> {serde_json::from_str::<serde_json::Value>}, val: Scalar(<ZST>) }
}
bb1 (cleanup): {
resume; // bb1[0]: scope 0 at init.rs:40:1: 72:2
}
bb2: {
StorageDead(_4); // bb2[0]: scope 1 at init.rs:49:64: 49:65
StorageLive(_5); // bb2[1]: scope 1 at init.rs:49:73: 49:102
StorageLive(_6); // bb2[2]: scope 1 at init.rs:49:73: 49:102
_6 = const "JSON was not well-formatted"; // bb2[3]: scope 1 at init.rs:49:73: 49:102
// ty::Const
// + ty: &str
// + val: Slice { data: Allocation { bytes: [74, 83, 79, 78, 32, 119, 97, 115, 32, 110, 111, 116, 32, 119, 101, 108, 108, 45, 102, 111, 114, 109, 97, 116, 116, 101, 100], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [134217727], len: Size { raw: 27 } }, size: Size { raw: 27 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 27 }
// mir::Constant
// + span: init.rs:49:73: 49:102
// + literal: Const { ty: &str, val: Slice { data: Allocation { bytes: [74, 83, 79, 78, 32, 119, 97, 115, 32, 110, 111, 116, 32, 119, 101, 108, 108, 45, 102, 111, 114, 109, 97, 116, 116, 101, 100], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [134217727], len: Size { raw: 27 } }, size: Size { raw: 27 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 27 } }
_5 = _6; // bb2[4]: scope 1 at init.rs:49:73: 49:102
_2 = const std::result::Result::<serde_json::Value, serde_json::Error>::expect(move _3, move _5) -> bb3; // bb2[5]: scope 1 at init.rs:49:35: 49:103
// ty::Const
// + ty: for<'r> fn(std::result::Result<serde_json::Value, serde_json::Error>, &'r str) -> serde_json::Value {std::result::Result::<serde_json::Value, serde_json::Error>::expect}
// + val: Scalar(<ZST>)
// mir::Constant
// + span: init.rs:49:66: 49:72
// + literal: Const { ty: for<'r> fn(std::result::Result<serde_json::Value, serde_json::Error>, &'r str) -> serde_json::Value {std::result::Result::<serde_json::Value, serde_json::Error>::expect}, val: Scalar(<ZST>) }
}
bb3: {
StorageDead(_5); // bb3[0]: scope 1 at init.rs:49:102: 49:103
StorageDead(_3); // bb3[1]: scope 1 at init.rs:49:102: 49:103
StorageDead(_6); // bb3[2]: scope 1 at init.rs:49:103: 49:104
StorageLive(_7); // bb3[3]: scope 2 at <::std::macros::println macros>:2:4: 2:71
StorageLive(_8); // bb3[4]: scope 2 at <::std::macros::println macros>:2:29: 2:70
StorageLive(_9); // bb3[5]: scope 2 at init.rs:51:14: 51:18
StorageLive(_10); // bb3[6]: scope 2 at init.rs:51:14: 51:18
StorageLive(_11); // bb3[7]: scope 2 at init.rs:51:14: 51:18
_11 = &(promoted[0]: [&str; 2]); // bb3[8]: scope 2 at init.rs:51:14: 51:18
_10 = _11; // bb3[9]: scope 2 at init.rs:51:14: 51:18
_9 = move _10 as &[&str] (Pointer(Unsize)); // bb3[10]: scope 2 at init.rs:51:14: 51:18
StorageDead(_10); // bb3[11]: scope 2 at init.rs:51:17: 51:18
StorageLive(_12); // bb3[12]: scope 2 at <::std::macros::println macros>:2:29: 2:70
StorageLive(_13); // bb3[13]: scope 2 at <::std::macros::println macros>:2:29: 2:70
StorageLive(_14); // bb3[14]: scope 2 at <::std::macros::println macros>:2:29: 2:70
StorageLive(_15); // bb3[15]: scope 2 at <::std::macros::println macros>:2:29: 2:70
StorageLive(_16); // bb3[16]: scope 2 at <::std::macros::println macros>:2:29: 2:70
StorageLive(_17); // bb3[17]: scope 2 at init.rs:51:20: 51:32
StorageLive(_18); // bb3[18]: scope 2 at init.rs:51:20: 51:32
StorageLive(_19); // bb3[19]: scope 2 at init.rs:51:20: 51:24
_19 = &_2; // bb3[20]: scope 2 at init.rs:51:20: 51:24
_18 = const <serde_json::Value as std::ops::Index<&str>>::index(move _19, const "init") -> [return: bb4, unwind: bb5]; // bb3[21]: scope 2 at init.rs:51:20: 51:32
// ty::Const
// + ty: for<'r> fn(&'r serde_json::Value, &str) -> &'r <serde_json::Value as std::ops::Index<&str>>::Output {<serde_json::Value as std::ops::Index<&str>>::index}
// + val: Scalar(<ZST>)
// mir::Constant
// + span: init.rs:51:20: 51:32
// + literal: Const { ty: for<'r> fn(&'r serde_json::Value, &str) -> &'r <serde_json::Value as std::ops::Index<&str>>::Output {<serde_json::Value as std::ops::Index<&str>>::index}, val: Scalar(<ZST>) }
// ty::Const
// + ty: &str
// + val: Slice { data: Allocation { bytes: [105, 110, 105, 116], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [15], len: Size { raw: 4 } }, size: Size { raw: 4 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 4 }
// mir::Constant
// + span: init.rs:51:25: 51:31
// + literal: Const { ty: &str, val: Slice { data: Allocation { bytes: [105, 110, 105, 116], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [15], len: Size { raw: 4 } }, size: Size { raw: 4 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 4 } }
}
bb4: {
StorageDead(_19); // bb4[0]: scope 2 at init.rs:51:31: 51:32
_17 = _18; // bb4[1]: scope 2 at init.rs:51:20: 51:32
(_16.0: &serde_json::Value) = move _17; // bb4[2]: scope 2 at <::std::macros::println macros>:2:29: 2:70
StorageDead(_17); // bb4[3]: scope 2 at <::std::macros::println macros>:2:69: 2:70
StorageLive(_20); // bb4[4]: scope 2 at init.rs:51:20: 51:32
_20 = (_16.0: &serde_json::Value); // bb4[5]: scope 2 at init.rs:51:20: 51:32
StorageLive(_21); // bb4[6]: scope 3 at <::std::macros::println macros>:2:29: 2:70
StorageLive(_22); // bb4[7]: scope 3 at init.rs:51:20: 51:32
_22 = _20; // bb4[8]: scope 3 at init.rs:51:20: 51:32
StorageLive(_23); // bb4[9]: scope 3 at init.rs:51:20: 51:32
_23 = const <serde_json::Value as std::fmt::Display>::fmt as for<'r, 's, 't0> fn(&'r serde_json::Value, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // bb4[10]: scope 3 at init.rs:51:20: 51:32
// ty::Const
// + ty: for<'r, 's, 't0> fn(&'r serde_json::Value, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<serde_json::Value as std::fmt::Display>::fmt}
// + val: Scalar(<ZST>)
// mir::Constant
// + span: init.rs:51:20: 51:32
// + literal: Const { ty: for<'r, 's, 't0> fn(&'r serde_json::Value, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<serde_json::Value as std::fmt::Display>::fmt}, val: Scalar(<ZST>) }
_21 = const std::fmt::ArgumentV1::new::<serde_json::Value>(move _22, move _23) -> [return: bb6, unwind: bb5]; // bb4[11]: scope 3 at <::std::macros::println macros>:2:29: 2:70
// ty::Const
// + ty: for<'b> fn(&'b serde_json::Value, for<'r, 's, 't0> fn(&'r serde_json::Value, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> std::fmt::ArgumentV1<'b> {std::fmt::ArgumentV1::new::<serde_json::Value>}
// + val: Scalar(<ZST>)
// mir::Constant
// + span: <::std::macros::println macros>:2:29: 2:70
// + user_ty: UserType(3)
// + literal: Const { ty: for<'b> fn(&'b serde_json::Value, for<'r, 's, 't0> fn(&'r serde_json::Value, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> std::fmt::ArgumentV1<'b> {std::fmt::ArgumentV1::new::<serde_json::Value>}, val: Scalar(<ZST>) }
}
bb5 (cleanup): {
drop(_2) -> bb1; // bb5[0]: scope 1 at init.rs:72:1: 72:2
}
bb6: {
StorageDead(_23); // bb6[0]: scope 3 at <::std::macros::println macros>:2:69: 2:70
StorageDead(_22); // bb6[1]: scope 3 at <::std::macros::println macros>:2:69: 2:70
_15 = [move _21]; // bb6[2]: scope 3 at <::std::macros::println macros>:2:29: 2:70
StorageDead(_21); // bb6[3]: scope 3 at <::std::macros::println macros>:2:69: 2:70
StorageDead(_20); // bb6[4]: scope 2 at <::std::macros::println macros>:2:69: 2:70
_14 = &_15; // bb6[5]: scope 2 at <::std::macros::println macros>:2:29: 2:70
_13 = _14; // bb6[6]: scope 2 at <::std::macros::println macros>:2:29: 2:70
_12 = move _13 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // bb6[7]: scope 2 at <::std::macros::println macros>:2:29: 2:70
StorageDead(_13); // bb6[8]: scope 2 at <::std::macros::println macros>:2:69: 2:70
_8 = const std::fmt::Arguments::new_v1(move _9, move _12) -> [return: bb7, unwind: bb5]; // bb6[9]: scope 2 at <::std::macros::println macros>:2:29: 2:70
// ty::Const
// + ty: fn(&[&str], &[std::fmt::ArgumentV1]) -> std::fmt::Arguments {std::fmt::Arguments::new_v1}
// + val: Scalar(<ZST>)
// mir::Constant
// + span: <::std::macros::println macros>:2:29: 2:70
// + user_ty: UserType(2)
// + literal: Const { ty: fn(&[&str], &[std::fmt::ArgumentV1]) -> std::fmt::Arguments {std::fmt::Arguments::new_v1}, val: Scalar(<ZST>) }
}
bb7: {
StorageDead(_12); // bb7[0]: scope 2 at <::std::macros::println macros>:2:69: 2:70
StorageDead(_9); // bb7[1]: scope 2 at <::std::macros::println macros>:2:69: 2:70
_7 = const std::io::_print(move _8) -> [return: bb8, unwind: bb5]; // bb7[2]: scope 2 at <::std::macros::println macros>:2:4: 2:71
// ty::Const
// + ty: for<'r> fn(std::fmt::Arguments<'r>) {std::io::_print}
// + val: Scalar(<ZST>)
// mir::Constant
// + span: <::std::macros::println macros>:2:4: 2:27
// + literal: Const { ty: for<'r> fn(std::fmt::Arguments<'r>) {std::io::_print}, val: Scalar(<ZST>) }
}
bb8: {
StorageDead(_8); // bb8[0]: scope 2 at <::std::macros::println macros>:2:70: 2:71
StorageDead(_18); // bb8[1]: scope 2 at <::std::macros::println macros>:2:72: 2:73
StorageDead(_16); // bb8[2]: scope 2 at <::std::macros::println macros>:2:72: 2:73
StorageDead(_15); // bb8[3]: scope 2 at <::std::macros::println macros>:2:72: 2:73
StorageDead(_14); // bb8[4]: scope 2 at <::std::macros::println macros>:2:72: 2:73
StorageDead(_11); // bb8[5]: scope 2 at <::std::macros::println macros>:2:72: 2:73
StorageDead(_7); // bb8[6]: scope 2 at <::std::macros::println macros>:2:72: 2:73
drop(_2) -> bb9; // bb8[7]: scope 1 at init.rs:72:1: 72:2
}
bb9: {
StorageDead(_2); // bb9[0]: scope 1 at init.rs:72:1: 72:2
StorageDead(_1); // bb9[1]: scope 0 at init.rs:72:1: 72:2
return; // bb9[2]: scope 0 at init.rs:72:2: 72:2
}
}
promoted[0] in main: [&str; 2] = {
let mut _0: [&str; 2]; // return place in scope 0 at init.rs:51:14: 51:18
let mut _1: [&str; 2]; // in scope 0 at init.rs:51:14: 51:18
let mut _2: &str; // in scope 0 at init.rs:51:14: 51:18
let mut _3: &str; // in scope 0 at init.rs:51:14: 51:18
let mut _4: &str; // in scope 0 at init.rs:51:14: 51:18
let mut _5: &str; // in scope 0 at init.rs:51:14: 51:18
scope 1 {
scope 2 {
scope 3 {
}
}
}
bb0: {
_3 = const ""; // bb0[0]: scope 0 at init.rs:51:14: 51:18
// ty::Const
// + ty: &str
// + val: Slice { data: Allocation { bytes: [], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [], len: Size { raw: 0 } }, size: Size { raw: 0 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 0 }
// mir::Constant
// + span: init.rs:51:14: 51:18
// + literal: Const { ty: &str, val: Slice { data: Allocation { bytes: [], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [], len: Size { raw: 0 } }, size: Size { raw: 0 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 0 } }
_2 = _3; // bb0[1]: scope 0 at init.rs:51:14: 51:18
_5 = const "\n"; // bb0[2]: scope 0 at init.rs:51:14: 51:18
// ty::Const
// + ty: &str
// + val: Slice { data: Allocation { bytes: [10], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 1 }
// mir::Constant
// + span: init.rs:51:14: 51:18
// + literal: Const { ty: &str, val: Slice { data: Allocation { bytes: [10], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [1], len: Size { raw: 1 } }, size: Size { raw: 1 }, align: Align { pow2: 0 }, mutability: Immutable, extra: () }, start: 0, end: 1 } }
_4 = _5; // bb0[3]: scope 0 at init.rs:51:14: 51:18
_1 = [move _2, move _4]; // bb0[4]: scope 0 at init.rs:51:14: 51:18
_0 = move _1; // bb0[5]: scope 0 at init.rs:51:14: 51:18
return; // bb0[6]: scope 0 at init.rs:51:14: 51:18
}
}