@@ -201,18 +201,17 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
201
201
} else if Some ( def_id) == self . tcx . lang_items ( ) . panic_fn ( ) {
202
202
assert ! ( args. len( ) == 1 ) ;
203
203
// &(&'static str, &'static str, u32, u32)
204
- let ptr = self . read_immediate ( args[ 0 ] ) ?;
205
- let place = self . ref_to_mplace ( ptr) ?;
204
+ let place = self . deref_operand ( args[ 0 ] ) ?;
206
205
let ( msg, file, line, col) = (
207
206
self . mplace_field ( place, 0 ) ?,
208
207
self . mplace_field ( place, 1 ) ?,
209
208
self . mplace_field ( place, 2 ) ?,
210
209
self . mplace_field ( place, 3 ) ?,
211
210
) ;
212
211
213
- let msg_place = self . ref_to_mplace ( self . read_immediate ( msg. into ( ) ) ? ) ?;
212
+ let msg_place = self . deref_operand ( msg. into ( ) ) ?;
214
213
let msg = Symbol :: intern ( self . read_str ( msg_place) ?) ;
215
- let file_place = self . ref_to_mplace ( self . read_immediate ( file. into ( ) ) ? ) ?;
214
+ let file_place = self . deref_operand ( file. into ( ) ) ?;
216
215
let file = Symbol :: intern ( self . read_str ( file_place) ?) ;
217
216
let line = self . read_scalar ( line. into ( ) ) ?. to_u32 ( ) ?;
218
217
let col = self . read_scalar ( col. into ( ) ) ?. to_u32 ( ) ?;
@@ -221,17 +220,16 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
221
220
assert ! ( args. len( ) == 2 ) ;
222
221
// &'static str, &(&'static str, u32, u32)
223
222
let msg = args[ 0 ] ;
224
- let ptr = self . read_immediate ( args[ 1 ] ) ?;
225
- let place = self . ref_to_mplace ( ptr) ?;
223
+ let place = self . deref_operand ( args[ 1 ] ) ?;
226
224
let ( file, line, col) = (
227
225
self . mplace_field ( place, 0 ) ?,
228
226
self . mplace_field ( place, 1 ) ?,
229
227
self . mplace_field ( place, 2 ) ?,
230
228
) ;
231
229
232
- let msg_place = self . ref_to_mplace ( self . read_immediate ( msg. into ( ) ) ? ) ?;
230
+ let msg_place = self . deref_operand ( msg. into ( ) ) ?;
233
231
let msg = Symbol :: intern ( self . read_str ( msg_place) ?) ;
234
- let file_place = self . ref_to_mplace ( self . read_immediate ( file. into ( ) ) ? ) ?;
232
+ let file_place = self . deref_operand ( file. into ( ) ) ?;
235
233
let file = Symbol :: intern ( self . read_str ( file_place) ?) ;
236
234
let line = self . read_scalar ( line. into ( ) ) ?. to_u32 ( ) ?;
237
235
let col = self . read_scalar ( col. into ( ) ) ?. to_u32 ( ) ?;
0 commit comments