pub struct InterpCx<'mir, 'tcx, M>where
M: Machine<'mir, 'tcx>,{
pub machine: M,
pub tcx: TyCtxtAt<'tcx>,
pub(crate) param_env: ParamEnv<'tcx>,
pub memory: Memory<'mir, 'tcx, M>,
pub recursion_limit: Limit,
}
Fields
machine: M
Stores the Machine
instance.
Note: the stack is provided by the machine.
tcx: TyCtxtAt<'tcx>
The results of the type checker, from rustc. The span in this is the “root” of the evaluation, i.e., the const we are evaluating (if this is CTFE).
param_env: ParamEnv<'tcx>
Bounds in scope for polymorphic evaluations.
memory: Memory<'mir, 'tcx, M>
The virtual memory system.
recursion_limit: Limit
The recursion limit (cached from tcx.recursion_limit(())
)
Auto Trait Implementations
impl<'mir, 'tcx, M> !RefUnwindSafe for InterpCx<'mir, 'tcx, M>
impl<'mir, 'tcx, M> !Send for InterpCx<'mir, 'tcx, M>
impl<'mir, 'tcx, M> !Sync for InterpCx<'mir, 'tcx, M>
impl<'mir, 'tcx, M> Unpin for InterpCx<'mir, 'tcx, M>where
M: Unpin,
<M as Machine<'mir, 'tcx>>::ExtraFnVal: Unpin,
<M as Machine<'mir, 'tcx>>::MemoryMap: Unpin,
impl<'mir, 'tcx, M> !UnwindSafe for InterpCx<'mir, 'tcx, M>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'tcx, C> LayoutOf<'tcx> for Cwhere
C: LayoutOfHelpers<'tcx>,
impl<'tcx, C> LayoutOf<'tcx> for Cwhere
C: LayoutOfHelpers<'tcx>,
sourcefn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult
fn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult
Computes the layout of a type. Note that this implicitly
executes in “reveal all” mode, and will normalize the input type. Read more
sourcefn spanned_layout_of(&self, ty: Ty<'tcx>, span: Span) -> Self::LayoutOfResult
fn spanned_layout_of(&self, ty: Ty<'tcx>, span: Span) -> Self::LayoutOfResult
Computes the layout of a type, at
span
. Note that this implicitly
executes in “reveal all” mode, and will normalize the input type. Read moresourceimpl<T> PointerArithmetic for Twhere
T: HasDataLayout,
impl<T> PointerArithmetic for Twhere
T: HasDataLayout,
fn pointer_size(&self) -> Size
fn max_size_of_val(&self) -> Size
fn machine_usize_max(&self) -> u64
fn machine_isize_min(&self) -> i64
fn machine_isize_max(&self) -> i64
fn machine_usize_to_isize(&self, val: u64) -> i64
sourcefn truncate_to_ptr(&self, (u64, bool)) -> (u64, bool)
fn truncate_to_ptr(&self, (u64, bool)) -> (u64, bool)
Helper function: truncate given value-“overflowed flag” pair to pointer size and
update “overflowed flag” if there was an overflow.
This should be called by all the other methods before returning! Read more
fn overflowing_offset(&self, val: u64, i: u64) -> (u64, bool)
fn overflowing_signed_offset(&self, val: u64, i: i64) -> (u64, bool)
fn offset<'tcx>(&self, val: u64, i: u64) -> Result<u64, InterpErrorInfo<'tcx>>
fn signed_offset<'tcx>(
&self,
val: u64,
i: i64
) -> Result<u64, InterpErrorInfo<'tcx>>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.