[−][src]Trait rustc_mir::interpret::visitor::ValueVisitor
Associated Types
Loading content...Required methods
Loading content...Provided methods
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>
read_discriminant can be hooked for better error messages.
pub fn visit_value(&mut self, v: Self::V) -> InterpResult<'tcx>[src]
Visits the given value, dispatching as appropriate to more specialized visitors.
pub fn visit_union(
&mut self,
_v: Self::V,
_fields: NonZeroUsize
) -> InterpResult<'tcx>[src]
&mut self,
_v: Self::V,
_fields: NonZeroUsize
) -> InterpResult<'tcx>
Visits the given value as a union. No automatic recursion can happen here.
pub fn visit_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>
Visits this value as an aggregate, you are getting an iterator yielding
all the fields (still in an InterpResult, you have to do error handling yourself).
Recurses into the fields.
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>
Called each time we recurse down to a field of a "product-like" aggregate (structs, tuples, arrays and the like, but not enums), passing in old (outer) and new (inner) value. This gives the visitor the chance to track the stack of nested fields that we are descending through.
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>
Called when recursing into an enum variant. This gives the visitor the chance to track the stack of nested fields that we are descending through.
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]
Implementors
impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> for ValidityVisitor<'rt, 'mir, 'tcx, M>[src]
type V = OpTy<'tcx, M::PointerTag>
pub fn ecx(&self) -> &InterpCx<'mir, 'tcx, M>[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_field(
&mut self,
old_op: OpTy<'tcx, M::PointerTag>,
field: usize,
new_op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>[src]
&mut self,
old_op: OpTy<'tcx, M::PointerTag>,
field: usize,
new_op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>
pub fn visit_variant(
&mut self,
old_op: OpTy<'tcx, M::PointerTag>,
variant_id: VariantIdx,
new_op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>[src]
&mut self,
old_op: OpTy<'tcx, M::PointerTag>,
variant_id: VariantIdx,
new_op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>
pub fn visit_union(
&mut self,
_op: OpTy<'tcx, M::PointerTag>,
_fields: NonZeroUsize
) -> InterpResult<'tcx>[src]
&mut self,
_op: OpTy<'tcx, M::PointerTag>,
_fields: NonZeroUsize
) -> InterpResult<'tcx>
pub fn visit_value(
&mut self,
op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>[src]
&mut self,
op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>
pub fn visit_aggregate(
&mut self,
op: OpTy<'tcx, M::PointerTag>,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>[src]
&mut self,
op: OpTy<'tcx, M::PointerTag>,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>
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>