Two new workstreams:
- ASM: inline assembly — asm { "tmpl", "=r" -> T, "r" = expr, clobbers(.…) },
multi-return tuples; lowers via the existing llvm_api.c (no shim).
- FFI-linkage: add extern/export postfix keywords, migrate every #foreign onto
them, then purge 'foreign' from the tree (end-state invariant).
Drop current/ from .gitignore so plans + checkpoints are tracked normally
(the dir was ignored; only checkpoints had been force-added). Includes
docs/inline-asm-design.md. specs.md change left uncommitted.
25 lines
824 B
Markdown
25 lines
824 B
Markdown
# sx Inline Assembly — Checkpoint (ASM stream)
|
|
|
|
Companion to `current/PLAN-ASM.md`; design in
|
|
[docs/inline-asm-design.md](../docs/inline-asm-design.md). Update after every
|
|
commit, one step at a time per the cadence rule (no commit may both add a test
|
|
and make it pass).
|
|
|
|
## Last completed step
|
|
None — plan authored, not yet started.
|
|
|
|
## Current state
|
|
Design fully converged (`docs/inline-asm-design.md`). Feasibility confirmed:
|
|
`llvm_api.c.*` exposes `LLVMGetInlineAsm` / `LLVMBuildCall2` /
|
|
`LLVMAppendModuleInlineAsm` (LLVM@19). No code written.
|
|
|
|
## Next step
|
|
**A.0** — add the `kw_asm` keyword (`src/token.zig` Tag + `StaticStringMap`) and a
|
|
unit lex test. Then A.1 (parse `asm { … }` → `AsmExpr`, lowering bails loudly).
|
|
|
|
## Log
|
|
- (init) Plan + design doc written; ASM stream opened.
|
|
|
|
## Known issues
|
|
None yet.
|