Add post-initialization hook for static memory initialized using the interpereter.
This commit is contained in:
parent
a9f7d19a91
commit
56d89364a5
2 changed files with 14 additions and 1 deletions
|
@ -9,6 +9,7 @@ use std::hash::Hash;
|
|||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_target::abi::Size;
|
||||
|
||||
use super::{
|
||||
AllocId, Allocation, AllocationExtra, CheckInAllocMsg, Frame, ImmTy, InterpCx, InterpResult,
|
||||
|
@ -299,6 +300,15 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Called after initializing static memory using the interpreter.
|
||||
fn after_static_mem_initialized(
|
||||
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
|
||||
_ptr: Pointer<Self::PointerTag>,
|
||||
_size: Size
|
||||
) -> InterpResult<'tcx> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Executes a retagging operation
|
||||
#[inline]
|
||||
fn retag(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue