diff --git a/README.md b/README.md index 2c149ec5ccf..a5a9afd8c62 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 **3670**/**3670** · **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 **3673**/**3673** · **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 **3670**/**3670**; vendor prelink **3/3** ([#1492](https://github.com/PurHur/php-compiler/issues/1492)) | +| **Self-host north star** | ✅ ~90% | M5 fast gate green; spine **3673**/**3673**; 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** | ✅ **3670**/**3670** | Full Phase A inventory in spine smoke; native link + lint ✅ | +| **M2** | ✅ **3673**/**3673** | 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 **3670**/**3670**; 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 **3673**/**3673**; 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 85a6ddc3160..b96d43a5054 100644 --- a/docs/bootstrap-inventory.md +++ b/docs/bootstrap-inventory.md @@ -8,11 +8,11 @@ Regenerate: `php script/bootstrap-inventory.php` | Metric | Count | |--------|------:| -| PHP files on vm.php path | 3672 | -| Phase A inventory files (M2 ratio SSOT) | 3672 | +| PHP files on vm.php path | 3673 | +| Phase A inventory files (M2 ratio SSOT) | 3673 | | Phase A ratio-deferred paths | 0 | | Source constructs flagged (blockers) | 0 | -| Source constructs flagged (warnings) | 10005 | +| Source constructs flagged (warnings) | 10007 | ## Compiler CFG gaps (`lib/Compiler.php`) @@ -2386,6 +2386,7 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag | `lib/Compiler/TypedClassConstInheritCheck.php` | 0 | 5 | | `lib/CompilerVersion.php` | 0 | 1 | | `lib/CurlyBraceOffsetRejector.php` | 0 | 2 | +| `lib/DnfParenIntersectionSyntaxRejector.php` | 0 | 2 | | `lib/DnfType.php` | 0 | 2 | | `lib/Doctor.php` | 0 | 1 | | `lib/EncapsedCoalesceRejector.php` | 0 | 2 | @@ -18461,7 +18462,7 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag ### `lib/Ast/DnfParenTypeRewriter.php` **Warnings** (review for bootstrap subset): -- 12 class method(s) +- 15 class method(s) ### `lib/Ast/EncapsedCoalesceDesugar.php` @@ -19376,7 +19377,7 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag ### `lib/CompilerVersion.php` **Warnings** (review for bootstrap subset): -- 71 class method(s) +- 72 class method(s) ### `lib/CurlyBraceOffsetRejector.php` @@ -19384,6 +19385,12 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag - new CompileFatal (line 67) - 8 class method(s) +### `lib/DnfParenIntersectionSyntaxRejector.php` + +**Warnings** (review for bootstrap subset): +- new CompileFatal (line 28) +- 1 class method(s) + ### `lib/DnfType.php` **Warnings** (review for bootstrap subset): @@ -24137,14 +24144,14 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag - new ext\standard\Module (line 242) - new JIT (line 318) - new JITContext (line 332) -- new SealedClassPreprocessor (line 375) -- new StaticClassPreprocessor (line 378) -- new SourcePreprocessor\PropertyHooks (line 381) -- new State (line 504) -- new ReflectionProperty (line 531) -- new ReflectionProperty (line 534) -- new LintCompiler (line 925) -- new Variable (line 1052) +- new SealedClassPreprocessor (line 376) +- new StaticClassPreprocessor (line 379) +- new SourcePreprocessor\PropertyHooks (line 382) +- new State (line 505) +- new ReflectionProperty (line 532) +- new ReflectionProperty (line 535) +- new LintCompiler (line 926) +- new Variable (line 1053) - 53 class method(s) ### `lib/RuntimeStrictness.php` diff --git a/docs/bootstrap-profile.json b/docs/bootstrap-profile.json index e65646abc23..6f5e37a32cf 100644 --- a/docs/bootstrap-profile.json +++ b/docs/bootstrap-profile.json @@ -3900,9 +3900,9 @@ "test/bootstrap-aot/lib_opcode/main.php" ], "totals": { - "inventory_files": 3670, + "inventory_files": 3673, "excluded": 0, - "eligible": 3670, + "eligible": 3673, "aot_lint_targets": 111, "aot_link_targets": 98, "aot_link_lib_targets": 1 diff --git a/docs/bootstrap-selfhost.md b/docs/bootstrap-selfhost.md index 18b82c7700f..375875479b2 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)). -**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:** **3670** / **3670** 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:** **3673** / **3673** 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 f46fb18c511..046a26f5064 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` → **3670** / **3670** | +| **Spine SSOT** | `php script/bootstrap-spine-count.php` → **3673** / **3673** | | **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** — **3670/3670** ✅ (Jul 2026) +- **Literal spine ratio** — **3673/3673** ✅ (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 **3670/3670** ✅; native link + lint ✅ +- **Self-host M2** — spine **3673/3673** ✅; 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** diff --git a/docs/pages/index.html b/docs/pages/index.html index 191eb712ffe..3d03fb534a7 100644 --- a/docs/pages/index.html +++ b/docs/pages/index.html @@ -70,7 +70,7 @@
fix/spine-aot-jit-blockers @ a8cffaa0e (15 Jun 2026, LLVM 9).
- M2 spine SSOT: php script/bootstrap-spine-count.php → **3670**/**3670** Phase A inventory (literal coverage ✅).
+ M2 spine SSOT: php script/bootstrap-spine-count.php → **3673**/**3673** 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 @@
Spine **3670**/**3670** Phase A inventory — literal coverage ✅; native link + lint ✅ +
Spine **3673**/**3673** Phase A inventory — literal coverage ✅; native link + lint ✅ (#8559).
Vendor prelink 3/3 ✅; committed .o cold boot ✅;
- north-star5-verify-fast ✅ daily; --strict pre-merge; spine **3670**/**3670**; prelinked gen-0 refreshed;
+ north-star5-verify-fast ✅ daily; --strict pre-merge; spine **3673**/**3673**; 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 @@