Skip to content

Commit 90d71cd

Browse files
committed
adjust for frame hook changes
1 parent 669191b commit 90d71cd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/machine.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,21 +490,25 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
490490
}
491491

492492
#[inline(always)]
493-
fn stack_push(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx, FrameData<'tcx>> {
493+
fn init_frame_extra(
494+
ecx: &mut InterpCx<'mir, 'tcx, Self>,
495+
frame: Frame<'mir, 'tcx, Tag>,
496+
) -> InterpResult<'tcx, Frame<'mir, 'tcx, Tag, FrameData<'tcx>>> {
494497
let stacked_borrows = ecx.memory.extra.stacked_borrows.as_ref();
495498
let call_id = stacked_borrows.map_or(NonZeroU64::new(1).unwrap(), |stacked_borrows| {
496499
stacked_borrows.borrow_mut().new_call()
497500
});
498-
Ok(FrameData { call_id, catch_unwind: None })
501+
let extra = FrameData { call_id, catch_unwind: None };
502+
Ok(frame.with_extra(extra))
499503
}
500504

501505
#[inline(always)]
502-
fn stack_pop(
506+
fn after_stack_pop(
503507
ecx: &mut InterpCx<'mir, 'tcx, Self>,
504-
extra: FrameData<'tcx>,
508+
frame: Frame<'mir, 'tcx, Tag, FrameData<'tcx>>,
505509
unwinding: bool,
506510
) -> InterpResult<'tcx, StackPopJump> {
507-
ecx.handle_stack_pop(extra, unwinding)
511+
ecx.handle_stack_pop(frame.extra, unwinding)
508512
}
509513

510514
#[inline(always)]

0 commit comments

Comments
 (0)