Category
php-in-php · runtime-shrink (#1492, same pattern as #19389 htmlspecialchars / #19373 getenv / #19344 bin2hex)
Problem
lib/JIT/Builtin/PregMatchUserScriptLlvm.php still houses user-script AOT __compiler_preg_* stubs (~134 LOC) when UserScriptAotDeferNestedJit::shouldDefer(). Embed/full JIT already uses PregJitHelper → VmPregNative.
Same #16075 nested-helper constraint as other kernels: deferred paths cannot nested-compile PregJitHelper reliably. Keep the thin stub kernels — but move them out of lib/JIT/Builtin/ into ext/standard/ so the JIT-builtin surface shrinks.
Also restores Pillar 1 trust: master spine is missing ext/sockets/socket_select.php after #19390 (north-star5-fast / release-readiness red).
php-src reference
PHP implementation target
ext/standard/JitPregMatchKernel.php — new: emit stubs moved from PregMatchUserScriptLlvm
lib/JIT/Builtin/PregMatchRuntime.php — defer → JitPregMatchKernel::implement
- Delete
lib/JIT/Builtin/PregMatchUserScriptLlvm.php
- Update
test/unit/PregMatchUserScriptLlvmTest.php / shrink tests + spine require list
- Add missing
ext/sockets/socket_select.php to spine (trust gate)
- SSOT remains
ext/standard/PregJitHelper.php → VmPregNative
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/PregMatchUserScriptLlvmTest.php test/unit/PregMatchRuntimeShrinkTest.php
php script/check-selfhost-spine-coverage-sync.php
make bootstrap-selfhost-vm-driver-execute-probe
'
Done when
Refs #1492, #16075, #16734, #19389, #19373
Category
php-in-php· runtime-shrink (#1492, same pattern as #19389 htmlspecialchars / #19373 getenv / #19344 bin2hex)Problem
lib/JIT/Builtin/PregMatchUserScriptLlvm.phpstill houses user-script AOT__compiler_preg_*stubs (~134 LOC) whenUserScriptAotDeferNestedJit::shouldDefer(). Embed/full JIT already usesPregJitHelper→VmPregNative.Same
#16075nested-helper constraint as other kernels: deferred paths cannot nested-compilePregJitHelperreliably. Keep the thin stub kernels — but move them out oflib/JIT/Builtin/intoext/standard/so the JIT-builtin surface shrinks.Also restores Pillar 1 trust: master spine is missing
ext/sockets/socket_select.phpafter #19390 (north-star5-fast / release-readiness red).php-src reference
PHP_FUNCTION(preg_match)/ friendsPHP implementation target
ext/standard/JitPregMatchKernel.php— new: emit stubs moved fromPregMatchUserScriptLlvmlib/JIT/Builtin/PregMatchRuntime.php— defer →JitPregMatchKernel::implementlib/JIT/Builtin/PregMatchUserScriptLlvm.phptest/unit/PregMatchUserScriptLlvmTest.php/ shrink tests + spine require listext/sockets/socket_select.phpto spine (trust gate)ext/standard/PregJitHelper.php→VmPregNativeRepro
Done when
PregMatchUserScriptLlvm.phpdeletedJitPregMatchKernelinext/standard/php script/check-selfhost-spine-coverage-sync.phpgreen (includessocket_select.php)make bootstrap-selfhost-vm-driver-execute-probegreenlib/JIT/Builtin/Refs #1492, #16075, #16734, #19389, #19373