You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Self-host M3: native compile unit probe on lib/Parser.php slice #2409
M3 unit probes today cover Compiler (#2216), JIT (#2332 ✅ script), and VM (#2354 ✅ script) — but not the CFG parse front-end (PHPCfg\Parser via lib/Compiler.php → vendor ircmaxell/php-cfg). Contributors cannot tell whether native link failures are in emit/lowering vs parseStmt/parseExpr paths that block self-host on real PHP 8 syntax.
There is no test/selfhost/parser_unit_probe/ tree or bootstrap-selfhost-parser-unit-probe.sh yet (title references CFG Parser slice, not a lib/Parser.php file).
Goal
test/selfhost/parser_unit_probe/main.php — smallest honest require_once chain that loads lib/Compiler.php and exercises a fixed parse-only or compile-to-CFG path on a tiny fixture (no full spine).
Problem
M3 unit probes today cover Compiler (#2216), JIT (#2332 ✅ script), and VM (#2354 ✅ script) — but not the CFG parse front-end (
PHPCfg\Parservialib/Compiler.php→ vendorircmaxell/php-cfg). Contributors cannot tell whether native link failures are in emit/lowering vs parseStmt/parseExpr paths that block self-host on real PHP 8 syntax.There is no
test/selfhost/parser_unit_probe/tree orbootstrap-selfhost-parser-unit-probe.shyet (title references CFG Parser slice, not alib/Parser.phpfile).Goal
test/selfhost/parser_unit_probe/main.php— smallest honestrequire_oncechain that loadslib/Compiler.phpand exercises a fixed parse-only or compile-to-CFG path on a tiny fixture (no full spine).script/bootstrap-selfhost-parser-unit-probe.sh— native AOT link + run printingparser_unit_probe bundle OK(mirror Self-host M3: native compile-driver unit probe on lib/JIT.php slice #2332 / Self-host M3: native compile unit probe on lib/VM.php slice #2354).docs/bootstrap-selfhost.mdM3 probes table +make bootstrap-selfhost-parser-unit-probe.north-star3-verifystep 5, default-on flip.Implementation hints
test/selfhost/parser_unit_probe/main.phpcompiler_minimal-scale deps; addlib/Compiler.php+ lint helpers onlyvendor/ircmaxell/php-cfg/lib/PHPCfg/Parser.phpscript/apply-patches.sh— probe must run after patchesphp bin/compile.php -l/bootstrap-selfhost-compile-smoke-probe.shenvPHP_COMPILER_SELFHOST_AOT=1,BOOTSTRAP_M3_COMPILE_DRIVER_REAL_LOWERING=1when strictlib/JIT.phpisM3CompileDriverRealLoweringName()Makefilebootstrap-selfhost-parser-unit-probetargettest/unit/BootstrapParserUnitProbeTest.phpSuggested slice (first PR)
test/selfhost/parser_unit_probe/fixture.phpwith oneclass, one method, oneif— enough to hitparseStmt_*without full web stack.build/selfhost-parser-unit-probe(same pattern as jit/vm probes).PHPCfg\Parsercannot link yet, gate script with clear skip + link to Self-host: Unsupported expression CFG batch tracker (post-#2254 triage) #2301 / Self-host: Unknown Stmt Type lowering batch tracker (post-#2254 triage) #2276 triage buckets.Unblock order
Acceptance criteria
Harness (Runforge — do not use raw bind-mount
docker run):./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && ./script/bootstrap-selfhost-parser-unit-probe.sh'parser_unit_probe bundle OK.github/workflows/*changesDependencies
Links
make north-star3-verify)