Category
php-in-php · runtime-shrink (#1492, follow #19966 readfile / #19344 bin2hex kernel)
Problem
lib/JIT/Builtin/StringBin2hex.php still gates user-script AOT through UserScriptAotDeferNestedJit::shouldDefer() → JitBin2hexKernel. #19966 proved the same thin path can use Context::isThinStandaloneAotMain() (no defer class) while embed keeps JitVmHelperLink → Bin2hexJitHelper PHP.
php-src reference
PHP implementation target
lib/JIT/Builtin/StringBin2hex.php — remove UserScriptAotDeferNestedJit; thin hex via isThinStandaloneAotMain() + JitBin2hexKernel::emitBody; else always JitVmHelperLink::ensureBridge
test/unit/Bin2hexRuntimeShrinkTest.php — assert no defer class; thin kernel + helper bridge remain
- Optionally add
StringBin2hex::ensureStandaloneBodies to ensureMinimalUserStandaloneBodies (same as readfile)
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/Bin2hexRuntimeShrinkTest.php
vendor/bin/phpunit test/aot/AotTest.php --filter bin2hex
make bootstrap-selfhost-vm-driver-execute-probe
'
Done when
Refs #1492, #19966, #19344, #14603
Category
php-in-php· runtime-shrink (#1492, follow #19966 readfile / #19344 bin2hex kernel)Problem
lib/JIT/Builtin/StringBin2hex.phpstill gates user-script AOT throughUserScriptAotDeferNestedJit::shouldDefer()→JitBin2hexKernel.#19966proved the same thin path can useContext::isThinStandaloneAotMain()(no defer class) while embed keepsJitVmHelperLink→Bin2hexJitHelperPHP.php-src reference
PHP_FUNCTION(bin2hex)PHP implementation target
lib/JIT/Builtin/StringBin2hex.php— removeUserScriptAotDeferNestedJit; thin hex viaisThinStandaloneAotMain()+JitBin2hexKernel::emitBody; else alwaysJitVmHelperLink::ensureBridgetest/unit/Bin2hexRuntimeShrinkTest.php— assert no defer class; thin kernel + helper bridge remainStringBin2hex::ensureStandaloneBodiestoensureMinimalUserStandaloneBodies(same as readfile)Repro
Done when
UserScriptAotDeferNestedJitremoved fromStringBin2hexisThinStandaloneAotMain()+JitBin2hexKernelBin2hexJitHelperviaJitVmHelperLinkbin2hexfixtures greenmake bootstrap-selfhost-vm-driver-execute-probegreenRefs #1492, #19966, #19344, #14603