Skip to main content

Module lower

Module lower 

Source
Expand description

Single-pass AST → AArch64 lowering (design §6, §7): accumulator in x0, temporaries on the machine stack, scope analysis via the bytecode compiler’s SymbolTable, and every dynamic operation through the frozen rt_* ABI. No IR, no register allocation, no optimization.

Structs§

LowerError

Constants§

MAX_FUNCTION_PARAMETERS
Hard limits from the calling convention (design §2.2, §7): closures pass user parameters in x1..x7; methods spend x1 on this.
MAX_METHOD_PARAMETERS

Functions§

compile_source
Parses + lowers in one step for the CLI and tests; parse and lowering failures are joined into printable messages.
lower_node
Lowers a parsed program to a complete assembly module in the given dialect. observe selects the differential-testing build: rt_observer_init(3) at startup and one rt_observe_result before exit (design §10.2).