v4 Capstone: Full Pipeline

  • Validate lazy evaluation and loop cleanup through BC2 transport.
  • Make internal loop state observable despite nil program results.
  • Enforce semantic failure before runtime side effects.
1 / 6

Readiness

  • Complete v4 lexical, parsing, semantic, and lowering changes.
  • Retain v3 callable-value and heap regression cases.
2 / 6

Worked reconstruction

let total=0;
for (let i=0; i<4; i=i+1) {
  if (i==1) { continue; }
  total=total+i;
}
if (total!=5) { 1/0; }
false && (1/0);

The loop adds 0, 2, and 3. Continue still executes post, so i advances past 1. The assertion observes total without exposing the VM's private environment. The last expression compiles both operands but skips its division at runtime; its boolean result is popped as an expression statement. Success returns nil, not total=5 and not the final false value.

3 / 6

Diagnose before implementing

A program with top-level break and a later 1/0 returns division-by-zero. Another returns the final expression’s boolean after false && (1/0);. Locate the wrong boundary in each implementation.

4 / 6

Independent transfer

Create a nested-loop program with a returned closure capturing an outer binding. Add independent assertions for its loop total and closure result, then insert an undefined name in a skipped RHS and predict the new first failure.

5 / 6

Carry forward

Carry the single-program BC2 baseline into v5. The new risk will be relocating separately compiled artifacts, not reinterpreting existing boolean or loop semantics.

6 / 6
←/→ or click edges to navigate · ? help · N notes · F fullscreen