From e1f47b12791de674dd7786fbcef093a80e1f5b50 Mon Sep 17 00:00:00 2001 From: PurHur Date: Fri, 10 Jul 2026 19:05:12 +0000 Subject: [PATCH] Bootstrap: add LanguageProfileScope.php to self-host spine (#17681). #17685 introduced lib/LanguageProfileScope.php for per-unit language profile scoping but omitted it from the M2 spine bundle, leaving check-selfhost-spine-coverage-sync red (4337/4338). Co-authored-by: Cursor --- README.md | 8 +- docs/bootstrap-inventory.md | 287 +++++++++--------- docs/bootstrap-profile.json | 5 +- docs/bootstrap-selfhost.md | 2 +- docs/pages/development-status.md | 8 +- docs/pages/index.html | 12 +- docs/roadmap-wave3.md | 2 +- docs/self-host-target.md | 6 +- .../compiler_lib_spine_smoke/main.php | 1 + test/unit/BootstrapSelfhostBundleTest.php | 2 +- 10 files changed, 167 insertions(+), 166 deletions(-) diff --git a/README.md b/README.md index 5a710f95dff..8ebdc299c21 100755 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ > **Stable line (2026)** — First maintained **stable** release **[v1.0.0](https://github.com/PurHur/php-compiler/releases/tag/v1.0.0)**; **v1.1.0** prep adds M5 fast-path stability, enum/property-hook parity, `preg_match` JIT, `spl_autoload*`, and php-in-PHP JIT helpers. Demo-ready VM + AOT for a **web-capable PHP subset**, reference examples **000–009**, and an experimental **self-host** path. Not full Zend PHP compatibility — see [what’s missing](https://purhur.github.io/php-compiler/docs/pages/missing-implementation.html). -**Snapshot (Jul 2026, `master` — v1.1.0 prep):** VM + AOT for shipped examples ✅ · examples web smoke ✅ · self-host spine **4337** / **4337** · **852** builtins · M5 fast + strict ✅ · VM probe ~**20ms** +**Snapshot (Jul 2026, `master` — v1.1.0 prep):** VM + AOT for shipped examples ✅ · examples web smoke ✅ · self-host spine **4338** / **4338** · **852** builtins · M5 fast + strict ✅ · VM probe ~**20ms** --- @@ -23,7 +23,7 @@ | **AOT (`phpc build`)** | ✅ For curated subset | Standalone binaries for examples **000–009** and small CGI apps; not arbitrary Composer stacks | | **JIT (`bin/jit.php`)** | 🚧 Partial | LLVM IR for many constructs; **MCJIT execute** still flaky ([#98](https://github.com/PurHur/php-compiler/issues/98)); EH scripts VM-fallback ([#2114](https://github.com/PurHur/php-compiler/issues/2114)) | | **Language wave 3** | ✅ Closed batch | **12/12** language + **13/13** stdlib tracker items ([#1380](https://github.com/PurHur/php-compiler/issues/1380)); closures, try/catch, generators (VM), `parent::class`, backed enums (VM), intersection AOT checks | -| **Self-host north star** | ✅ ~90% | M5 fast gate green; spine **4337** / **4337**; vendor prelink **3/3** ([#1492](https://github.com/PurHur/php-compiler/issues/1492)) | +| **Self-host north star** | ✅ ~90% | M5 fast gate green; spine **4338** / **4338**; vendor prelink **3/3** ([#1492](https://github.com/PurHur/php-compiler/issues/1492)) | ### What you can rely on today @@ -40,7 +40,7 @@ Counts from `php script/bootstrap-spine-count.php` (literal `require_once` in `c | Milestone | Status | What it means | |-----------|--------|----------------| | **M0–M1** | ✅ | `compiler_minimal` + compile-smoke bundles link and run natively | -| **M2** | ✅ **4337** / **4337** | Full Phase A inventory in spine smoke; native link + lint ✅ | +| **M2** | ✅ **4338** / **4338** | Full Phase A inventory in spine smoke; native link + lint ✅ | | **M3** | ✅ | HelloWorld strict native ✅; inventory argv `bin/compile.php` ✅ | | **M4** | ✅ | `make bootstrap-loop-probe` full ladder ✅ (gen-1→gen-2→gen-3 + full-revision) | | **M5** | ✅ | `make north-star5-verify-fast` (daily); `--strict` pre-merge ✅; vendor **3/3** ✅; gen-0 sidecars refreshed | @@ -259,7 +259,7 @@ Full matrices (auto-generated): [`docs/capabilities.md`](docs/capabilities.md) ( **Self-host (experimental, not “stable app” scope)** -See [Current implementation status](#current-implementation-status-june-2026) for the full M0–M5 ladder. Summary: M0–M5 bootstrap gates ✅; spine **4337** / **4337**; M3 strict native + inventory argv ✅; M4 full `bootstrap-loop-probe` ✅; M5 **`north-star5-verify-fast`** (daily) + **`--strict`** pre-merge ✅ ([#1492](https://github.com/PurHur/php-compiler/issues/1492), [#8559](https://github.com/PurHur/php-compiler/issues/8559)). Recent: native spine bundle probe, fast VM execute smoke ([#2201](https://github.com/PurHur/php-compiler/issues/2201)), `GeneratorYieldSourceMarker` spine unit ([#10356](https://github.com/PurHur/php-compiler/pull/10356)). +See [Current implementation status](#current-implementation-status-june-2026) for the full M0–M5 ladder. Summary: M0–M5 bootstrap gates ✅; spine **4338** / **4338**; M3 strict native + inventory argv ✅; M4 full `bootstrap-loop-probe` ✅; M5 **`north-star5-verify-fast`** (daily) + **`--strict`** pre-merge ✅ ([#1492](https://github.com/PurHur/php-compiler/issues/1492), [#8559](https://github.com/PurHur/php-compiler/issues/8559)). Recent: native spine bundle probe, fast VM execute smoke ([#2201](https://github.com/PurHur/php-compiler/issues/2201)), `GeneratorYieldSourceMarker` spine unit ([#10356](https://github.com/PurHur/php-compiler/pull/10356)). **What we do not target in v1.x** diff --git a/docs/bootstrap-inventory.md b/docs/bootstrap-inventory.md index 22e20567f50..6c83c5a90ea 100644 --- a/docs/bootstrap-inventory.md +++ b/docs/bootstrap-inventory.md @@ -12,7 +12,7 @@ Regenerate: `php script/bootstrap-inventory.php` | Phase A inventory files (M2 ratio SSOT) | 4338 | | Phase A ratio-deferred paths | 0 | | Source constructs flagged (blockers) | 0 | -| Source constructs flagged (warnings) | 11692 | +| Source constructs flagged (warnings) | 11691 | ## Compiler CFG gaps (`lib/Compiler.php`) @@ -2949,7 +2949,7 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag | `lib/JIT/Builtin/EnvLocalRuntime.php` | 0 | 3 | | `lib/JIT/Builtin/EnvironMirrorUserScriptLlvm.php` | 0 | 1 | | `lib/JIT/Builtin/ErrorHandler.php` | 0 | 1 | -| `lib/JIT/Builtin/ErrorHandlerJitRuntime.php` | 0 | 3 | +| `lib/JIT/Builtin/ErrorHandlerJitRuntime.php` | 0 | 2 | | `lib/JIT/Builtin/ErrorHandlerOutput.php` | 0 | 1 | | `lib/JIT/Builtin/ErrorRaise.php` | 0 | 2 | | `lib/JIT/Builtin/ErrorReporting.php` | 0 | 1 | @@ -22584,136 +22584,136 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag - new Operand\Temporary (line 13518) - new OpCode (line 13565) - new Temporary (line 16351) -- new Operand\Temporary (line 29659) -- new Operand\Temporary (line 29664) -- new Operand\Temporary (line 29737) -- new Operand\Temporary (line 29742) -- new OpCode (line 29879) -- new OpCode (line 29946) -- new OpCode (line 30040) -- new OpCode (line 30134) -- new OpCode (line 30215) -- new OpCode (line 30300) -- new OpCode (line 30390) -- new OpCode (line 30496) -- new CfgVariable (line 32813) -- new Literal (line 32813) -- new Variable (line 32845) -- new Variable (line 32899) -- new OpCode (line 32928) -- new Operand\Temporary (line 33690) -- new OpCode (line 33692) -- new OpCode (line 33720) -- new OpCode (line 33736) -- new OpCode (line 33744) +- new Operand\Temporary (line 29674) +- new Operand\Temporary (line 29679) +- new Operand\Temporary (line 29752) +- new Operand\Temporary (line 29757) +- new OpCode (line 29894) +- new OpCode (line 29961) +- new OpCode (line 30055) +- new OpCode (line 30149) +- new OpCode (line 30230) +- new OpCode (line 30315) +- new OpCode (line 30405) +- new OpCode (line 30511) +- new CfgVariable (line 32828) +- new Literal (line 32828) +- new Variable (line 32860) +- new Variable (line 32914) +- new OpCode (line 32943) +- new Operand\Temporary (line 33705) +- new OpCode (line 33707) +- new OpCode (line 33735) - new OpCode (line 33751) -- new OpCode (line 33763) -- new OpCode (line 33780) -- new OpCode (line 33786) -- new OpCode (line 33792) -- new OpCode (line 33797) -- new OpCode (line 33813) -- new OpCode (line 33826) -- new Variable (line 33837) -- new Operand\Literal (line 33839) -- new OpCode (line 33842) -- new OpCode (line 33912) -- new OpCode (line 33923) -- new OpCode (line 33936) -- new OpCode (line 34110) -- new Operand\Variable (line 34378) -- new Operand\Literal (line 34378) -- new OpCode (line 34410) -- new OpCode (line 34432) -- new OpCode (line 34440) -- new OpCode (line 34446) -- new Variable (line 34476) -- new Temporary (line 34478) -- new Variable (line 34486) -- new Temporary (line 34488) -- new OpCode (line 34536) -- new Operand\Temporary (line 34557) -- new Operand\Temporary (line 34563) -- new Operand\Temporary (line 34569) -- new Operand\Temporary (line 34575) +- new OpCode (line 33759) +- new OpCode (line 33766) +- new OpCode (line 33778) +- new OpCode (line 33795) +- new OpCode (line 33801) +- new OpCode (line 33807) +- new OpCode (line 33812) +- new OpCode (line 33828) +- new OpCode (line 33841) +- new Variable (line 33852) +- new Operand\Literal (line 33854) +- new OpCode (line 33857) +- new OpCode (line 33927) +- new OpCode (line 33938) +- new OpCode (line 33951) +- new OpCode (line 34125) +- new Operand\Variable (line 34393) +- new Operand\Literal (line 34393) +- new OpCode (line 34425) +- new OpCode (line 34447) +- new OpCode (line 34455) +- new OpCode (line 34461) +- new Variable (line 34491) +- new Temporary (line 34493) +- new Variable (line 34501) +- new Temporary (line 34503) +- new OpCode (line 34551) +- new Operand\Temporary (line 34572) +- new Operand\Temporary (line 34578) - new Operand\Temporary (line 34584) -- new Operand\Temporary (line 36470) -- new Variable (line 36875) -- new Variable (line 36879) -- new Variable (line 36887) -- new Variable (line 36891) -- new Variable (line 37175) -- new OpCode (line 37250) -- new OpCode (line 37281) -- new OpCode (line 37329) -- new OpCode (line 37346) -- new OpCode (line 37365) -- new OpCode (line 37385) -- new OpCode (line 37427) -- new OpCode (line 37462) -- new OpCode (line 37480) -- new OpCode (line 37513) -- new OpCode (line 37554) -- new OpCode (line 37570) -- new OpCode (line 37588) -- new OpCode (line 37605) -- new OpCode (line 37619) +- new Operand\Temporary (line 34590) +- new Operand\Temporary (line 34599) +- new Operand\Temporary (line 36484) +- new Variable (line 36893) +- new Variable (line 36897) +- new Variable (line 36905) +- new Variable (line 36909) +- new Variable (line 37193) +- new OpCode (line 37268) +- new OpCode (line 37299) +- new OpCode (line 37347) +- new OpCode (line 37364) +- new OpCode (line 37383) +- new OpCode (line 37403) +- new OpCode (line 37449) +- new OpCode (line 37484) +- new OpCode (line 37502) +- new OpCode (line 37535) +- new OpCode (line 37576) +- new OpCode (line 37592) +- new OpCode (line 37610) +- new OpCode (line 37627) - new OpCode (line 37641) - new OpCode (line 37663) -- new OpCode (line 37672) -- new OpCode (line 37692) -- new OpCode (line 37769) -- new OpCode (line 37782) -- new OpCode (line 37795) -- new OpCode (line 37800) +- new OpCode (line 37685) +- new OpCode (line 37694) +- new OpCode (line 37714) +- new OpCode (line 37791) +- new OpCode (line 37804) - new OpCode (line 37817) -- new OpCode (line 37863) -- new OpCode (line 37903) -- new OpCode (line 37995) -- new OpCode (line 38034) -- new OpCode (line 38112) -- new OpCode (line 38137) -- new OpCode (line 38169) -- new OpCode (line 38241) -- new Operand\Temporary (line 39940) -- new Operand\Temporary (line 40433) -- new Operand\Temporary (line 40619) -- new Operand\Temporary (line 40651) -- new Operand\Temporary (line 40747) -- new Operand\Temporary (line 40869) -- new OpCode (line 40871) -- new OpCode (line 42249) -- new Operand\Temporary (line 42716) -- new OpCode (line 43234) -- new Operand\Literal (line 43533) -- new Variable (line 43535) -- new OpCode (line 43581) -- new OpCode (line 43796) -- new OpCode (line 43806) -- new OpCode (line 43809) -- new Operand\Temporary (line 43836) -- new Operand\Temporary (line 43873) -- new OpCode (line 43875) -- new OpCode (line 43886) -- new Operand\Temporary (line 43889) -- new OpCode (line 43891) -- new OpCode (line 43899) -- new OpCode (line 43907) -- new OpCode (line 43915) -- new OpCode (line 43918) -- new OpCode (line 43946) -- new OpCode (line 43969) -- new OpCode (line 43986) -- new OpCode (line 43993) -- new Operand\Literal (line 44682) -- new OpCode (line 45811) -- new Literal (line 45843) -- new OpCode (line 45942) -- new Variable (line 45949) -- new Temporary (line 45951) -- new OpCode (line 45954) -- new CompileFatal (line 46289) -- new CompileFatal (line 46544) +- new OpCode (line 37822) +- new OpCode (line 37839) +- new OpCode (line 37885) +- new OpCode (line 37925) +- new OpCode (line 38017) +- new OpCode (line 38056) +- new OpCode (line 38134) +- new OpCode (line 38159) +- new OpCode (line 38191) +- new OpCode (line 38263) +- new Operand\Temporary (line 39962) +- new Operand\Temporary (line 40455) +- new Operand\Temporary (line 40641) +- new Operand\Temporary (line 40673) +- new Operand\Temporary (line 40769) +- new Operand\Temporary (line 40891) +- new OpCode (line 40893) +- new OpCode (line 42271) +- new Operand\Temporary (line 42738) +- new OpCode (line 43256) +- new Operand\Literal (line 43555) +- new Variable (line 43557) +- new OpCode (line 43603) +- new OpCode (line 43818) +- new OpCode (line 43828) +- new OpCode (line 43831) +- new Operand\Temporary (line 43858) +- new Operand\Temporary (line 43895) +- new OpCode (line 43897) +- new OpCode (line 43908) +- new Operand\Temporary (line 43911) +- new OpCode (line 43913) +- new OpCode (line 43921) +- new OpCode (line 43929) +- new OpCode (line 43937) +- new OpCode (line 43940) +- new OpCode (line 43968) +- new OpCode (line 43991) +- new OpCode (line 44008) +- new OpCode (line 44015) +- new Operand\Literal (line 44704) +- new OpCode (line 45833) +- new Literal (line 45865) +- new OpCode (line 45964) +- new Variable (line 45971) +- new Temporary (line 45973) +- new OpCode (line 45976) +- new CompileFatal (line 46311) +- new CompileFatal (line 46566) - 981 class method(s) - 47 closure(s) @@ -23985,9 +23985,8 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag ### `lib/JIT/Builtin/ErrorHandlerJitRuntime.php` **Warnings** (review for bootstrap subset): -- new JIT (line 491) -- 20 class method(s) -- 2 closure(s) +- 24 class method(s) +- 1 closure(s) ### `lib/JIT/Builtin/ErrorHandlerOutput.php` @@ -24015,8 +24014,8 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag ### `lib/JIT/Builtin/ExceptionHandlerJitRuntime.php` **Warnings** (review for bootstrap subset): -- new JIT (line 500) -- 19 class method(s) +- new JIT (line 505) +- 20 class method(s) - 2 closure(s) ### `lib/JIT/Builtin/ExceptionHandlerOutput.php` @@ -27543,18 +27542,18 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag - new Call\ExceptionGetMessage (line 871) - new Call\DatePeriodCreateFromISO8601String (line 877) - new Call\DatePeriodIteratorMethod (line 879) -- new Result (line 1181) -- new Result (line 1202) -- new Variable (line 1797) -- new Variable (line 1934) -- new Variable (line 2132) -- new VMVariable (line 2290) -- new VMVariable (line 2306) -- new VMVariable (line 2312) -- new VMVariable (line 2318) -- new VMVariable (line 2329) -- new Variable (line 2359) -- new Variable (line 2399) +- new Result (line 1183) +- new Result (line 1204) +- new Variable (line 1799) +- new Variable (line 1936) +- new Variable (line 2134) +- new VMVariable (line 2292) +- new VMVariable (line 2308) +- new VMVariable (line 2314) +- new VMVariable (line 2320) +- new VMVariable (line 2331) +- new Variable (line 2361) +- new Variable (line 2401) - 98 class method(s) - 28 closure(s) diff --git a/docs/bootstrap-profile.json b/docs/bootstrap-profile.json index f96d947dba1..024ddefd57d 100644 --- a/docs/bootstrap-profile.json +++ b/docs/bootstrap-profile.json @@ -3747,6 +3747,7 @@ "lib/JIT/VmSpineSmokeNative.php", "lib/JIT/VmUnitProbeExecuteNative.php", "lib/JitMcjitEmbed.php", + "lib/LanguageProfileScope.php", "lib/LazyPropertyRejector.php", "lib/Lint/Issue.php", "lib/Lint/LintCompiler.php", @@ -4571,9 +4572,9 @@ "test/bootstrap-aot/lib_opcode/main.php" ], "totals": { - "inventory_files": 4337, + "inventory_files": 4338, "excluded": 0, - "eligible": 4337, + "eligible": 4338, "aot_lint_targets": 113, "aot_link_targets": 100, "aot_link_lib_targets": 1 diff --git a/docs/bootstrap-selfhost.md b/docs/bootstrap-selfhost.md index 0105a457fff..2497821c37f 100644 --- a/docs/bootstrap-selfhost.md +++ b/docs/bootstrap-selfhost.md @@ -2,7 +2,7 @@ **Gen-0 without Zend:** `BOOTSTRAP_M5_NO_ZEND=1 make bootstrap-selfhost-link` installs `prelinked/bootstrap-gen0/bin-compile-aot` and links `compiler_minimal` without `php bin/compile.php` ([#3053](https://github.com/PurHur/php-compiler/issues/3053)). **M5 lib spine compile:** `BOOTSTRAP_NO_ZEND_FALLBACK=1 make bootstrap-selfhost-lib-spine-smoke` (default in link script) refuses host `php bin/compile.php` on the spine emit path ([#8716](https://github.com/PurHur/php-compiler/issues/8716)). **Contributor workflow:** [bootstrap-dev-workflow.md](bootstrap-dev-workflow.md) (tiered gen-1+ path, spine checklist, CI). -**Project north star:** The **compiler fully compiles itself** — native AOT from `lib/` (no `vendor/` at cold boot), then compiles PHP and rebuilds the next compiler revision without Zend. **M2 spine:** **4337** / **4337** Phase A inventory (`php script/bootstrap-spine-count.php`; `check-selfhost-spine-coverage-sync.php`). **M5 daily gate:** `make north-star5-verify-fast` (~1–2 min) ✅; **`--strict`** (~1h) pre-merge only. Committed `prelinked/bootstrap-gen0/` sidecars + vendor **3/3** cold boot. **Hot loop:** VM driver execute probe ~**20ms**; full spine relink only with `BOOTSTRAP_VM_DRIVER_EXECUTE_PROBE_FULL_LINK=1` ([#2201](https://github.com/PurHur/php-compiler/issues/2201)). **Living tracker:** [#1492](https://github.com/PurHur/php-compiler/issues/1492) (was [#1056](https://github.com/PurHur/php-compiler/issues/1056)) · **re-root doc:** [self-host-target.md](self-host-target.md) · **generation ladder:** [bootstrap-generations.md](bootstrap-generations.md) · **M5 fast path:** [bootstrap-m5-fast-path.md](bootstrap-m5-fast-path.md) · public status: [development-status § North star](https://purhur.github.io/php-compiler/development-status.html#north-star-self-host). Parent tracking: [#78](https://github.com/PurHur/php-compiler/issues/78) (roadmap), [#212](https://github.com/PurHur/php-compiler/issues/212) (closed umbrella). +**Project north star:** The **compiler fully compiles itself** — native AOT from `lib/` (no `vendor/` at cold boot), then compiles PHP and rebuilds the next compiler revision without Zend. **M2 spine:** **4338** / **4338** Phase A inventory (`php script/bootstrap-spine-count.php`; `check-selfhost-spine-coverage-sync.php`). **M5 daily gate:** `make north-star5-verify-fast` (~1–2 min) ✅; **`--strict`** (~1h) pre-merge only. Committed `prelinked/bootstrap-gen0/` sidecars + vendor **3/3** cold boot. **Hot loop:** VM driver execute probe ~**20ms**; full spine relink only with `BOOTSTRAP_VM_DRIVER_EXECUTE_PROBE_FULL_LINK=1` ([#2201](https://github.com/PurHur/php-compiler/issues/2201)). **Living tracker:** [#1492](https://github.com/PurHur/php-compiler/issues/1492) (was [#1056](https://github.com/PurHur/php-compiler/issues/1056)) · **re-root doc:** [self-host-target.md](self-host-target.md) · **generation ladder:** [bootstrap-generations.md](bootstrap-generations.md) · **M5 fast path:** [bootstrap-m5-fast-path.md](bootstrap-m5-fast-path.md) · public status: [development-status § North star](https://purhur.github.io/php-compiler/development-status.html#north-star-self-host). Parent tracking: [#78](https://github.com/PurHur/php-compiler/issues/78) (roadmap), [#212](https://github.com/PurHur/php-compiler/issues/212) (closed umbrella). ## Current gates diff --git a/docs/pages/development-status.md b/docs/pages/development-status.md index cc8c657d269..112c4bdefb4 100644 --- a/docs/pages/development-status.md +++ b/docs/pages/development-status.md @@ -15,7 +15,7 @@ permalink: /development-status.html | **North star** | Compiler compiles itself without Zend ([#1492](https://github.com/PurHur/php-compiler/issues/1492)) | | **v1.1.0 theme** | M5 fast-path stability; enum/property hooks; `preg_match` JIT; `spl_autoload*`; php-in-PHP JIT helpers ([#78](https://github.com/PurHur/php-compiler/issues/78)) | | **Wave 3** | Language **12/12** · Stdlib **13/13** on master ([#1380](https://github.com/PurHur/php-compiler/issues/1380)) | -| **Spine SSOT** | `php script/bootstrap-spine-count.php` → **4337** / **4337** | +| **Spine SSOT** | `php script/bootstrap-spine-count.php` → **4338** / **4338** | | **Builtin matrix** | **852** functions ([`docs/capabilities.md`](https://github.com/PurHur/php-compiler/blob/master/docs/capabilities.md)) | | **Try it** | [`docs/GETTING-STARTED.md`](https://github.com/PurHur/php-compiler/blob/master/docs/GETTING-STARTED.md) | @@ -50,7 +50,7 @@ permalink: /development-status.html ### Still open (high signal) - **MCJIT execute** — `bin/jit.php -r` SIGSEGV ([#98](https://github.com/PurHur/php-compiler/issues/98)) -- **Literal spine ratio** — **4337/4337** ✅ (Jul 2026) +- **Literal spine ratio** — **4338/4338** ✅ (Jul 2026) - **Compile-spine stub retirement** — shrink `PHP_COMPILER_SELFHOST_AOT` on M3 allowlist ([#1402](https://github.com/PurHur/php-compiler/issues/1402)) - **007-ThrowsWeb AOT execute** — invalid POST segfault at runtime (link OK; slice `EXAMPLES_AOT_SMOKE_ONLY=007`) - **LLVM 14+ upgrade** — experimental `script/install-llvm14.sh` ([#174](https://github.com/PurHur/php-compiler/issues/174)) @@ -62,7 +62,7 @@ permalink: /development-status.html - **`phpc` CLI** — `run`, `serve`, `build`, `deploy`, `lint`, `test`, `init`, `doctor` - **Examples 000–009** — VM and AOT link/execute for the curated web subset - **Self-host M0** — `compiler_minimal bundle OK` ✅ -- **Self-host M2** — spine **4337/4337** ✅; native link + lint ✅ +- **Self-host M2** — spine **4338/4338** ✅; native link + lint ✅ - **Self-host M3** — HelloWorld strict `emit_path=native` ✅ ([#1493](https://github.com/PurHur/php-compiler/issues/1493)); inventory argv `bin/compile.php` ✅ ([#3024](https://github.com/PurHur/php-compiler/issues/3024) closed); compile-smoke strict native ✅ ([#1937](https://github.com/PurHur/php-compiler/issues/1937)) - **Self-host M4** — `make bootstrap-loop-probe` full ladder ✅; gen-2→gen-3 full-spine recompile ✅ - **Self-host M5** — vendor prelink **3/3** ✅; **`make north-star5-verify-fast`** daily ✅; `--strict` pre-merge; gen-0 refreshed; VM probe ~**20ms** @@ -92,7 +92,7 @@ See [`docs/bootstrap-selfhost.md`](https://github.com/PurHur/php-compiler/blob/m |-----------|--------| | **M0** — Small `lib/` bundle runs | ✅ | | **M1** — Compiler-shaped bundle + compile-smoke | ✅ | -| **M2** — Spine toward full inventory | ✅ **4337** / **4337** | +| **M2** — Spine toward full inventory | ✅ **4338** / **4338** | | **M3** — Native compiles PHP (no Zend emit) | ✅ Smoke + inventory argv driver strict native | | **M4** — Bootstrap loop (next revision) | ✅ `bootstrap-loop-probe` full ladder | | **M5** — Full self-host, no `vendor/` cold boot | ✅ Presenter strict + compiled-only empty `build/` cold boot ([#3053](https://github.com/PurHur/php-compiler/issues/3053)) | diff --git a/docs/pages/index.html b/docs/pages/index.html index 8a0d1a0ba9e..a271f50ce38 100644 --- a/docs/pages/index.html +++ b/docs/pages/index.html @@ -70,7 +70,7 @@

A compiler for PHP in PHP that compiles itself

VM + JIT + AOT Closures · try/catch 321 builtins - Spine **4337** / **4337** + Spine **4338** / **4338** M5 strict ✅ M3 strict emit MCJIT execute @@ -386,12 +386,12 @@

Self-host progress

Toward full self-host (M5) 100% -
+

fix/spine-aot-jit-blockers @ a8cffaa0e (15 Jun 2026, LLVM 9). - M2 spine SSOT: php script/bootstrap-spine-count.php → **4337** / **4337** Phase A inventory (literal coverage ✅). + M2 spine SSOT: php script/bootstrap-spine-count.php → **4338** / **4338** Phase A inventory (literal coverage ✅). M4: make bootstrap-loop-probe full ladder ✅. M5: make north-star5-verify-fast ✅ daily; --strict pre-merge; VM driver probe ~20ms in CI loops. Remaining: MCJIT execute ([#98](https://github.com/PurHur/php-compiler/issues/98)); honest PHP main() in full spine AOT (native bundle-OK probe is bootstrap smoke). @@ -416,7 +416,7 @@

M0–M1

  • M2

    -

    Spine **4337** / **4337** Phase A inventory — literal coverage ✅; native link + lint ✅ +

    Spine **4338** / **4338** Phase A inventory — literal coverage ✅; native link + lint ✅ (#8559).

  • @@ -437,7 +437,7 @@

    M4

    M5

    Vendor prelink 3/3 ✅; committed .o cold boot ✅; - north-star5-verify-fast ✅ daily; --strict pre-merge; spine **4337** / **4337**; prelinked gen-0 refreshed; + north-star5-verify-fast ✅ daily; --strict pre-merge; spine **4338** / **4338**; prelinked gen-0 refreshed; fast VM execute probe (~20ms); compiled-only cold boot via BOOTSTRAP_M5_NO_ZEND=1 ✅ (#3053, #8559, @@ -494,7 +494,7 @@

    Get involved

    PHP compare · Getting started

    - + diff --git a/docs/roadmap-wave3.md b/docs/roadmap-wave3.md index d032b69101e..c7b87d6eae8 100644 --- a/docs/roadmap-wave3.md +++ b/docs/roadmap-wave3.md @@ -19,7 +19,7 @@ Regenerate capability truth: `php script/capability-matrix.php`, `php script/cap Related merges outside this wave: `goto` ([#1228](https://github.com/PurHur/php-compiler/issues/1228) / [#1333](https://github.com/PurHur/php-compiler/pull/1333)), anonymous classes ([#1233](https://github.com/PurHur/php-compiler/issues/1233) / [#1386](https://github.com/PurHur/php-compiler/pull/1386)). -**M2 spine:** **4337** / **4337** (`php script/bootstrap-spine-count.php`) — full Phase A inventory in `compiler_lib_spine_smoke`; coverage sync ✅ (`check-selfhost-spine-coverage-sync.php`). Native spine **link** + **lint** ✅ ([#2134](https://github.com/PurHur/php-compiler/issues/2134), [#8559](https://github.com/PurHur/php-compiler/issues/8559)). **M5 daily gate:** `make north-star5-verify-fast` + VM probe ~20ms ([#2201](https://github.com/PurHur/php-compiler/issues/2201)); `--strict` pre-merge only. M4 gen-2→gen-3 recompile ✅. Target doc: [self-host-target.md](self-host-target.md) +**M2 spine:** **4338** / **4338** (`php script/bootstrap-spine-count.php`) — full Phase A inventory in `compiler_lib_spine_smoke`; coverage sync ✅ (`check-selfhost-spine-coverage-sync.php`). Native spine **link** + **lint** ✅ ([#2134](https://github.com/PurHur/php-compiler/issues/2134), [#8559](https://github.com/PurHur/php-compiler/issues/8559)). **M5 daily gate:** `make north-star5-verify-fast` + VM probe ~20ms ([#2201](https://github.com/PurHur/php-compiler/issues/2201)); `--strict` pre-merge only. M4 gen-2→gen-3 recompile ✅. Target doc: [self-host-target.md](self-host-target.md) ## Language (#1354–#1366) diff --git a/docs/self-host-target.md b/docs/self-host-target.md index c4c05ab2040..d98c9880e67 100644 --- a/docs/self-host-target.md +++ b/docs/self-host-target.md @@ -35,7 +35,7 @@ That is **M5**. Everything below is the honest path from today’s bootstrap to |-------|-------|--------| | **Bootstrap driver** | Prelinked gen-0 refreshed via honest inventory argv emit; native `build/bin-compile-aot-inventory` for M4/M5 | Compiled `bin/compile.php` only | | **Bundle size** | **2643** literal Phase A inventory in spine smoke | Full vm.php closure | -| **Inventory coverage** | **4337** / **4337** ✅ | Full closure | +| **Inventory coverage** | **4338** / **4338** ✅ | Full closure | | **HelloWorld** | Strict probe **emit_path=native** ✅ | Native compile for arbitrary PHP | | **Bootstrap loop (M4)** | `make bootstrap-loop-probe` full ladder ✅ — gen-1→gen-2, gen-2→gen-3 full spine, full-revision argv | Native full revision rebuild | | **Vendor** | **3/3** vendor `object_ok`; committed `.o` cold boot without `vendor/` ✅; `make north-star5-verify-fast` daily; `--strict` pre-merge ✅ | No Zend `vendor/autoload.php` at bootstrap | @@ -68,7 +68,7 @@ That is **M5**. Everything below is the honest path from today’s bootstrap to |-----------|----------------|--------|-----| | **M0** | AOT can link a **small** honest `lib/` subset | ✅ | 100% | | **M1** | Bundle is **compiler-shaped** (lint + compile-smoke) | ✅ | 100% | -| **M2** | Spine grows toward full `bin/vm.php` inventory | ✅ **4337** / **4337** | **100%** | +| **M2** | Spine grows toward full `bin/vm.php` inventory | ✅ **4338** / **4338** | **100%** | | **M3** | Self-host binary **compiles external PHP** (HelloWorld) without Zend emit | ✅ strict **native** + inventory argv | **~85%** | | **M4** | Self-host binary **rebuilds** the next compiler tree | ✅ full `bootstrap-loop-probe` ladder | **~90%** | | **M5** | Full self-host; Zend retired from loop | ✅ `north-star5-verify-fast` daily + `--strict` pre-merge; `BOOTSTRAP_M5_NO_ZEND=1` empty `build/` ([#3053](https://github.com/PurHur/php-compiler/issues/3053)) | **~90%** | @@ -79,7 +79,7 @@ That is **M5**. Everything below is the honest path from today’s bootstrap to | Indicator | Formula | Jun 2026 | |-----------|---------|----------| -| **M2 spine progress** | `require_once` units in `compiler_lib_spine_smoke` ÷ Phase A inventory file count | **4337** / **4337** (`php script/bootstrap-spine-count.php`) | +| **M2 spine progress** | `require_once` units in `compiler_lib_spine_smoke` ÷ Phase A inventory file count | **4338** / **4338** (`php script/bootstrap-spine-count.php`) | | **Public “Self-host” row** | Same M2 ratio until M3–M5 gates add weight ([`development-status.md`](pages/development-status.md)) | **~97%** | | **M5 vendor prelink** | `object_ok` packages ÷ 3 | **3 / 3** (cfg, types, llvm) | | **Composite (internal)** | Milestone weights in table above (M0–M1 = 100%, M2 = spine %, M3–M5 = gate %) | **~90%** | diff --git a/test/selfhost/compiler_lib_spine_smoke/main.php b/test/selfhost/compiler_lib_spine_smoke/main.php index 93cb27f1e64..26b3142a32e 100644 --- a/test/selfhost/compiler_lib_spine_smoke/main.php +++ b/test/selfhost/compiler_lib_spine_smoke/main.php @@ -4396,4 +4396,5 @@ require_once __DIR__.'/../../../ext/dom/TextIsElementContentWhitespace.php'; require_once __DIR__.'/../../../ext/dom/TextIsWhitespaceInElementContent.php'; require_once __DIR__.'/../../../lib/VM/NativeDateInvalidOperationException.php'; +require_once __DIR__.'/../../../lib/LanguageProfileScope.php'; echo "compiler_lib_spine_smoke bundle OK\n"; diff --git a/test/unit/BootstrapSelfhostBundleTest.php b/test/unit/BootstrapSelfhostBundleTest.php index 9907f001d62..8154cd6b1cb 100644 --- a/test/unit/BootstrapSelfhostBundleTest.php +++ b/test/unit/BootstrapSelfhostBundleTest.php @@ -511,7 +511,7 @@ public function testCompilerLibSpineSmokeBundleUnitCountAndKeyUnits(): void $this->assertFileExists($entry); $contents = (string) file_get_contents($entry); $count = bootstrap_spine_counts(self::$root)['spine']; - $this->assertSame(4337, $count, 'M2 spine require_once units track Phase A inventory (#8559, #9234, #11629)'); + $this->assertSame(4338, $count, 'M2 spine require_once units track Phase A inventory (#8559, #9234, #11629)'); foreach (self::LIB_SPINE_SMOKE_NEW_UNITS as $unit) { $this->assertStringContainsString( "require_once __DIR__.'/../../../{$unit}';",