Expand description
AOT arm64 (AArch64) assembly backend for Monkey.
Design: docs/arm64-asm-backend-design.md. The crate is built twice:
the host build exposes emitter/lower (pure functions producing .s
text) plus the shared runtime_core; the aarch64 cross build additionally
provides the extern "C" runtime the generated assembly links against.
Modules§
- emitter
- AArch64 text emitter (design §6): buffers, labels, span stack, and the
encoding-limit helpers (
load_imm64, frame/sp/global addressing) thatlower.rsmust never bypass. - lower
- Single-pass AST → AArch64 lowering (design §6, §7): accumulator in
x0, temporaries on the machine stack, scope analysis via the bytecode compiler’sSymbolTable, and every dynamic operation through the frozenrt_*ABI. No IR, no register allocation, no optimization. - runtime
- Native
extern "C"runtime the generated.slinks against (design §8). - runtime_
backend - Storage backends behind the runtime semantics (design §8.1).
- runtime_
core - Storage/execution agnostic runtime semantics (design §5.2, §8, §10.1).