Missing implementation

Real gaps toward the self-host north star (#1492). Updated 29 May 2026 (master @ 7816b0bc; LLVM 9). May wave: closures VM+JIT (use() value/ref, indirect invoke), try/catch VM+JIT IR, generators VM-fallback, M3 inventory emit native (#3070), stdlib expansion (321 builtins). Still open: MCJIT execute (#98), generator/enum AOT, full bin/compile.php inventory path (#3024).

North star — still open

Milestone Missing Tracker
M3 native compile Native bin/compile.php emit; grow Compiler::compileCfgBlock in emit TU (smoke strict emit_path=native ✅; compileEmitSmoke routes via Compiler ([#2667](https://github.com/PurHur/php-compiler/pull/2667))) #1492, #3024
M4 bootstrap loop Gen-2→gen-3 spine 726/726 recompile ✅ (make bootstrap-loop-gen2-recompile-spine, native argv -o, no Zend on compile). Full revision: inventory argv driver compiles bin/compile.php → gen-3 ✅ (make bootstrap-selfhost-full-revision-probe, [#3058](https://github.com/PurHur/php-compiler/pull/3058)) #1492
M5 full self-host Vendor prelink 3/3 object_ok ✅; committed .o cold boot without vendor/ ✅; gen-0 seed avoids Zend on empty build/ ✅ ([#3059](https://github.com/PurHur/php-compiler/pull/3059), [#3060](https://github.com/PurHur/php-compiler/pull/3060)). Still open: compiled bin/vm.php path and retiring Zend assumptions across all bootstrap entrypoints #1492

M3 native emit spine

Smoke ladders use dedicated M3 emit helpers with native strict gates (BOOTSTRAP_M3_*_STRICT=1). Emit TU now routes compileEmitSmoke through Compiler spine ([#2667](https://github.com/PurHur/php-compiler/pull/2667)); native bin/compile.php and full Compiler::compile() remain open.

Component Status Notes
Runtime::parseAndCompileEmitSmoke Partial Lowered; depends on Compiler::compileEmitSmoke
Compiler::compileEmitSmoke Partial Routes to compileCfgBlock for trivial scripts; multi-function sources use full compile() ([#2667](https://github.com/PurHur/php-compiler/pull/2667))
Compiler::compileCfgBlock (+ callees) Curated in emit TU Compile-chain allowlist grows incrementally; full spine still LLVM 9–sensitive (track: #3024)
Native bin/compile.php emit Blocked Production driver emit still incomplete (track: #3024)
PHPCfg property typing (Script, Func) In progress Wrong slots → segfault in full compile() path
Strict gates BOOTSTRAP_M3_*_STRICT=1 Pass (smoke) HelloWorld, compile-smoke, runtime smoke, compiler-unit: emit_path=native
Inventory emit driver (BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1) Pass Thin-TU spine for emit-helper link — no argv-driver stubs ([#3070](https://github.com/PurHur/php-compiler/pull/3070), [#2540](https://github.com/PurHur/php-compiler/issues/2540))

M3 LLVM 9 deny list (link-time)

Still stubbed or PHP-only while expanding M3 real lowering (lib/JIT.php).

Symbol / path Reason
Block::slotIndexForVariableNameLLVM 9 link crash
Runtime::__destructNot on compile spine; deny-listed
Runtime::loadJitContextLLVM 9 link crash
Runtime::createJitSplit from loadJit; stubbed
Runtime::jitContextForLoadJitSplit from loadJit; stubbed
Runtime::loadJitCompileModuleFuncsNested foreach + compileFunc crash
Runtime::initParsePipeline / initCompiler / loadCoreModulesPHP CFG spine; deny during expansion
BootstrapAot\helloworld_compile_smoke (in compile driver)FUNCDEF link crash; separate emit entry

M2 spine — shim / native-floor notes

SSOT: script/bootstrap-spine-count.php726/726 Phase A files in compiler_lib_spine_smoke native link ([#2868](https://github.com/PurHur/php-compiler/issues/2868), [#2543](https://github.com/PurHur/php-compiler/issues/2543), [#2652](https://github.com/PurHur/php-compiler/issues/2652)). bin/vm.php is in the spine ([#2134](https://github.com/PurHur/php-compiler/issues/2134)); literal src/cli_driver.php; VM driver execute probe passes ([#2201](https://github.com/PurHur/php-compiler/issues/2201)). No ratio-deferred inventory paths.

Path Note
lib/AOT/Linker.php In spine smoke; external clang via shell_exec (expected M5 native floor)

Language & compiler (subset gaps)

Not full Zend parity — selected constructs still missing or VM-only. Detail: repo docs/unsupported-syntax.md.

Area VM JIT / AOT Issue
Try / catch / finally VM yes IR verify; execute → VM [#3106](https://github.com/PurHur/php-compiler/pull/3106) return-through-finally; [#3107](https://github.com/PurHur/php-compiler/pull/3107) JIT IR; bin/jit.php VM fallback ([#2114](https://github.com/PurHur/php-compiler/issues/2114))
Closures / arrow functions VM yes JIT IR [#3092](https://github.com/PurHur/php-compiler/pull/3092) indirect invoke; [#3108](https://github.com/PurHur/php-compiler/pull/3108) use(&$x); bootstrap stubs null; MCJIT execute ([#98](https://github.com/PurHur/php-compiler/issues/98), [#72](https://github.com/PurHur/php-compiler/issues/72))
Generators (yield) VM yes VM fallback [#3085](https://github.com/PurHur/php-compiler/pull/3085) keyed yield; native lowering ([#167](https://github.com/PurHur/php-compiler/issues/167), [#3074](https://github.com/PurHur/php-compiler/issues/3074))
array_map / callback builtins Closures VM String / named [#3086](https://github.com/PurHur/php-compiler/pull/3086) VM closures; JIT closure callbacks open ([#1154](https://github.com/PurHur/php-compiler/issues/1154))
Backed enums (AOT) VM No VM regression fixed ([#3091](https://github.com/PurHur/php-compiler/pull/3091)); AOT ([#1356](https://github.com/PurHur/php-compiler/issues/1356), [#3076](https://github.com/PurHur/php-compiler/issues/3076))
bin/jit.php MCJIT execute SIGSEGV IR verify passes for many scripts; runtime probe fails ([#98](https://github.com/PurHur/php-compiler/issues/98)); embed work partial on master
Method calls / class methods (general) Subset Gaps #58, #145
Namespaces + full lib/ bundle Growing Self-host #1492
External JIT object properties Stubbed #58

Vendor & infrastructure

Item Status Issue
Prelinked php-cfg / php-types / php-llvm (no Composer at cold boot) Done #3036, #3050
Attributes reflection in JIT/AOT VM v1 only #2467

← Overview · Development status · self-host-target.md (contributors)