@@ -7,12 +7,11 @@ use syntax::source_map::DUMMY_SP;
77use rustc:: ty:: { self , TyCtxt } ;
88use rustc:: ty:: layout:: { LayoutOf , Size , Align } ;
99use rustc:: hir:: def_id:: DefId ;
10- use rustc:: mir;
1110
1211use crate :: {
1312 InterpResult , InterpError , InterpCx , StackPopCleanup , struct_error,
1413 Scalar , Tag , Pointer , FnVal ,
15- MemoryExtra , MiriMemoryKind , Evaluator , TlsEvalContextExt ,
14+ MemoryExtra , MiriMemoryKind , Evaluator , TlsEvalContextExt , HelpersEvalContextExt ,
1615} ;
1716
1817/// Configuration needed to spawn a Miri instance.
@@ -85,11 +84,11 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
8584
8685 // First argument: pointer to `main()`.
8786 let main_ptr = ecx. memory_mut ( ) . create_fn_alloc ( FnVal :: Instance ( main_instance) ) ;
88- let dest = ecx. eval_place ( & mir :: Place :: Base ( mir :: PlaceBase :: Local ( args. next ( ) . unwrap ( ) ) ) ) ?;
87+ let dest = ecx. local_place ( args. next ( ) . unwrap ( ) ) ?;
8988 ecx. write_scalar ( Scalar :: Ptr ( main_ptr) , dest) ?;
9089
9190 // Second argument (argc): `1`.
92- let dest = ecx. eval_place ( & mir :: Place :: Base ( mir :: PlaceBase :: Local ( args. next ( ) . unwrap ( ) ) ) ) ?;
91+ let dest = ecx. local_place ( args. next ( ) . unwrap ( ) ) ?;
9392 let argc = Scalar :: from_uint ( config. args . len ( ) as u128 , dest. layout . size ) ;
9493 ecx. write_scalar ( argc, dest) ?;
9594 // Store argc for macOS's `_NSGetArgc`.
@@ -100,7 +99,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
10099 }
101100
102101 // Third argument (`argv`): created from `config.args`.
103- let dest = ecx. eval_place ( & mir :: Place :: Base ( mir :: PlaceBase :: Local ( args. next ( ) . unwrap ( ) ) ) ) ?;
102+ let dest = ecx. local_place ( args. next ( ) . unwrap ( ) ) ?;
104103 // For Windows, construct a command string with all the aguments.
105104 let mut cmd = String :: new ( ) ;
106105 for arg in config. args . iter ( ) {
0 commit comments