pub fn compile_program_with_modules(
items: &[ResolvedTopLevel],
symbols: &SymbolTable,
arena: &mut Arena,
module_root: Option<&str>,
source_file: &str,
analysis: Option<&AnalysisResult>,
) -> Result<(CodeStore, Vec<NanValue>), CompileError>Expand description
Compile a resolved program into bytecode.
items is the entry’s resolved HIR (the output of the
NameResolve pipeline stage). symbols is the entry’s symbol
table — every ResolvedCallee::Fn(FnId) / ResolvedCtor::User
in the resolved tree resolves through it to a canonical name
that the VM dispatches against.
analysis carries per-fn FnAnalysis.allocates from the
pipeline’s analyze stage; the VM compiler reads chunk.no_alloc
from it directly.
Compile with explicit module root for depends resolution.