Skip to content
Closed
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-05, from [`docs/status-snapshot.json`](docs/status-snapshot.json)):** self-host spine **8217** / **8217** · capability matrix **4054** rows (VM yes **4021**, JIT **1883**, AOT **1737**) · differential cases **323** · apps corpus **1**/**12** ready · VM driver probe target ~**20**ms · local CI streak **2**d ([#36401](https://github.com/PurHur/php-compiler/issues/36401))
**Snapshot (2026-09-05, from [`docs/status-snapshot.json`](docs/status-snapshot.json)):** self-host spine **8218** / **8218** · capability matrix **4054** rows (VM yes **4021**, JIT **1883**, AOT **1737**) · differential cases **324** · apps corpus **1**/**12** ready · VM driver probe target ~**20**ms · local CI streak **2**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 **8217** / **8217** ✅ · 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 **8218** / **8218** ✅ · 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** | ✅ **8217** / **8217** | Full Phase A inventory in spine smoke |
| **M2** | ✅ **8218** / **8218** | 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 **8215** / **8215**; 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 **8218** / **8218**; 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**

Expand Down
183 changes: 95 additions & 88 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 | 8217 |
| Phase A inventory files (M2 ratio SSOT) | 8217 |
| PHP files on vm.php path | 8218 |
| Phase A inventory files (M2 ratio SSOT) | 8218 |
| Phase A ratio-deferred paths | 0 |
| Source constructs flagged (blockers) | 0 |
| Source constructs flagged (warnings) | 26019 |
| Source constructs flagged (warnings) | 26021 |

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

Expand Down Expand Up @@ -7068,6 +7068,7 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
| `lib/JIT/Concern/EmitJitReturn.php` | 0 | 2 |
| `lib/JIT/Concern/InitJitMethodCall.php` | 0 | 3 |
| `lib/JIT/Concern/InitJitStaticCall.php` | 0 | 15 |
| `lib/JIT/Concern/LocalReleaseUnsetAndVarFetchDest.php` | 0 | 2 |
| `lib/JIT/Concern/M3EmitTuSidecarLinktime.php` | 0 | 2 |
| `lib/JIT/Concern/PropertyFetchCoalesceAndCompileTimeString.php` | 0 | 6 |
| `lib/JIT/Concern/PropertyIncDecCompile.php` | 0 | 19 |
Expand Down Expand Up @@ -50483,87 +50484,87 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
### `lib/JIT.php`

**Warnings** (review for bootstrap subset):
- new JIT\Call\ExternalMethod (line 363)
- new JIT\Scope (line 392)
- new Operand\Literal (line 642)
- new Operand\Literal (line 658)
- new JIT\Call\Native (line 1136)
- new Variable (line 2142)
- new JIT\Call\Native (line 2168)
- new Variable (line 2258)
- new JIT\Call\Vararg (line 2285)
- new JIT\Call\Native (line 2295)
- new JIT\Call\Native (line 2584)
- new JIT\Variable (line 2824)
- new JIT\Call\Native (line 2841)
- new JIT\Call\Native (line 2886)
- new JIT\Call\Native (line 2956)
- new JIT\Call\Native (line 2998)
- new JIT\Call\Native (line 3043)
- new JIT\Call\Native (line 3098)
- new JIT\Call\Native (line 4285)
- new JIT\Call\Native (line 4316)
- new JIT\Call\Native (line 4363)
- new JIT\Call\Native (line 4437)
- new JIT\Call\Native (line 4491)
- new JIT\Call\Native (line 4578)
- new JIT\Call\Native (line 5071)
- new JIT\Call\Native (line 5102)
- new JIT\Call\Native (line 5138)
- new JIT\Call\Native (line 5173)
- new JIT\Call\Native (line 5208)
- new JIT\Call\Native (line 5243)
- new JIT\Call\Native (line 5355)
- new JIT\Call\Native (line 5597)
- new JIT\Call\Native (line 5635)
- new JIT\Call\Native (line 5669)
- new JIT\Call\Native (line 5790)
- new JIT\Call\Native (line 6440)
- new JIT\Call\Native (line 6512)
- new Operand\Literal (line 7023)
- new Variable (line 7077)
- new Variable (line 7121)
- new Variable (line 7181)
- new Variable (line 7877)
- new Variable (line 7897)
- new Variable (line 7918)
- new Variable (line 7970)
- new JIT\Call\ForeachIndexedClosureCall (line 8452)
- new Variable (line 8541)
- new Variable (line 8571)
- new Variable (line 8590)
- new Variable (line 8620)
- new Variable (line 8657)
- new Variable (line 8677)
- new Variable (line 8690)
- new Variable (line 8733)
- new JIT\Variable (line 9523)
- new JIT\Variable (line 9586)
- new Variable (line 9686)
- new Variable (line 9730)
- new Variable (line 9782)
- new Variable (line 9793)
- new Variable (line 9804)
- new Variable (line 9824)
- new Variable (line 9887)
- new Variable (line 9950)
- new Variable (line 10020)
- new Variable (line 10051)
- new Variable (line 10119)
- new Operand\Literal (line 10128)
- new Variable (line 10143)
- new Variable (line 10477)
- new JIT\Call\VmCoerceVariableToString (line 10626)
- new JIT\Call\NoOpConstruct (line 10829)
- new Operand\Literal (line 11071)
- new VM (line 11271)
- new VM\Variable (line 11280)
- new VM\ClassEntry (line 11385)
- new Func\PHP (line 11404)
- new VM\ClassEntry (line 11450)
- new Variable (line 11467)
- new Variable (line 12672)
- 365 class method(s)
- new JIT\Call\ExternalMethod (line 366)
- new JIT\Scope (line 395)
- new Operand\Literal (line 645)
- new Operand\Literal (line 661)
- new JIT\Call\Native (line 1139)
- new Variable (line 2145)
- new JIT\Call\Native (line 2171)
- new Variable (line 2261)
- new JIT\Call\Vararg (line 2288)
- new JIT\Call\Native (line 2298)
- new JIT\Call\Native (line 2587)
- new JIT\Variable (line 2827)
- new JIT\Call\Native (line 2844)
- new JIT\Call\Native (line 2889)
- new JIT\Call\Native (line 2959)
- new JIT\Call\Native (line 3001)
- new JIT\Call\Native (line 3046)
- new JIT\Call\Native (line 3101)
- new JIT\Call\Native (line 4288)
- new JIT\Call\Native (line 4319)
- new JIT\Call\Native (line 4366)
- new JIT\Call\Native (line 4440)
- new JIT\Call\Native (line 4494)
- new JIT\Call\Native (line 4581)
- new JIT\Call\Native (line 5074)
- new JIT\Call\Native (line 5105)
- new JIT\Call\Native (line 5141)
- new JIT\Call\Native (line 5176)
- new JIT\Call\Native (line 5211)
- new JIT\Call\Native (line 5246)
- new JIT\Call\Native (line 5358)
- new JIT\Call\Native (line 5600)
- new JIT\Call\Native (line 5638)
- new JIT\Call\Native (line 5672)
- new JIT\Call\Native (line 5793)
- new JIT\Call\Native (line 6443)
- new JIT\Call\Native (line 6515)
- new Operand\Literal (line 7026)
- new Variable (line 7080)
- new Variable (line 7124)
- new Variable (line 7184)
- new Variable (line 7880)
- new Variable (line 7900)
- new Variable (line 7921)
- new Variable (line 7973)
- new JIT\Call\ForeachIndexedClosureCall (line 8455)
- new Variable (line 8544)
- new Variable (line 8574)
- new Variable (line 8593)
- new Variable (line 8623)
- new Variable (line 8660)
- new Variable (line 8680)
- new Variable (line 8693)
- new Variable (line 8736)
- new JIT\Variable (line 9526)
- new JIT\Variable (line 9589)
- new Variable (line 9689)
- new Variable (line 9733)
- new Variable (line 9785)
- new Variable (line 9796)
- new Variable (line 9807)
- new Variable (line 9827)
- new Variable (line 9890)
- new Variable (line 9953)
- new Variable (line 10023)
- new Variable (line 10054)
- new Variable (line 10122)
- new Operand\Literal (line 10131)
- new Variable (line 10146)
- new Variable (line 10480)
- new JIT\Call\VmCoerceVariableToString (line 10629)
- new JIT\Call\NoOpConstruct (line 10832)
- new Operand\Literal (line 11074)
- new VM (line 11274)
- new VM\Variable (line 11283)
- new VM\ClassEntry (line 11388)
- new Func\PHP (line 11407)
- new VM\ClassEntry (line 11453)
- new Variable (line 11470)
- new Variable (line 11637)
- 335 class method(s)
- 15 closure(s)

### `lib/JIT/Analyzer.php`
Expand Down Expand Up @@ -58180,6 +58181,12 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
- 12 class method(s)
- 1 closure(s)

### `lib/JIT/Concern/LocalReleaseUnsetAndVarFetchDest.php`

**Warnings** (review for bootstrap subset):
- trait LocalReleaseUnsetAndVarFetchDest (line 23)
- 30 class method(s)

### `lib/JIT/Concern/M3EmitTuSidecarLinktime.php`

**Warnings** (review for bootstrap subset):
Expand Down Expand Up @@ -58584,7 +58591,7 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
### `lib/JIT/DiscardedPureCallElision.php`

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

### `lib/JIT/DnfParamCheck.php`

Expand Down Expand Up @@ -59719,8 +59726,8 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
### `lib/JIT/NoThrowCallElision.php`

**Warnings** (review for bootstrap subset):
- new Operand\Literal (line 2869)
- 92 class method(s)
- new Operand\Literal (line 2959)
- 94 class method(s)

### `lib/JIT/NonObjectPropertyFetchHelper.php`

Expand Down Expand Up @@ -60074,7 +60081,7 @@ Rank live CFG gaps across inventory files: `php script/bootstrap-inventory-triag
### `lib/JIT/SpineChunkRuntimeMethodDemote.php`

**Warnings** (review for bootstrap subset):
- new OpCode (line 199)
- new OpCode (line 200)
- 11 class method(s)

### `lib/JIT/SpineChunkStandardHelperBind.php`
Expand Down
5 changes: 3 additions & 2 deletions docs/bootstrap-profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -7155,6 +7155,7 @@
"lib/JIT/Concern/EmitJitReturn.php",
"lib/JIT/Concern/InitJitMethodCall.php",
"lib/JIT/Concern/InitJitStaticCall.php",
"lib/JIT/Concern/LocalReleaseUnsetAndVarFetchDest.php",
"lib/JIT/Concern/M3EmitTuSidecarLinktime.php",
"lib/JIT/Concern/PropertyFetchCoalesceAndCompileTimeString.php",
"lib/JIT/Concern/PropertyIncDecCompile.php",
Expand Down Expand Up @@ -8451,9 +8452,9 @@
"test/bootstrap-aot/lib_opcode/main.php"
],
"totals": {
"inventory_files": 8217,
"inventory_files": 8218,
"excluded": 0,
"eligible": 8217,
"eligible": 8218,
"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:** **8215** / **8215** 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:** **8218** / **8218** 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 **8217** / **8217**.
[`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 **8218** / **8218**.

## Contributing for agents

Expand Down
Loading