Skip to content

Commit 9046749

Browse files
committed
adjust for frame hook changes
1 parent fbbd442 commit 9046749

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
@@ -477,21 +477,25 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
477477
}
478478

479479
#[inline(always)]
480-
fn stack_push(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx, FrameData<'tcx>> {
480+
fn init_frame_extra(
481+
ecx: &mut InterpCx<'mir, 'tcx, Self>,
482+
frame: Frame<'mir, 'tcx, Tag>,
483+
) -> InterpResult<'tcx, Frame<'mir, 'tcx, Tag, FrameData<'tcx>>> {
481484
let stacked_borrows = ecx.memory.extra.stacked_borrows.as_ref();
482485
let call_id = stacked_borrows.map_or(NonZeroU64::new(1).unwrap(), |stacked_borrows| {
483486
stacked_borrows.borrow_mut().new_call()
484487
});
485-
Ok(FrameData { call_id, catch_unwind: None })
488+
let extra = FrameData { call_id, catch_unwind: None };
489+
Ok(frame.with_extra(extra))
486490
}
487491

488492
#[inline(always)]
489-
fn stack_pop(
493+
fn after_stack_pop(
490494
ecx: &mut InterpCx<'mir, 'tcx, Self>,
491-
extra: FrameData<'tcx>,
495+
frame: Frame<'mir, 'tcx, Tag, FrameData<'tcx>>,
492496
unwinding: bool,
493497
) -> InterpResult<'tcx, StackPopJump> {
494-
ecx.handle_stack_pop(extra, unwinding)
498+
ecx.handle_stack_pop(frame.extra, unwinding)
495499
}
496500

497501
#[inline(always)]

0 commit comments

Comments
 (0)