Skip to content

Self-host M3: inventory emit driver for unit probes (retire *_m3_emit_native_entry.php) #2879

Description

@PurHur

Category

bootstrap

Milestone

M3 (emit) / M5 (honest Compiler CFG) — parent #1492. Related #3024, cleanup #3032.

Problem (updated 2026-05-30)

BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1 + strict probes:

Probe Status Log line
HelloWorld ✅ inventory compile_driver (no emit-helper TU, #2843)
Compiler unit strict ✅ inventory compile_driver (no emit-helper TU, #2879)
Compile smoke strict ✅ same
Runtime smoke strict ✅ same
JIT unit strict ❌ still jit_unit_probe_m3_emit_native_entry.php (#3026)

Remaining: wire JIT unit probe to inventory compile_driver.php, then delete dead *_m3_emit_native_entry.php files (#3032).

php-src reference

N/A (self-host bootstrap). Compiler spine must compile via native AOT without Zend — see docs/bootstrap-selfhost.md.

Repro (remaining failure)

./script/docker-exec.sh -- bash -lc '
  export BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1
  ./script/bootstrap-selfhost-jit-unit-probe.sh 2>&1 | tail -30
'

Expected: log contains inventory compile_driver (no jit_unit_probe_m3_emit_native_entry.php).
Actual: falls back to legacy emit-helper TU path; probe may pass via stub bridge but M5 honesty gate stays yellow.

Strict inventory check:

./script/docker-exec.sh -- bash -lc '
  export BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1
  make bootstrap-selfhost-jit-unit-probe 2>&1 | grep -E "inventory compile_driver|m3_emit_native_entry"
'

Scope (this repo)

Area Path Action
JIT inventory driver lib/JIT.php Route jit-unit probe through same inventory emit driver as helloworld
Probe script script/bootstrap-selfhost-jit-unit-probe.sh Stop requiring jit_unit_probe_m3_emit_native_entry.php
Inventory fixture test/selfhost/jit_unit_probe/compile_driver.php Emit driver entry for unit probe
Cleanup #3032 Delete *_m3_emit_native_entry.php after all probes green

Done (verify, do not regress)

  • lib/JIT.php inventory driver for helloworld + unit + smoke probes
  • Probe scripts mirror bootstrap-selfhost-helloworld-probe.sh

Done when

Verification

./script/docker-exec.sh -- bash -lc '
  export BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1
  make bootstrap-selfhost-jit-unit-probe
  make bootstrap-loop-probe
'

Dependencies

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    MOST IMPORTANTThis are the most important targetsarea:compilerCompiler / CFG / JITimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions