Skip to content

Self-host M3: JIT unit probe inventory emit driver (#2879) - #3769

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-2879-jit-unit-inventory-emit
May 30, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-2879-jit-unit-inventory-emit

Conversation

@PurHur

@PurHur PurHur commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • JIT unit strict probe now runs inventory test/selfhost/jit_unit_probe/compile_driver.php with PHP_COMPILER_M3_COMPILE_MODE=compile + PHP_COMPILER_M3_RUNTIME_COMPILE=1 at emit runtime (was missing vs helloworld/compiler-unit probes).
  • Register jit_unit_probe/compile_driver.php M3 emit sidecar (JIT_UNIT_PROBE_COMPILE_DRIVER_SIDECAR_REL) in lib/JIT.php / M3EmitTuTrivialEchoAot.php.
  • bin/compile.php sets PHP_COMPILER_M3_EMIT_LOG_PREFIX=jit_unit_probe_m3_emit for the JIT inventory driver path.
  • Inventory mode no longer requires jit_unit_probe_m3_emit_native_entry.php on disk; compiler-unit probe gets the same compile-mode runtime env for parity.

php-src reference

N/A — bootstrap/M5 emit honesty (docs/bootstrap-selfhost.md).

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/unit/BootstrapJitUnitProbeTest.php --exclude-group llvm'

# Strict inventory emit (LLVM required):
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && \
  export BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1 && \
  make bootstrap-selfhost-jit-unit-probe-strict 2>&1 | grep -E "inventory compile_driver|emit_path=native|jit unit probe compile OK"'

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && \
  vendor/bin/phpunit test/unit/BootstrapJitUnitProbeTest.php --filter testJitUnitProbeStrictGreenWhenLlvmPresent'

Notes

Closes #2879

Made with Cursor

Wire strict JIT unit probe to inventory compile_driver.php with
PHP_COMPILER_M3_COMPILE_MODE=compile at runtime (parity with helloworld
and compiler unit probes). Register jit_unit_probe/compile_driver.php
M3 emit sidecar, set jit_unit_probe_m3_emit log prefix, and extend
BootstrapJitUnitProbeTest for inventory strict mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/issue-2879-jit-unit-inventory-emit branch from fb34f91 to 1ca93ee Compare May 30, 2026 12:36
@PurHur
PurHur merged commit e95d1ac into master May 30, 2026
@PurHur
PurHur deleted the agent/issue-2879-jit-unit-inventory-emit branch May 30, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant