# Blaise phase sync map (refreshed 2026-09-23 vs graemeg/blaise master) Blaise's plan is now **11 phases**; it is fully self-hosting (byte- for-byte fixpoint, FPC no longer required after stage 1), ships two backends (native x86-64 default, QBE opt-in), two targets (Linux + FreeBSD x86_64, bidirectional cross-compile via internal assembler/ linker), and 4977+ tests. This file compares m2compiler-V3. ## Phase table | Blaise | Blaise status | V3 | V3 status | |---|---|---|---| | 1 Bootstrap pipeline | ✅ | step 1 | ✅ | | 2 Type system (classes, records, ARC, exceptions) | ✅ | steps 2–4.3 | ✅ modulo deliberate outs (no ARC, no exceptions) | | 3 Generics + zero-GUID interfaces | ✅ | — | ❌ deliberate (R10 blueprints rejected) | | 4 OPDF debug info | ✅ | — | ❌ deferred (listing only) | | 5 Self-hosting | ✅ | step 8 | 🔄 in progress (V3 cannot yet compile its own sources; gaps below) | | 6 Language + expand RTL & StdLib | 🔄 ongoing | step 5 | 🄾 partial (`stdlib/`: SysIO, TextIO, Strings, WholeIO, Math, Files, Storage; `runtime/syslib`: SysShim, FileIO) | | 7 Native backend + internal asm/linker | ✅ | — | ❌ deliberate (QBE is terminal) | | 8 FreeBSD x86_64 target | ✅ | — | ❌ out of scope (Linux/amd64_sysv) | | 9 Windows + macOS ARM64 | ⏳ planned | — | ❌ | | 10 LSP + VS Code extension | ⏳ planned | — | ❌ | | 11 Migration analyser (FPC/Delphi) | ⏳ planned | 1.12 | ~ convergent (TopSpeed-V3 grammar, 662-file corpus parse-clean) | ## Bottom line V3 corresponds to **Blaise phases 1–2 done**, **phase 5 (self-hosting) in progress**, **phase 6 (RTL/StdLib) partial**; phases 3, 4, 7–10 are **deliberate divergences or deferrals**; phase 11 has a convergent sidecar. In raw maturity Blaise is far ahead (4977+ tests, self- hosting, two backends/targets); V3 is 103 tests and has not yet closed the self-hosting loop. ## What "in sync" means here Process, not phases: phased landings with per-step design docs (their `docs/design.adoc` → our `docs/summary_stepN.md`), test-guarded progress, QBE-first (their historical reason, ours by choice), and fixpoint verification (their 3-stage byte-identical bootstrap → our planned `bootstrap/fixpoint.sh` over `.ssa`). ## Warnings adopted from Blaise experience - **Rolling bootstrap** (`scripts/rolling-bootstrap.sh`): new parser features strand old binaries. Our `fixpoint.sh` must rebuild commit-by-commit from the last green binary, not just diff stages. - **Stabilisation cycles** (their v0.12.0): go thin-on-features and harden the suite periodically. We did this once (step 3.7); repeat before the fixpoint. - **End-to-end tests, not IR-only**: our harness has run `qbe → cc → run` since step 1 — exactly the gap graemeg closed in v0.12.0. Keep it. - **Turnkey gap**: self-hosting ≠ turnkey. V3's "done" = pinned `qbe`+`cc` plus a documented host-gm2 bootstrap, nothing else. ## Deliberate divergences (do not relitigate without cause) - No ARC/GC, no exceptions, no generics, no native backend, no second platform, no LSP: Modula-2 scope discipline, not Pascal parity. - Self-hosting last, not middle: full-language-first was locked. - Two grammars, not one: modern `M2.atg` + legacy `TopSpeed-V3-M2.atg` (1.12) — mirrors their phase-11 split and quarantines the opposite dialect decisions. ## Remaining to reach V3's phase 5 1. Named-CONST constant folding (biggest unblocker) and type-operand `TSIZE`/`SIZE` so V3 can compile `SymTab`/`QbeGen`. 2. Cross-stage `FileIO` selection (stage 1 host library, stage 2 `runtime/syslib/FileIO`). 3. `bootstrap/fixpoint.sh` (Stage1 gm2 → Stage2 V3 → Stage3 V3, byte-identical `.ssa`, suite green on all stages). ## Drift log - 2026-09-20: map created. - 2026-09-22: steps 3.5–4.3 (composites, calls, nesting, separate compilation) — Phase-2 row closed. - 2026-09-22: steps 5.1–5.7 (FFI, stdlib, module-qualified symbols, ADDRESS/Storage) — phase 6 partial. - 2026-09-22/23: steps 6.1–6.2 (built-ins, 64-bit longs), 7–7.1 (syslib port analysis + self-hosted `SysShim`/`FileIO`), 8.1 (Redux sweep + self-compile gap analysis) — phase 5 in progress. - 2026-09-23: refreshed against Blaise's 11-phase plan (was 10).