Auto merge of #1094 - Aaron1011:rustup-body, r=RalfJung
Rustup for `BodyCache` changes
This commit is contained in:
commit
95f80403bf
@ -1 +1 @@
|
||||
2da942f32802c8233a09744024dfbc34431adf65
|
||||
fdc0011561c6365c596dfd8fa1ef388162bc89c7
|
||||
|
@ -131,7 +131,7 @@ fn call_function(
|
||||
let this = self.eval_context_mut();
|
||||
|
||||
// Push frame.
|
||||
let mir = this.load_mir(f.def, None)?;
|
||||
let mir = this.load_mir(f.def, None)?.body();
|
||||
let span = this.stack().last()
|
||||
.and_then(Frame::current_source_info)
|
||||
.map(|si| si.span)
|
||||
|
@ -141,14 +141,14 @@ fn emulate_foreign_item(
|
||||
.expect("No panic runtime found!");
|
||||
let panic_runtime = tcx.crate_name(*panic_runtime);
|
||||
let start_panic_instance = this.resolve_path(&[&*panic_runtime.as_str(), "__rust_start_panic"])?;
|
||||
return Ok(Some(this.load_mir(start_panic_instance.def, None)?));
|
||||
return Ok(Some(this.load_mir(start_panic_instance.def, None)?.body()));
|
||||
}
|
||||
// Similarly, we forward calls to the `panic_impl` foreign item to its implementation.
|
||||
// The implementation is provided by the function with the `#[panic_handler]` attribute.
|
||||
"panic_impl" => {
|
||||
let panic_impl_id = this.tcx.lang_items().panic_impl().unwrap();
|
||||
let panic_impl_instance = ty::Instance::mono(*this.tcx, panic_impl_id);
|
||||
return Ok(Some(this.load_mir(panic_impl_instance.def, None)?));
|
||||
return Ok(Some(this.load_mir(panic_impl_instance.def, None)?.body()));
|
||||
}
|
||||
|
||||
"exit" | "ExitProcess" => {
|
||||
|
@ -49,7 +49,7 @@ fn find_fn(
|
||||
}
|
||||
|
||||
// Otherwise, load the MIR.
|
||||
Ok(Some(this.load_mir(instance.def, None)?))
|
||||
Ok(Some(this.load_mir(instance.def, None)?.body()))
|
||||
}
|
||||
|
||||
fn align_offset(
|
||||
|
Loading…
Reference in New Issue
Block a user