]> git.lizzy.rs Git - rust.git/commitdiff
adjust for frame hook changes
authorRalf Jung <post@ralfj.de>
Mon, 13 Apr 2020 14:08:12 +0000 (16:08 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 15 Apr 2020 10:33:52 +0000 (12:33 +0200)
src/machine.rs

index 54dfb49d798be55fd8e0d0a01718bd8094e906f6..67b847603d8a5479022d4f78336266f315504834 100644 (file)
@@ -490,21 +490,25 @@ fn retag(
     }
 
     #[inline(always)]
-    fn stack_push(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx, FrameData<'tcx>> {
+    fn init_frame_extra(
+        ecx: &mut InterpCx<'mir, 'tcx, Self>,
+        frame: Frame<'mir, 'tcx, Tag>,
+    ) -> InterpResult<'tcx, Frame<'mir, 'tcx, Tag, FrameData<'tcx>>> {
         let stacked_borrows = ecx.memory.extra.stacked_borrows.as_ref();
         let call_id = stacked_borrows.map_or(NonZeroU64::new(1).unwrap(), |stacked_borrows| {
             stacked_borrows.borrow_mut().new_call()
         });
-        Ok(FrameData { call_id, catch_unwind: None })
+        let extra = FrameData { call_id, catch_unwind: None };
+        Ok(frame.with_extra(extra))
     }
 
     #[inline(always)]
-    fn stack_pop(
+    fn after_stack_pop(
         ecx: &mut InterpCx<'mir, 'tcx, Self>,
-        extra: FrameData<'tcx>,
+        frame: Frame<'mir, 'tcx, Tag, FrameData<'tcx>>,
         unwinding: bool,
     ) -> InterpResult<'tcx, StackPopJump> {
-        ecx.handle_stack_pop(extra, unwinding)
+        ecx.handle_stack_pop(frame.extra, unwinding)
     }
 
     #[inline(always)]