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,
pub source_file: String,
pub line_table: Vec<(u16, u16)>,
}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.
source_file: StringSource file path for this function (empty for synthetic/unknown).
line_table: Vec<(u16, u16)>Run-length encoded line table: (bytecode_offset, source_line).
Sorted by offset. Lookup: find last entry where offset <= target ip.