only set frame location during push after preamble is done

This commit is contained in:
Ralf Jung 2020-08-11 12:38:20 +02:00
parent c94ed5ca91
commit 5154b66586

View File

@ -640,7 +640,7 @@ pub fn push_stack_frame(
// first push a stack frame so we have access to the local substs
let pre_frame = Frame {
body,
loc: Some(mir::Location::START),
loc: None, // `None` for errors generated before we start evaluating.
return_to_block,
return_place,
// empty local array, we fill it in below, after we are inside the stack frame and
@ -683,6 +683,7 @@ pub fn push_stack_frame(
}
// done
self.frame_mut().locals = locals;
self.frame_mut().loc = Some(mir::Location::START);
M::after_stack_push(self)?;
info!("ENTERING({}) {}", self.frame_idx(), self.frame().instance);