@@ -7,7 +7,6 @@ use std::fmt;
7
7
use std:: num:: NonZeroU64 ;
8
8
use std:: time:: Instant ;
9
9
10
- use log:: trace;
11
10
use rand:: rngs:: StdRng ;
12
11
use rand:: SeedableRng ;
13
12
@@ -503,35 +502,6 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
503
502
ecx. binary_ptr_op ( bin_op, left, right)
504
503
}
505
504
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
-
535
505
fn thread_local_static_base_pointer (
536
506
ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
537
507
def_id : DefId ,
0 commit comments