Skip to content

Commit

Permalink
Auto merge of #926 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
rustup
  • Loading branch information
bors committed Aug 27, 2019
2 parents f72ffb9 + 3a68d94 commit 0f56284
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
521d78407471cb78e9bbf47160f6aa23047ac499
0444b9f66acb5da23dc816e0d8eb59623ba9ea50
4 changes: 2 additions & 2 deletions src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(

// Setup first stack-frame
let main_instance = ty::Instance::mono(ecx.tcx.tcx, main_id);
let main_mir = ecx.load_mir(main_instance.def)?;
let main_mir = ecx.load_mir(main_instance.def, None)?;

if !main_mir.return_ty().is_unit() || main_mir.arg_count != 0 {
throw_unsup_format!(
Expand All @@ -62,7 +62,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
ecx.tcx.mk_substs(
::std::iter::once(ty::subst::Kind::from(main_ret_ty)))
).unwrap();
let start_mir = ecx.load_mir(start_instance.def)?;
let start_mir = ecx.load_mir(start_instance.def, None)?;

if start_mir.arg_count != 3 {
bug!(
Expand Down
2 changes: 1 addition & 1 deletion src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
// Call the `exchange_malloc` lang item.
let malloc = ecx.tcx.lang_items().exchange_malloc_fn().unwrap();
let malloc = ty::Instance::mono(ecx.tcx.tcx, malloc);
let malloc_mir = ecx.load_mir(malloc.def)?;
let malloc_mir = ecx.load_mir(malloc.def, None)?;
ecx.push_stack_frame(
malloc,
malloc_mir.span,
Expand Down
2 changes: 1 addition & 1 deletion src/shims/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
// Now we make a function call.
// TODO: consider making this reusable? `InterpCx::step` does something similar
// for the TLS destructors, and of course `eval_main`.
let mir = this.load_mir(f_instance.def)?;
let mir = this.load_mir(f_instance.def, None)?;
let ret_place = MPlaceTy::dangling(this.layout_of(this.tcx.mk_unit())?, this).into();
this.push_stack_frame(
f_instance,
Expand Down
2 changes: 1 addition & 1 deletion src/shims/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
}

// Otherwise, load the MIR.
Ok(Some(this.load_mir(instance.def)?))
Ok(Some(this.load_mir(instance.def, None)?))
}
}
2 changes: 1 addition & 1 deletion src/shims/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
assert!(!this.is_null(ptr).unwrap(), "Data can't be NULL when dtor is called!");
// TODO: Potentially, this has to support all the other possible instances?
// See eval_fn_call in interpret/terminator/mod.rs
let mir = this.load_mir(instance.def)?;
let mir = this.load_mir(instance.def, None)?;
let ret_place = MPlaceTy::dangling(this.layout_of(this.tcx.mk_unit())?, this).into();
this.push_stack_frame(
instance,
Expand Down

0 comments on commit 0f56284

Please sign in to comment.