iter loop-recur.3: codegen — real LLVM-IR lowering + run-to-value E2E (milestone terminal)
Third and terminal iteration of the standalone loop/recur
milestone (plan eae73bf). Replaces the iter-1 lower_term
CodegenError::Internal stub for Term::Loop/Term::Recur with real
LLVM-IR lowering: loop binders as entry-block allocas (mut.3
pending_entry_allocas, reusing mut_var_allocas so the existing
Term::Var load path is byte-unchanged), a fresh loop-header block,
recur stores + back-edge br, a loop_frames stack saved/restored at
the lambda boundary. clang -O2 mem2reg promotes the allocas to
phi. Four Boss design calls implemented verbatim and journalled
(alloca-not-hand-phi; mut_var_allocas reuse; emergent loop-exit
via the if/match join; single block_terminated field + parallel
SET site). Diff confirmed surgical: codegen/lib.rs 3 hunks (field
+ init + stub->2-arms), lambda.rs 2 hunks (save+restore); zero
edits to any existing block_terminated SET/READ site, tail-app
lowering, or verify_tail_positions (Boss call 4, the spec-pinned
invariant). Three new .ail fixtures: sum_to->55,
deep-n 1e6->500000500000 (clause-2 correctness made executable),
infinite-loop build-only. Codegen-only: no schema/typecheck
change; hash pins + drift trio stay green untouched.
One DONE_WITH_CONCERNS (T3): the plan's `cargo test ... tail`
filter resolved to no tests; ran via real names + the full 619/0
which subsumes it (feedback_plan_pseudo_vs_reality class, no
behaviour change). Boss systemic fix folded in: planner SKILL.md
Step-5 gains item 8 (verification-command filter strings must
resolve) — the second planner-meta-gap this milestone surfaced.
cargo test --workspace 616 -> 619 / 0 red (Boss-reran
independently); the 3 loop/recur e2e explicitly green. All three
components shipped: the loop/recur milestone is structurally
complete. Milestone-close audit + fieldtest is the next step.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"iter_id": "loop-recur.3",
|
||||
"date": "2026-05-17",
|
||||
"mode": "standard",
|
||||
"outcome": "DONE",
|
||||
"tasks_total": 3,
|
||||
"tasks_completed": 3,
|
||||
"reloops_per_task": { "1": 0, "2": 0, "3": 0 },
|
||||
"review_loops_spec": 0,
|
||||
"review_loops_quality": 0,
|
||||
"blocked_reason": null,
|
||||
"notes": "Terminal iteration of the standalone-loop/recur milestone (codegen Component 5 + run-to-value/deep-n/infinite-build E2E). Zero review re-loops across all 3 tasks; all four Boss design calls implemented verbatim (alloca-not-hand-phi; mut_var_allocas reuse; emergent loop-exit via the if/match join; single block_terminated field + parallel SET site) — each verified against actual read source before implementation, none reopened. T1 RED observed verbatim (iter-1 lower_term stub via direct ail build); GREEN sum_to->55. T1 plan's literal codegen arms compiled as-written, no plan-vs-reality substitution needed (pre-grounding confirmed mut_var_allocas:(String,Type) + lower_term->(String,String) matched). One DONE_WITH_CONCERNS on T3: the plan's literal `cargo test --workspace tail` filter substring matches no test name (real tail-app guards live under ailang-check/-prose lib + e2e iter14e_*musttail); ran the gate via real test names + the authoritative full-suite 619/0 which subsumes them — recurring feedback_plan_pseudo_vs_reality class (verification-command filter doesn't resolve), no behaviour change, intent (tail-app/verify_tail_positions byte-unchanged) preserved. Codegen-only iter: no schema/AST/serde/typecheck change; hash pins (loop_recur+iter13a) + drift trio + carve_out_inventory green untouched (empirical proof none scans the codegen region). cargo test --workspace 616 -> 619 (= baseline + exactly the 3 new e2e tests), zero FAILED/error. Milestone structurally closed; audit/fieldtest is the Boss post-iter call."
|
||||
}
|
||||
Reference in New Issue
Block a user