Struct rustc_mir::interpret::Frame [−][src]
pub struct Frame<'mir, 'tcx, Tag = (), Extra = ()> { pub body: &'mir Body<'tcx>, pub instance: Instance<'tcx>, pub extra: Extra, pub return_to_block: StackPopCleanup, pub return_place: Option<PlaceTy<'tcx, Tag>>, pub locals: IndexVec<Local, LocalState<'tcx, Tag>>, tracing_span: SpanGuard, pub(super) loc: Result<Location, Span>, }
Expand description
A stack frame.
Fields
body: &'mir Body<'tcx>Expand description
The MIR for the function called on this frame.
instance: Instance<'tcx>Expand description
The def_id and substs of the current function.
extra: ExtraExpand description
Extra data for the machine.
return_to_block: StackPopCleanupExpand description
Work to perform when returning from this function.
return_place: Option<PlaceTy<'tcx, Tag>>Expand description
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, Tag>>Expand description
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.
tracing_span: SpanGuardExpand description
The span of the tracing crate is stored here.
When the guard is dropped, the span is exited. This gives us
a full stack trace on all tracing statements.
loc: Result<Location, Span>Expand description
If this is Err, 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).
We basically abuse Result as Either.
Implementations
impl<'mir, 'tcx, Tag> Frame<'mir, 'tcx, Tag>[src]
impl<'mir, 'tcx, Tag> Frame<'mir, 'tcx, Tag>[src]pub fn with_extra<Extra>(self, extra: Extra) -> Frame<'mir, 'tcx, Tag, Extra>[src]
impl<'mir, 'tcx, Tag, Extra> Frame<'mir, 'tcx, Tag, Extra>[src]
impl<'mir, 'tcx, Tag, Extra> Frame<'mir, 'tcx, Tag, Extra>[src]pub fn current_loc(&self) -> Result<Location, Span>[src]
pub fn current_loc(&self) -> Result<Location, Span>[src]Get the current location within the Frame.
If this is Err, 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).
We basically abuse Result as Either.
Used by priroda.
pub fn current_source_info(&self) -> Option<&SourceInfo>[src]
pub fn current_source_info(&self) -> Option<&SourceInfo>[src]Return the SourceInfo of the current instruction.
pub fn current_span(&self) -> Span[src]
Trait Implementations
impl<'ctx, 'mir, 'tcx, Tag, Extra> HashStable<StableHashingContext<'ctx>> for Frame<'mir, 'tcx, Tag, Extra> where
Extra: HashStable<StableHashingContext<'ctx>>,
Tag: HashStable<StableHashingContext<'ctx>>, [src]
impl<'ctx, 'mir, 'tcx, Tag, Extra> HashStable<StableHashingContext<'ctx>> for Frame<'mir, 'tcx, Tag, Extra> where
Extra: HashStable<StableHashingContext<'ctx>>,
Tag: HashStable<StableHashingContext<'ctx>>, [src]fn hash_stable(
&self,
hcx: &mut StableHashingContext<'ctx>,
hasher: &mut StableHasher
)[src]
&self,
hcx: &mut StableHashingContext<'ctx>,
hasher: &mut StableHasher
)
Auto Trait Implementations
impl<'mir, 'tcx, Tag = (), Extra = ()> !RefUnwindSafe for Frame<'mir, 'tcx, Tag, Extra>
impl<'mir, 'tcx, Tag = (), Extra = ()> !Send for Frame<'mir, 'tcx, Tag, Extra>
impl<'mir, 'tcx, Tag = (), Extra = ()> !Sync for Frame<'mir, 'tcx, Tag, Extra>
impl<'mir, 'tcx, Tag, Extra> Unpin for Frame<'mir, 'tcx, Tag, Extra> where
Extra: Unpin,
Tag: Unpin,
'tcx: 'mir,
Extra: Unpin,
Tag: Unpin,
'tcx: 'mir,
impl<'mir, 'tcx, Tag = (), Extra = ()> !UnwindSafe for Frame<'mir, 'tcx, Tag, Extra>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]