Remove legacy hardcoded 'sum' carrier validation that was blocking array_filter patterns with different accumulator names (e.g., 'out'). Before: Pattern3 required carrier named 'sum' to exist After: Pattern3 uses carrier_info generically (any carrier name works) Test results: - phase49_joinir_array_filter_smoke: PASS ✅ - phase49_joinir_array_filter_fallback: PASS ✅ - phase49_joinir_array_filter_ab_comparison: PASS ✅ - Full suite: 909/909 PASS, 0 FAIL Also: Archive old roadmap documentation (67k lines moved to docs/archive/) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
Phase 21.6 — Solidification Checklist
Acceptance (all must be green on this host)
- Parser(Stage‑B): loop JSON canary PASS (no empty body; cond = Compare <, lhs=Var i, rhs=Var n|Int const)
- MirBuilder(delegate): MIR(JSON) for minimal loop contains only control‑flow ops (const/phi/compare/branch/binop/jump/ret)
- VM: MIR(JSON) for minimal loop returns 10
- ny‑llvmc(crate) EXE: returns 10
Canaries to run
- bash tools/dev/stageb_loop_json_canary.sh
- bash tools/dev/phase216_chain_canary.sh
- bash tools/dev/phase216_chain_canary_return.sh
- bash tools/dev/phase216_chain_canary_binop.sh
- bash tools/dev/phase216_chain_canary_loop.sh
- bash tools/dev/phase216_chain_canary_call.sh (Phase 21.6 extension)
Guardrails
- No default behavior changes; all aids behind env toggles.
- Logs quiet; tags/dev traces are opt‑in.
- No llvmlite in default chain; crate backend is main line.
Rollback
- Parser fallback in parse_loop is conservative; remove after VM/gpos fix lands.
- Keep canaries; they protect against regressions.
Phase 21.6 Call Support Extension
Toggles:
HAKO_STAGEB_FUNC_SCAN=1: Enable function definition scanning in Stage-BHAKO_MIR_BUILDER_FUNCS=1: Enable function definition lowering in MirBuilder (unused - Rust delegate used)
Implementation:
- Stage-B function scanner extracts
method <name>(params){ body }definitions - Stage-B injects
defsarray into Program(JSON v0) - Rust delegate (src/runner/json_v0_bridge/) processes
defsand generates MIR functions - Function names are qualified as
Box.method(e.g.,Main.add)
Current Status:
- ✅ Stage-B scanning implemented (compiler_stageb.hako)
- ✅ Rust delegate defs processing implemented (ast.rs, lowering.rs)
- ✅ MIR functions generated with correct signatures and bodies
- ⚠️ Call resolution incomplete: calls still use dynamic string lookup ("add") instead of static Main.add reference
Next Steps for Call Completion:
- Need to resolve Call("add") → Call(Main.add) at lowering time
- Implement call target resolution in json_v0_bridge/lowering.rs
- Update Call instruction to use function reference instead of string
- Alternative: use MirCall with Callee::Function for local calls
撤去条件 (Removal Criteria):
- After Phase 22 introduces proper local function scoping with Callee typed calls
- Or when unified with broader namespace/using system Phase 15.5+