Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<!-- status-snapshot:begin -->
<!-- generated by script/status/snapshot.php from docs/status-snapshot.json (#36395) — do not hand-edit -->
**Snapshot (2026-09-09, from [`docs/status-snapshot.json`](docs/status-snapshot.json)):** self-host spine **8591** / **8591** · capability matrix **4054** rows (VM yes **4021**, JIT **1472**, AOT **1326**) · differential cases **450** · apps corpus **1**/**12** ready · VM driver probe target ~**20**ms · local CI streak **6**d ([#36401](https://github.com/PurHur/php-compiler/issues/36401))
**Snapshot (2026-09-09, from [`docs/status-snapshot.json`](docs/status-snapshot.json)):** self-host spine **8592** / **8592** · capability matrix **4054** rows (VM yes **4021**, JIT **1472**, AOT **1326**) · differential cases **451** · apps corpus **2**/**12** ready · VM driver probe target ~**20**ms · local CI streak **6**d ([#36401](https://github.com/PurHur/php-compiler/issues/36401))

## Current implementation status

Expand All @@ -22,7 +22,7 @@
| **VM (`phpc run`)** | ✅ Production-shaped for dev/CI | Broadest language coverage; reference executor and JIT/AOT fallback |
| **AOT (`phpc build`)** | ✅ For curated subset | Standalone binaries for examples **000–009** and small CGI apps; Composer stacks tracked in [#36382](https://github.com/PurHur/php-compiler/issues/36382) / [#36380](https://github.com/PurHur/php-compiler/issues/36380) |
| **JIT (`bin/jit.php`)** | 🚧 Partial | LLVM IR for many constructs; **MCJIT execute** still flaky ([#98](https://github.com/PurHur/php-compiler/issues/98)) |
| **Self-host north star** | 🚧 | Spine **8591** / **8591** ✅ · M3 HelloWorld `emit_path=native` via gen-0 argv helper ([#22178](https://github.com/PurHur/php-compiler/issues/22178)) · `BOOTSTRAP_M4_REQUIRE_NATIVE_EMIT=1` refuses sidecar COPY ([#36146](https://github.com/PurHur/php-compiler/issues/36146)) · daily `make north-star5-verify-fast` · `--strict` only before bootstrap merges |
| **Self-host north star** | 🚧 | Spine **8592** / **8592** ✅ · M3 HelloWorld `emit_path=native` via gen-0 argv helper ([#22178](https://github.com/PurHur/php-compiler/issues/22178)) · `BOOTSTRAP_M4_REQUIRE_NATIVE_EMIT=1` refuses sidecar COPY ([#36146](https://github.com/PurHur/php-compiler/issues/36146)) · daily `make north-star5-verify-fast` · `--strict` only before bootstrap merges |

### What you can rely on today

Expand All @@ -38,7 +38,7 @@ Counts from `php script/bootstrap-spine-count.php` / `docs/status-snapshot.json`
| Milestone | Status | What it means |
|-----------|--------|----------------|
| **M0–M1** | ✅ | `compiler_minimal` + compile-smoke bundles link and run natively |
| **M2** | ✅ **8591** / **8591** | Full Phase A inventory in spine smoke |
| **M2** | ✅ **8592** / **8592** | Full Phase A inventory in spine smoke |
| **M3** | ✅ / 🚧 | HelloWorld `emit_path=native` via gen-0 argv helper ([#22178](https://github.com/PurHur/php-compiler/issues/22178)); `BOOTSTRAP_M3_REQUIRE_NATIVE_EMIT=1` refuses sidecar COPY ([#21860](https://github.com/PurHur/php-compiler/issues/21860), [#36146](https://github.com/PurHur/php-compiler/issues/36146)) |
| **M4** | 🚧 | `BOOTSTRAP_M4_REQUIRE_NATIVE_EMIT=1` refuses sidecar COPY ([#36146](https://github.com/PurHur/php-compiler/issues/36146)); default `bootstrap-loop-probe` may exit **2** when the ladder is degraded — not a false OK |
| **M5** | 🚧 | Daily: `make north-star5-verify-fast` · before bootstrap merges: `make north-star5-verify ARGS=--strict` |
Expand Down Expand Up @@ -255,7 +255,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-july-2026) for the full M0–M5 ladder. Summary: M0–M5 bootstrap gates ✅; spine **8591** / **8591**; M3 strict native + inventory argv ✅; M4 full `bootstrap-loop-probe` ✅; M5 **`north-star5-verify-fast`** (daily) ✅ — **`--strict` red at step 4a2** ([#21417](https://github.com/PurHur/php-compiler/issues/21417)) ([#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-july-2026) for the full M0–M5 ladder. Summary: M0–M5 bootstrap gates ✅; spine **8592** / **8592**; M3 strict native + inventory argv ✅; M4 full `bootstrap-loop-probe` ✅; M5 **`north-star5-verify-fast`** (daily) ✅ — **`--strict` red at step 4a2** ([#21417](https://github.com/PurHur/php-compiler/issues/21417)) ([#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**

- Running arbitrary Composer packages unmodified
Expand Down
12 changes: 9 additions & 3 deletions docs/bootstrap-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ Regenerate: `php script/bootstrap-inventory.php`

| Metric | Count |
|--------|------:|
| PHP files on vm.php path | 8591 |
| Phase A inventory files (M2 ratio SSOT) | 8591 |
| PHP files on vm.php path | 8592 |
| Phase A inventory files (M2 ratio SSOT) | 8592 |
| Phase A ratio-deferred paths | 0 |
| Source constructs flagged (blockers) | 0 |
| Source constructs flagged (warnings) | 26773 |
| Source constructs flagged (warnings) | 26774 |

## Compiler CFG gaps (`lib/Compiler.php`)

Expand Down Expand Up @@ -3266,6 +3266,7 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
| `ext/standard/JitPowIntegerEmit.php` | 0 | 1 |
| `ext/standard/JitPowIntegerEmitExponents50to69.php` | 0 | 1 |
| `ext/standard/JitPowIntegerEmitExponents70to79.php` | 0 | 1 |
| `ext/standard/JitPowIntegerEmitExponents80to91.php` | 0 | 1 |
| `ext/standard/JitPowIntegerEmitHigh.php` | 0 | 1 |
| `ext/standard/JitPowIntegerEmitLow.php` | 0 | 1 |
| `ext/standard/JitPowIntegerEmitMid.php` | 0 | 1 |
Expand Down Expand Up @@ -33769,6 +33770,11 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
**Warnings** (review for bootstrap subset):
- 1 class method(s)

### `ext/standard/JitPowIntegerEmitExponents80to91.php`

**Warnings** (review for bootstrap subset):
- 1 class method(s)

### `ext/standard/JitPowIntegerEmitHigh.php`

**Warnings** (review for bootstrap subset):
Expand Down
5 changes: 3 additions & 2 deletions docs/bootstrap-profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -3324,6 +3324,7 @@
"ext/standard/JitPowIntegerEmit.php",
"ext/standard/JitPowIntegerEmitExponents50to69.php",
"ext/standard/JitPowIntegerEmitExponents70to79.php",
"ext/standard/JitPowIntegerEmitExponents80to91.php",
"ext/standard/JitPowIntegerEmitHigh.php",
"ext/standard/JitPowIntegerEmitLow.php",
"ext/standard/JitPowIntegerEmitMid.php",
Expand Down Expand Up @@ -8825,9 +8826,9 @@
"test/bootstrap-aot/lib_opcode/main.php"
],
"totals": {
"inventory_files": 8591,
"inventory_files": 8592,
"excluded": 0,
"eligible": 8591,
"eligible": 8592,
"aot_lint_targets": 113,
"aot_link_targets": 100,
"aot_link_lib_targets": 1
Expand Down
2 changes: 1 addition & 1 deletion docs/bootstrap-selfhost.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:** **8591** / **8591** 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 **7410/7412** 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:** **8592** / **8592** 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 **7410/7412** 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

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Bench history page: [`pages/bench.html`](pages/bench.html). Do not quote a ratio

## Internals

[`architecture-review-2026-07.md`](architecture-review-2026-07.md) · [`self-host-target.md`](self-host-target.md) · [`bootstrap-m5-fast-path.md`](bootstrap-m5-fast-path.md) · ADRs under [`adr/`](adr/). Spine coverage **8590** / **8590**.
[`architecture-review-2026-07.md`](architecture-review-2026-07.md) · [`self-host-target.md`](self-host-target.md) · [`bootstrap-m5-fast-path.md`](bootstrap-m5-fast-path.md) · ADRs under [`adr/`](adr/). Spine coverage **8592** / **8592**.

## Contributing for agents

Expand Down
8 changes: 4 additions & 4 deletions docs/pages/development-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 **7410/7412** · Stdlib **7410/7412** on master ([#1380](https://github.com/PurHur/php-compiler/issues/1380)) |
| **Spine SSOT** | `php script/bootstrap-spine-count.php` → **8591** / **8591** |
| **Spine SSOT** | `php script/bootstrap-spine-count.php` → **8592** / **8592** |
| **Builtin matrix** | **1555** 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) |

Expand Down Expand Up @@ -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** — **8591/8591** ✅ (Jul 2026)
- **Literal spine ratio** — **8592/8592** ✅ (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))
Expand All @@ -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 **8591/8591** ✅; native link + lint ✅
- **Self-host M2** — spine **8592/8592** ✅; 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 M3–M5** — vendor prelink **7410/7412** ✅; **`make north-star5-verify-fast`** daily ✅; VM probe ~**20ms**. **`--strict` red** ([#21417](https://github.com/PurHur/php-compiler/issues/21417)) and **M3/M4 emit paths are prelinked blob COPIES, not native compiles** ([#21860](https://github.com/PurHur/php-compiler/issues/21860)) — the byte-identical gen-0/gen-2/gen-3 result follows from copying and is not fixpoint evidence
Expand Down Expand Up @@ -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 | ✅ **8591** / **8591** |
| **M2** — Spine toward full inventory | ✅ **8592** / **8592** |
| **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)) |
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h1>A compiler for PHP in PHP that compiles itself</h1>
<span class="badge badge--live">VM + JIT + AOT</span>
<span class="badge badge--live">Closures · try/catch</span>
<span class="badge badge--live">321 builtins</span>
<span class="badge badge--live">Spine **8591** / **8591** (1 deferred)</span>
<span class="badge badge--live">Spine **8592** / **8592** (1 deferred)</span>
<span class="badge badge--live">M5 strict ✅</span>
<span class="badge badge--live">M3 strict emit</span>
<span class="badge badge--wip">MCJIT execute</span>
Expand Down Expand Up @@ -391,7 +391,7 @@ <h2>Self-host progress</h2>
</div>
<p class="overall-progress__note">
<code>fix/spine-aot-jit-blockers</code> @ <a href="https://github.com/PurHur/php-compiler/commit/a8cffaa0e">a8cffaa0e</a> (15 Jun 2026, LLVM 9).
M2 spine SSOT: <code>php script/bootstrap-spine-count.php</code> → <strong>**8591** / **8591**</strong> Phase A inventory (literal coverage ✅).
M2 spine SSOT: <code>php script/bootstrap-spine-count.php</code> → <strong>**8592** / **8592**</strong> Phase A inventory (literal coverage ✅).
M4: <code>make bootstrap-loop-probe</code> full ladder ✅.
M5: <code>make north-star5-verify-fast</code> ✅ daily; <code>--strict</code> pre-merge; VM driver probe ~<strong>20ms</strong> in CI loops.
Remaining: MCJIT execute ([#98](https://github.com/PurHur/php-compiler/issues/98)); honest PHP <code>main()</code> in full spine AOT (native bundle-OK probe is bootstrap smoke).
Expand Down Expand Up @@ -437,7 +437,7 @@ <h4>M4</h4>
<span class="ladder__marker" aria-hidden="true">✓</span>
<h4>M5</h4>
<p>Vendor prelink <strong>7410/7410</strong> ✅; committed <code>.o</code> cold boot ✅;
<code>north-star5-verify-fast</code> ✅ daily; <code>--strict</code> pre-merge; spine <strong>**8591** / **8591**</strong>; prelinked gen-0 refreshed;
<code>north-star5-verify-fast</code> ✅ daily; <code>--strict</code> pre-merge; spine <strong>**8592** / **8592**</strong>; prelinked gen-0 refreshed;
fast VM execute probe (~20ms); compiled-only cold boot via <code>BOOTSTRAP_M5_NO_ZEND=1</code> ✅
(<a href="https://github.com/PurHur/php-compiler/issues/3053">#3053</a>,
<a href="https://github.com/PurHur/php-compiler/issues/8559">#8559</a>,
Expand Down Expand Up @@ -494,7 +494,7 @@ <h2>Get involved</h2>
<a href="capability-comparison.html">PHP compare</a> ·
<a href="https://github.com/PurHur/php-compiler/blob/master/docs/GETTING-STARTED.md">Getting started</a>
</p>
<p class="footer-meta">Site: docs/pages/ · Updated 15 Jun 2026 · Spine **8591** / **8591** · M4 loop ✅ · M5 strict ✅</p>
<p class="footer-meta">Site: docs/pages/ · Updated 15 Jun 2026 · Spine **8592** / **8592** · M4 loop ✅ · M5 strict ✅</p>
</footer>

<script src="js/main.js" defer></script>
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<main class="content" style="max-width:52rem;margin:2rem auto;padding:0 1rem">
<p><a href="index.html">← Overview</a></p>
<h1>Status snapshot</h1>
<p>Generated by <code>script/status/snapshot.php</code> from <code>docs/status-snapshot.json</code> (#36395) at <time datetime="2026-09-09T15:43:15Z">2026-09-09T15:43:15Z</time>.</p>
<p>Generated by <code>script/status/snapshot.php</code> from <code>docs/status-snapshot.json</code> (#36395) at <time datetime="2026-09-09T17:06:21Z">2026-09-09T17:06:21Z</time>.</p>
<table>
<thead><tr><th>Metric</th><th>Value</th></tr></thead>
<tbody>
<tr><td>Spine / inventory</td><td><strong>8589</strong> / <strong>8589</strong></td></tr>
<tr><td>Spine / inventory</td><td><strong>8592</strong> / <strong>8592</strong></td></tr>
<tr><td>Capability matrix rows</td><td>4054 (VM 4021 / JIT 1472 / AOT 1326)</td></tr>
<tr><td>Differential cases</td><td>450</td></tr>
<tr><td>Apps corpus ready</td><td>1 / 12</td></tr>
<tr><td>Differential cases</td><td>451</td></tr>
<tr><td>Apps corpus ready</td><td>2 / 12</td></tr>
<tr><td>VM driver probe target</td><td>~20 ms</td></tr>
</tbody>
</table>
Expand Down
Loading
Loading