1
Fork 0

Add back Machine::before_terminator(...) method

Added it back because it's used by Miri, but in the compiler itself, it
will not do anything (just return `Ok(())`.
This commit is contained in:
Bryan Garza 2022-12-30 00:34:17 +00:00
parent 08de246cd7
commit 172662dede
3 changed files with 13 additions and 0 deletions

View file

@ -243,6 +243,12 @@ pub trait Machine<'mir, 'tcx>: Sized {
ecx.stack_mut()[frame].locals[local].access_mut()
}
/// Called before a basic block terminator is executed.
#[inline]
fn before_terminator(_ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx> {
Ok(())
}
/// Called when the interpreter encounters a `StatementKind::ConstEvalCounter` instruction.
/// You can use this to detect long or endlessly running programs.
#[inline]