Struct miri::Frame

source ·
pub struct Frame<'mir, 'tcx, Prov = CtfeProvenance, Extra = ()>
where Prov: Provenance,
{ pub body: &'mir Body<'tcx>, pub instance: Instance<'tcx>, pub extra: Extra, pub return_to_block: StackPopCleanup, pub return_place: PlaceTy<'tcx, Prov>, pub locals: IndexVec<Local, LocalState<'tcx, Prov>>, tracing_span: SpanGuard, pub loc: Either<Location, Span>, }
Expand description

A stack frame.

Fields§

§body: &'mir Body<'tcx>

The MIR for the function called on this frame.

§instance: Instance<'tcx>

The def_id and args of the current function.

§extra: Extra

Extra data for the machine.

§return_to_block: StackPopCleanup

Work to perform when returning from this function.

§return_place: PlaceTy<'tcx, Prov>

The location where the result of the current stack frame should be written to, and its layout in the caller.

§locals: IndexVec<Local, LocalState<'tcx, Prov>>

The list of locals for this stack frame, stored in order as [return_ptr, arguments..., variables..., temporaries...]. The locals are stored as Option<Value>s. None represents a local that is currently dead, while a live local can either directly contain Scalar or refer to some part of an Allocation.

Do not access this directly; always go through the machine hook!

§tracing_span: SpanGuard§loc: Either<Location, Span>

If this is Right, we are not currently executing any particular statement in this frame (can happen e.g. during frame initialization, and during unwinding on frames without cleanup code).

Needs to be public because ConstProp does unspeakable things to it.

Trait Implementations§

source§

impl VisitProvenance for Frame<'_, '_, Provenance, FrameExtra<'_>>

source§

fn visit_provenance(&self, visit: &mut VisitWith<'_>)

Auto Trait Implementations§

§

impl<'mir, 'tcx, Prov = CtfeProvenance, Extra = ()> !RefUnwindSafe for Frame<'mir, 'tcx, Prov, Extra>

§

impl<'mir, 'tcx, Prov = CtfeProvenance, Extra = ()> !Send for Frame<'mir, 'tcx, Prov, Extra>

§

impl<'mir, 'tcx, Prov = CtfeProvenance, Extra = ()> !Sync for Frame<'mir, 'tcx, Prov, Extra>

§

impl<'mir, 'tcx, Prov, Extra> Unpin for Frame<'mir, 'tcx, Prov, Extra>
where Extra: Unpin, Prov: Unpin,

§

impl<'mir, 'tcx, Prov = CtfeProvenance, Extra = ()> !UnwindSafe for Frame<'mir, 'tcx, Prov, Extra>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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 T
where 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.