/// A cache for deduplicating vtables
pub(super) vtables: FxHashMap<
- (Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>),
- Pointer<M::PointerTag>
- >,
+ (Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>),
+ Pointer<M::PointerTag>
+ >,
}
/// A stack frame.
&mut self.memory
}
+ #[inline(always)]
+ pub fn tag_static_base_pointer(&self, ptr: Pointer) -> Pointer<M::PointerTag> {
+ self.memory.tag_static_base_pointer(ptr)
+ }
+
#[inline(always)]
pub fn stack(&self) -> &[Frame<'mir, 'tcx, M::PointerTag, M::FrameExtra>] {
&self.stack
}
}
- pub fn str_to_immediate(&mut self, s: &str) -> EvalResult<'tcx, Immediate<M::PointerTag>> {
- let ptr = self.memory.allocate_static_bytes(s.as_bytes()).with_default_tag();
- Ok(Immediate::new_slice(Scalar::Ptr(ptr), s.len() as u64, self))
- }
-
/// Returns the actual dynamic size and alignment of the place at the given type.
/// Only the "meta" (metadata) part of the place matters.
/// This can fail to provide an answer for extern types.