@@ -7,7 +7,6 @@ use std::fmt;
77use std:: num:: NonZeroU64 ;
88use std:: time:: Instant ;
99
10- use log:: trace;
1110use rand:: rngs:: StdRng ;
1211use rand:: SeedableRng ;
1312
@@ -503,35 +502,6 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
503502 ecx. binary_ptr_op ( bin_op, left, right)
504503 }
505504
506- fn box_alloc (
507- ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
508- dest : & PlaceTy < ' tcx , Tag > ,
509- ) -> InterpResult < ' tcx > {
510- trace ! ( "box_alloc for {:?}" , dest. layout. ty) ;
511- let layout = ecx. layout_of ( dest. layout . ty . builtin_deref ( false ) . unwrap ( ) . ty ) ?;
512- // First argument: `size`.
513- // (`0` is allowed here -- this is expected to be handled by the lang item).
514- let size = Scalar :: from_machine_usize ( layout. size . bytes ( ) , ecx) ;
515-
516- // Second argument: `align`.
517- let align = Scalar :: from_machine_usize ( layout. align . abi . bytes ( ) , ecx) ;
518-
519- // Call the `exchange_malloc` lang item.
520- let malloc = ecx. tcx . lang_items ( ) . exchange_malloc_fn ( ) . unwrap ( ) ;
521- let malloc = ty:: Instance :: mono ( ecx. tcx . tcx , malloc) ;
522- ecx. call_function (
523- malloc,
524- Abi :: Rust ,
525- & [ size. into ( ) , align. into ( ) ] ,
526- Some ( dest) ,
527- // Don't do anything when we are done. The `statement()` function will increment
528- // the old stack frame's stmt counter to the next statement, which means that when
529- // `exchange_malloc` returns, we go on evaluating exactly where we want to be.
530- StackPopCleanup :: None { cleanup : true } ,
531- ) ?;
532- Ok ( ( ) )
533- }
534-
535505 fn thread_local_static_base_pointer (
536506 ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
537507 def_id : DefId ,
0 commit comments