Source-shaped stack-frame state and local storage operations from pinned
rustc_const_eval/src/interpret/stack.rs. Interpreter callbacks remain
explicit for layout queries, machine hooks, allocation, and deallocation.
- mir (location : MIR.Location) : FrameLocation
- unwinding (span : MIR.SpanRef) : FrameLocation
Instances For
Equations
- Miri.Interpreter.instDecidableEqFrameLocation.decEq (Miri.Interpreter.FrameLocation.mir a) (Miri.Interpreter.FrameLocation.mir b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.Interpreter.instDecidableEqFrameLocation.decEq (Miri.Interpreter.FrameLocation.mir location) (Miri.Interpreter.FrameLocation.unwinding span) = isFalse ⋯
- Miri.Interpreter.instDecidableEqFrameLocation.decEq (Miri.Interpreter.FrameLocation.unwinding span) (Miri.Interpreter.FrameLocation.mir location) = isFalse ⋯
- Miri.Interpreter.instDecidableEqFrameLocation.decEq (Miri.Interpreter.FrameLocation.unwinding a) (Miri.Interpreter.FrameLocation.unwinding b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Frames and call dispatch share the complete canonical instance identity.
Instances For
- goto (ret : Option MIR.BasicBlockId) (unwind : MIR.UnwindAction) : ReturnContinuation
- stop (cleanup : Bool) : ReturnContinuation
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.instDecidableEqReturnContinuation.decEq (Miri.Interpreter.ReturnContinuation.goto ret unwind) (Miri.Interpreter.ReturnContinuation.stop cleanup) = isFalse ⋯
- Miri.Interpreter.instDecidableEqReturnContinuation.decEq (Miri.Interpreter.ReturnContinuation.stop cleanup) (Miri.Interpreter.ReturnContinuation.goto ret unwind) = isFalse ⋯
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- normal : ReturnAction
- noJump : ReturnAction
- noCleanup : ReturnAction
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- emptyStack : StackError
- rootFrameCondition (stackWasEmpty continuationIsStop : Bool) : StackError
- invalidLocal (localId : MIR.LocalId) (localCount : Nat) : StackError
- invalidLocation (location : MIR.Location) : StackError
- cannotMakeReturnPlaceDead : StackError
- localExpectedLive (localId : MIR.LocalId) : StackError
- missingLocalType (localId : MIR.LocalId) : StackError
- unsupportedUnexpectedLocalType (localId : MIR.LocalId) (ty : MIR.TyId) : StackError
- unsizedLocalMissingMetadata (localId : MIR.LocalId) : StackError
- metadataForSizedLocal (localId : MIR.LocalId) : StackError
- machineHookFailure (message : String) : StackError
- layoutFailure (message : String) : StackError
- allocationFailure (message : String) : StackError
- deallocationFailure (message : String) : StackError
- localHasNoAllocationProvenance (localId : MIR.LocalId) : StackError
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- body : MIR.Body
- bodyIdentity : BodyIdentity
- functionInstance : FrameInstance
- extra : Extra
- returnContinuation : ReturnContinuation
- returnPlace : RuntimeStackPlace Prov
- localsIdentity : LocalsIdentity
- locals : Array (LocalState Prov Layout)
- vaList : Array (MemoryOperandPlace Prov)
- trackCallerArg : Option MIR.SpanRef
- location : FrameLocation
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
The source push_stack_frame_raw initialization: one dead, uncached
local state for each MIR local declaration. The other frame fields are
required inputs; no body, return place, instance, or machine extra is
invented here.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- self.currentLoc = self.location
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Replace only the LocalValue, preserving rustc's memoized layout.
Equations
- One or more equations did not get rendered due to their size.
Instances For
access_mut-style update: dead locals fail, and the cached layout is
retained exactly. Callers performing actual writes must run their hooks first.
Equations
- self.setLocalOperand localId value = do let _ ← self.getLocalOperand localId self.replaceLocalValue localId (Miri.Interpreter.LocalValue.live value)
Instances For
Equations
- self.getLocalLayout localId = do let __do_lift ← self.getLocal localId pure __do_lift.layout
Instances For
Cache the source-computed layout only if no layout was already memoized.
The returned layout is the cached one when present, matching layout_of_local.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- self.currentFrame? = self.frames.back?
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Stateful callback result: effects before an error are never rolled back.
- state : State
- outcome : Except StackError α
Instances For
Required compiler and machine operations. veryTriviallySized must implement
source's recursive type-kind classifier; layout includes normalization and
from_known_layout. Allocation/deallocation use stack memory kind.
- veryTriviallySized : MIR.TyId → Except StackError Bool
- layout : State → Frame Prov Layout Extra → MIR.LocalId → StackEffect State Layout
- isSized : Layout → Bool
- afterLocalWrite : State → MIR.LocalId → Bool → StackEffect State Unit
- allocateDyn : State → Layout → MemPlaceMeta Prov → StackEffect State (MemPlace Prov)
- deallocateStack : State → Memory.Pointer (Option Prov) → StackEffect State Unit
Instances For
- frame : Frame Prov Layout Extra
- state : State
- outcome : Except StackError Unit
Instances For
Source deallocate_local: only indirect live locals own an allocation.
The required deallocator validates provenance and allocation identity.
Equations
- Miri.Interpreter.Frame.deallocateLocal hooks state (Miri.Interpreter.LocalValue.live (Miri.Interpreter.Operand.indirect place)) = hooks.deallocateStack state place.ptr
- Miri.Interpreter.Frame.deallocateLocal hooks state value = { state := state, outcome := Except.ok () }
Instances For
Source storage_dead replaces the value before attempting deallocation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source storage_live_dyn, including lazy layout caching, allocation or
write hook before replacement, and replacement before old-value deallocation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- self.storageLive state hooks localId = self.storageLiveDyn state hooks localId Miri.Interpreter.MemPlaceMeta.none
Instances For
Whole-stack effects keep mutations made by a machine hook even on failure.
- stack : Stack Prov Layout Extra
- state : State
- outcome : Except StackError α
Instances For
Compiler-dependent and machine-dependent stages required by the source
frame lifecycle. Required constants and always-live analysis are explicit
obligations because MIR.Body does not store their compiler query results.
- storage : LocalStorageHooks Prov Layout Extra State
- freshLocalsIdentity : State → State × LocalsIdentity
Total ghost instrumentation at locals-buffer creation, not a source machine callback.
- initFrame : State → Frame Prov Layout Unit → StackEffect State (Frame Prov Layout Extra)
- requiredConstants : Stack Prov Layout Extra → State → StackRunResult Prov Layout Extra State Unit
- afterPush : Stack Prov Layout Extra → State → StackRunResult Prov Layout Extra State Unit
- beforePop : Stack Prov Layout Extra → State → StackRunResult Prov Layout Extra State Unit
- afterPop : Stack Prov Layout Extra → State → Frame Prov Layout Extra → Bool → StackRunResult Prov Layout Extra State ReturnAction
- alwaysLiveVarsAndTemps : MIR.Body → Except StackError (Array MIR.LocalId)
- deallocateVararg : State → MemoryOperandPlace Prov → StackEffect State Unit
Instances For
Source push_stack_frame_raw: init precedes insertion, while required
constant checks and after-push run with the new frame already on the stack.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source pop_stack_frame_raw: before-pop effects precede removal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source cleanup_stack_frame: locals, then varargs, then machine after-pop.
Stop-without-cleanup skips both deallocation and the machine hook.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source push_stack_frame_done: make return storage and always-live vars
live in source order, preserving each successful update on later failure.
Equations
- One or more equations did not get rendered due to their size.