Place::Local(x) is now Place::Base(PlaceBase::Local(x))

This commit is contained in:
Santiago Pastorino 2019-02-26 14:58:13 -03:00
parent 909045d848
commit 0bb6ae8f62
No known key found for this signature in database
GPG Key ID: 88C941CDA1D46432
3 changed files with 7 additions and 7 deletions

View File

@ -275,7 +275,7 @@ fn emulate_foreign_item(
.to_owned(),
),
)?;
let arg_dest = this.eval_place(&mir::Place::Local(arg_local))?;
let arg_dest = this.eval_place(&mir::Place::Base(mir::PlaceBase::Local(arg_local)))?;
this.write_scalar(data, arg_dest)?;
assert!(args.next().is_none(), "__rust_maybe_catch_panic argument has more arguments than expected");

View File

@ -121,11 +121,11 @@ pub fn create_ecx<'a, 'mir: 'a, 'tcx: 'mir>(
// First argument: pointer to `main()`.
let main_ptr = ecx.memory_mut().create_fn_alloc(main_instance).with_default_tag();
let dest = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?;
let dest = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?;
ecx.write_scalar(Scalar::Ptr(main_ptr), dest)?;
// Second argument (argc): `1`.
let dest = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?;
let dest = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?;
let argc = Scalar::from_uint(config.args.len() as u128, dest.layout.size);
ecx.write_scalar(argc, dest)?;
// Store argc for macOS's `_NSGetArgc`.
@ -137,7 +137,7 @@ pub fn create_ecx<'a, 'mir: 'a, 'tcx: 'mir>(
// FIXME: extract main source file path.
// Third argument (`argv`): created from `config.args`.
let dest = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?;
let dest = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?;
// For Windows, construct a command string with all the aguments.
let mut cmd = String::new();
for arg in config.args.iter() {
@ -437,12 +437,12 @@ fn box_alloc(
// First argument: `size`.
// (`0` is allowed here -- this is expected to be handled by the lang item).
let arg = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?;
let arg = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?;
let size = layout.size.bytes();
ecx.write_scalar(Scalar::from_uint(size, arg.layout.size), arg)?;
// Second argument: `align`.
let arg = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?;
let arg = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?;
let align = layout.align.abi.bytes();
ecx.write_scalar(Scalar::from_uint(align, arg.layout.size), arg)?;

View File

@ -151,7 +151,7 @@ fn run_tls_dtors(&mut self) -> EvalResult<'tcx> {
let arg_local = this.frame().mir.args_iter().next().ok_or_else(
|| EvalErrorKind::AbiViolation("TLS dtor does not take enough arguments.".to_owned()),
)?;
let dest = this.eval_place(&mir::Place::Local(arg_local))?;
let dest = this.eval_place(&mir::Place::Base(mir::PlaceBase::Local(arg_local)))?;
this.write_scalar(ptr, dest)?;
// step until out of stackframes