Skip to content

Self-host M3: JIT unit probe strict — inventory compile_driver (retire jit_unit_probe_m3_emit_native_entry) #3026

Description

@PurHur

Milestone

M3 (emit honesty) — parent #1492. Last open slice of #2879 / #3024. Implementation spec: #3038 (script wiring).

Problem

With BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1, HelloWorld, compiler-unit, compile-smoke, and runtime-smoke strict probes link inventory compile_driver.php only. JIT unit strict still links jit_unit_probe_m3_emit_native_entry.php (2026-05-28 probe):

bootstrap-selfhost-jit-unit-probe: native emit helper link OK (
  /compiler/build/selfhost-jit-unit-probe-emit,
  selfhost M3 emit TU (jit_unit_probe_m3_emit_native_entry.php))
bootstrap-selfhost-jit-unit-probe: OK emit_path=native …

Probe is green but not honest — duplicate emit TU blocks #3032.

Scope

Path Work
script/bootstrap-selfhost-jit-unit-probe.sh Add USE_INVENTORY_EMIT_DRIVER + INVENTORY_EMIT_DRIVER branch (copy from bootstrap-selfhost-compiler-unit-probe.sh)
test/selfhost/jit_unit_probe/compile_driver.php Ensure exists; set PHP_COMPILER_M3_SOURCE to jit_unit_probe_compile.php
Makefile bootstrap-selfhost-jit-unit-probe-strict sets BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1 (parity with helloworld target)
lib/JIT.php shouldUseM3InventoryEmitDriver() if probe env must be read at link time

Out of scope: deleting jit_unit_probe_m3_emit_native_entry.php until this is green (#3032).

Repro

./script/docker-exec.sh -- bash -lc '
  BOOTSTRAP_M3_USE_INVENTORY_EMIT_DRIVER=1 \
  BOOTSTRAP_M3_JIT_UNIT_PROBE_STRICT=1 \
  make bootstrap-selfhost-jit-unit-probe-strict 2>&1 | grep -E "inventory|emit_native_entry"
'

Done when

  • Log line contains inventory compile_driver (no emit-helper TU
  • emit_path=native unchanged (regression: jit unit probe compile OK)
  • #3038 closed; this issue closable

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions