Skip to content

Self-host M3: Native emit for compiler compile-smoke fixture (post-#1493) #1937

@PurHur

Description

@PurHur

Problem

#1493 targets strict HelloWorld native emit (no Zend bin/compile.php fallback). The next honest step toward #1498 / #1521 is not jumping straight to full lib/ — it is proving the self-host bundle can emit a slightly larger fixture that exercises the real compile driver (CompilerJITAOT link) beyond a one-line echo.

Today test/selfhost/compiler_compile_smoke/ (or equivalent) may still use Zend emit even when M3 run is native.

Goal

BOOTSTRAP_M3_COMPILE_SMOKE_STRICT=1 ./script/bootstrap-selfhost-compile-smoke-probe.sh
# exits 0: native binary emits + links compile-smoke output without Zend compile.php
Milestone Proves
HelloWorld strict #1493 — minimal emit
This issue Native emit for compiler_compile_smoke bundle (multi-op, still tiny)
M4 loop #1498 — rebuild next compiler tree

Implementation hints

Step Path Notes
Fixture test/selfhost/compiler_compile_smoke/main.php Grow only as M3 allowlist (#1905, #1768) permits
Probe script/bootstrap-selfhost-compile-smoke-probe.sh Mirror bootstrap-selfhost-helloworld-probe.sh
Gate BOOTSTRAP_M3_COMPILE_SMOKE_STRICT_GATE Opt-in in ci-local.sh (0); flip after green
Blockers lib/VM/HashTable.php, native runtime Same class as #1514 / #1761
Allowlist lib/JIT.php M3 batches Extend #1905 snapshot when symbols land

Acceptance criteria

Verification (local / Docker only)

make docker-build-22
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  bash -lc 'script/apply-patches.sh && BOOTSTRAP_M3_COMPILE_SMOKE_STRICT=1 ./script/bootstrap-selfhost-compile-smoke-probe.sh'

No GitHub Actions.

Dependencies

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions