Skip to main content

Module expr

Module expr 

Source
Expand description

Recursive emitter for typed expressions.

Walks a TypedExprKind tree and pushes Wasm instructions onto a FunctionEmitter. Stateless — pure recursion over &CodegenCtx plus mutation of the supplied emitter; both _start’s initializer code and function bodies share this single dispatch.

Missing emission metadata returns a compiler failure; the caller discards the owned emitter and module before publishing Wasm.

Functions§

emit_expr
Emit code for the expression at id, leaving its result on the Wasm stack. Records the expression’s source span against the emitter so the DWARF wiring task can recover instruction-offset → source-position mappings later.