[][src]Struct rustc_mir::const_eval::CompileTimeInterpreter

pub struct CompileTimeInterpreter<'mir, 'tcx> {
    pub steps_remaining: usize,
    pub(crate) stack: Vec<Frame<'mir, 'tcx, (), ()>>,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Extra machine state for CTFE, and the Machine instance

Fields

steps_remaining: usize
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

For now, the number of terminators that can be evaluated before we throw a resource exhuastion error.

Setting this to 0 disables the limit and allows the interpreter to run forever.

stack: Vec<Frame<'mir, 'tcx, (), ()>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The virtual call stack.

Implementations

impl<'mir, 'tcx> CompileTimeInterpreter<'mir, 'tcx>[src]

pub(super) fn new(
    const_eval_limit: Limit
) -> Self
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Trait Implementations

impl<'mir, 'tcx> Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir, 'tcx>[src]

type PointerTag = ()

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Tag tracked alongside every pointer. This is used to implement "Stacked Borrows" https://www.ralfj.de/blog/2018/08/07/stacked-borrows.html. The default() is used for pointers to consts, statics, vtables and functions. The Debug formatting is used for displaying pointers; we cannot use Display as () does not implement that, but it should be "nice" output. Read more

type ExtraFnVal = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Machines can define extra (non-instance) things that represent values of function pointers. For example, Miri uses this to return a function pointer from dlsym that can later be called to execute the right thing. Read more

type MemoryKind = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Additional memory kinds a machine wishes to distinguish from the builtin ones

type MemoryMap = FxHashMap<AllocId, (MemoryKind<!>, Allocation)>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Memory's allocation map

type AllocExtra = ()

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Extra data stored in every allocation.

type FrameExtra = ()

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Extra data stored in every call frame.

type MemoryExtra = MemoryExtra

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Extra data stored in memory. A reference to this is available when AllocExtra gets initialized, so you can e.g., have an Rc here if there is global state you need access to in the AllocExtra hooks. Read more

Auto Trait Implementations

impl<'mir, 'tcx> !RefUnwindSafe for CompileTimeInterpreter<'mir, 'tcx>

impl<'mir, 'tcx> !Send for CompileTimeInterpreter<'mir, 'tcx>

impl<'mir, 'tcx> !Sync for CompileTimeInterpreter<'mir, 'tcx>

impl<'mir, 'tcx> Unpin for CompileTimeInterpreter<'mir, 'tcx> where
    'tcx: 'mir, 

impl<'mir, 'tcx> !UnwindSafe for CompileTimeInterpreter<'mir, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Cast for T

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<T> Same<T> for T

type Output = T

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Should always be Self

impl<E> SpecializationError for E[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]