[−][src]Struct rustc_mir::interpret::intern::InternVisitor
Fields
ecx: &'rt mut InterpCx<'mir, 'tcx, M>The ectx from which we intern.
ref_tracking: &'rt mut RefTracking<(MPlaceTy<'tcx>, InternMode)>Previously encountered safe references.
leftover_allocations: &'rt mut FxHashSet<AllocId>A list of all encountered allocations. After type-based interning, we traverse this list to also intern allocations that are only referenced by a raw pointer or inside a union.
mode: InternModeThe root kind of the value that we're looking at. This field is never mutated for a particular allocation. It is primarily used to make as many allocations as possible read-only so LLVM can place them in const memory.
inside_unsafe_cell: boolThis field stores whether we are currently inside an UnsafeCell. This can affect
the intern mode of references we encounter.
Implementations
impl<'rt, 'mir, 'tcx, M: CompileTimeMachine<'mir, 'tcx>> InternVisitor<'rt, 'mir, 'tcx, M>[src]
pub(in interpret::intern) fn intern_shallow(
&mut self,
alloc_id: AllocId,
mode: InternMode,
ty: Option<Ty<'tcx>>
) -> Option<IsStaticOrFn>[src]
&mut self,
alloc_id: AllocId,
mode: InternMode,
ty: Option<Ty<'tcx>>
) -> Option<IsStaticOrFn>
Trait Implementations
impl<'rt, 'mir, 'tcx: 'mir, M: CompileTimeMachine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> for InternVisitor<'rt, 'mir, 'tcx, M>[src]
type V = MPlaceTy<'tcx>
pub fn ecx(&self) -> &InterpCx<'mir, 'tcx, M>[src]
pub fn visit_aggregate(
&mut self,
mplace: MPlaceTy<'tcx>,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>[src]
&mut self,
mplace: MPlaceTy<'tcx>,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>
pub fn visit_value(&mut self, mplace: MPlaceTy<'tcx>) -> InterpResult<'tcx>[src]
pub fn read_discriminant(
&mut self,
op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx, VariantIdx>[src]
&mut self,
op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx, VariantIdx>
pub fn visit_union(
&mut self,
_v: Self::V,
_fields: NonZeroUsize
) -> InterpResult<'tcx>[src]
&mut self,
_v: Self::V,
_fields: NonZeroUsize
) -> InterpResult<'tcx>
pub fn visit_field(
&mut self,
_old_val: Self::V,
_field: usize,
new_val: Self::V
) -> InterpResult<'tcx>[src]
&mut self,
_old_val: Self::V,
_field: usize,
new_val: Self::V
) -> InterpResult<'tcx>
pub fn visit_variant(
&mut self,
_old_val: Self::V,
_variant: VariantIdx,
new_val: Self::V
) -> InterpResult<'tcx>[src]
&mut self,
_old_val: Self::V,
_variant: VariantIdx,
new_val: Self::V
) -> InterpResult<'tcx>
pub fn walk_aggregate(
&mut self,
v: Self::V,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>[src]
&mut self,
v: Self::V,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>
pub fn walk_value(&mut self, v: Self::V) -> InterpResult<'tcx>[src]
Auto Trait Implementations
impl<'rt, 'mir, 'tcx, M> !RefUnwindSafe for InternVisitor<'rt, 'mir, 'tcx, M>
impl<'rt, 'mir, 'tcx, M> !Send for InternVisitor<'rt, 'mir, 'tcx, M>
impl<'rt, 'mir, 'tcx, M> !Sync for InternVisitor<'rt, 'mir, 'tcx, M>
impl<'rt, 'mir, 'tcx, M> Unpin for InternVisitor<'rt, 'mir, 'tcx, M> where
'mir: 'rt,
'tcx: 'rt,
'mir: 'rt,
'tcx: 'rt,
impl<'rt, 'mir, 'tcx, M> !UnwindSafe for InternVisitor<'rt, 'mir, 'tcx, M>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.