Struct miri::InterpCx

source ·
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>§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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> PointerArithmetic for Twhere T: HasDataLayout,

source§

fn pointer_size(&self) -> Size

source§

fn max_size_of_val(&self) -> Size

source§

fn target_usize_max(&self) -> u64

source§

fn target_isize_min(&self) -> i64

source§

fn target_isize_max(&self) -> i64

source§

fn target_usize_to_isize(&self, val: u64) -> i64

source§

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!
source§

fn overflowing_offset(&self, val: u64, i: u64) -> (u64, bool)

source§

fn overflowing_signed_offset(&self, val: u64, i: i64) -> (u64, bool)

source§

fn offset<'tcx>(&self, val: u64, i: u64) -> Result<u64, InterpErrorInfo<'tcx>>

source§

fn signed_offset<'tcx>( &self, val: u64, i: i64 ) -> Result<u64, InterpErrorInfo<'tcx>>

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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.