compiler-API: resume scaffolding for a fresh session

Add the COMPILER-API stream to CLAUDE.md's session-start router and a
`## ⏯ Resume` block to CHECKPOINT-COMPILER-API.md (next action = sub-step 2.2,
read order, build/verify, and the cross-arch snapshot-regen gotcha).
This commit is contained in:
agra
2026-06-17 13:32:33 +03:00
parent cd5b958d19
commit 0b4c50b187
2 changed files with 25 additions and 3 deletions

View File

@@ -6,6 +6,22 @@ Companion to the design-of-record
`declare`/`define`/`type_info` `#builtin`s and the `#compiler` struct attribute
with ONE welded mechanism. Branch: `reify` (off `master`). Update after every step.
## ⏯ Resume (fresh session)
Phase 1 is COMPLETE and committed (`cd5b958`); Phase 2 (full byte-layout weld)
just started. **Do sub-step 2.2 next** — make `src/backend/llvm/types.zig`'s
`.@"struct"` case build a welded struct's LLVM type from `compiler_lib.computeWeldPlan`
(offset-ordered field elements + `[N x i8]` padding) with a build-time
`LLVMOffsetOfElement == plan offset` + `LLVMABISizeOfType == total_size` assertion;
cache the plan per TypeId for the GEP sites. The plan math (sub-step 2.1) is done,
pure, and unit-tested — see `computeWeldPlan` in `src/ir/compiler_lib.zig`. Full
2.22.6 breakdown under **## Next step**. Read order: this file → the design doc →
`src/ir/compiler_lib.zig`. Build/verify: `zig build && zig build test` (green now).
> ⚠ Snapshot gotcha: `zig build test -Dupdate-goldens` on this aarch64 host clobbers
> cross-arch examples' CI-captured `.stdout` (1228/1231/1639/1651/16571660) with
> host-specific empties. After regenerating, revert those (`git checkout` / `rm`)
> before committing — they are NOT part of this stream.
## Last completed step
**Phase 2, sub-step 1 — the weld-plan layout math + `StructInfo` registered.**
The de-risked core of the byte-layout-override ("GEP") engine, pure + unit-tested,