// Stream B1 (fibers) step B1.0a — LOCK commit for `abi(.pure)`. // // An `abi(.pure)` function has no calling-convention prologue/epilogue/frame // and no implicit `__sx_ctx`: its body is a single asm block that sets the // return register and emits its own `ret`. This is the substrate the per-arch // fiber context-switch is built on (design §4.6) — a `.c` epilogue would // restore SP from the wrong stack across a switch (SP-in ≠ SP-out by design). // // This commit only plumbs the `is_pure` flag through lowering; LLVM emission // (the `naked` attribute + asm-only body) is NOT implemented yet, so emit bails // LOUDLY (build-gating, nonzero exit) rather than emit a framed body. The bail // is at the function level, before any asm/instruction selection, so it is // host-independent (no `.build` target pin needed until B1.0b adds emission). // B1.0b flips this to a green, aarch64-pinned end-to-end run. answer :: () -> i64 abi(.pure) { asm volatile { #string ASM mov x0, #42 ret ASM }; } main :: () -> i64 { return answer(); }