pub struct FnChunk {
pub name: String,
pub arity: u8,
pub local_count: u16,
pub code: Vec<u8>,
pub constants: Vec<NanValue>,
pub effects: Vec<u32>,
pub thin: bool,
pub parent_thin: bool,
pub leaf: bool,
}Expand description
A compiled function chunk — bytecode + metadata.
Fields§
§name: String§arity: u8§local_count: u16§code: Vec<u8>§constants: Vec<NanValue>§effects: Vec<u32>Declared effects (e.g. ! [Console.print, Http]). Empty for pure functions.
thin: boolConservatively classified “thin” function: likely to return without creating any frame-local heap survivors or dirtying globals.
parent_thin: boolNarrow wrapper-like helper that borrows the caller young region and skips ordinary-return handoff as long as it stays out of yard/handoff.
leaf: boolLeaf function: no CALL_KNOWN or CALL_VALUE in bytecode (only builtins and opcodes). When also thin and args-only (local_count == arity), can be called without pushing a CallFrame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FnChunk
impl RefUnwindSafe for FnChunk
impl Send for FnChunk
impl Sync for FnChunk
impl Unpin for FnChunk
impl UnsafeUnpin for FnChunk
impl UnwindSafe for FnChunk
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more