#[repr(C)]pub struct FrameMaterializeInfo {
pub base_offset: u32,
pub pc: u32,
pub nresults: i32,
}Expand description
P12-S4-step4b — one Lua frame to push when a depth>0 side-exit
fires. Constructed at trace compile time from the recorded
Op::Call chain’s A field (caller’s R[A] = function slot) and
the inlined callee’s c field (nresults). pc is the address
the helper writes onto the freshly-pushed frame so the interp
resumes at the right offset inside the callee body.
repr(C) because the trace’s IR loads the array via raw pointer
arithmetic; Rust’s default repr doesn’t guarantee field order.
All-Copy fields with no padding inside each field — 12 bytes
per entry on amd64.
Fields§
§base_offset: u32Stack offset (relative to the trace head’s frame.base) of
the callee’s first register slot. The new frame’s base is
head_frame.base + base_offset; its func_slot is one below.
pc: u32PC to write on the freshly-pushed frame. For inner frames (not the innermost) this is the caller’s Call.pc + 1 so the interp resumes after the Call instruction. For the innermost frame (the one the side-exit fires inside) the dispatcher overrides this with the actual side-exit PC — keeps the helper PC-agnostic per the RFC’s “helper doesn’t know which frame is innermost” rule.
nresults: i32PUC nresults: how many return values the caller expects
from this call (encoded as Op::Call’s C - 1). step4b-C’s
pre-emit pass bails if any inlined Call has nresults != 1
(Op::Return1 copy-back assumes one value).
Trait Implementations§
Source§impl Clone for FrameMaterializeInfo
impl Clone for FrameMaterializeInfo
Source§fn clone(&self) -> FrameMaterializeInfo
fn clone(&self) -> FrameMaterializeInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more