Category
php-in-php · runtime-shrink (#1492, peer #22701 StringUtf8Latin1 / #22683 OpensslEncrypt)
Problem
lib/JIT/Builtin/StringHex2bin.php still hand-rolls NestedJitCompileScope::run + parseAndCompile + new JIT() for Hex2binJitHelper.php. Peer runtimes route helper compile through JitVmHelperLink::ensureCompiled for consistent user-script env clearing, insert-block restore, and helper-runtime cache.
php-src reference
PHP implementation target
lib/JIT/Builtin/StringHex2bin.php — replace ensureJitHelperCompiled body with JitVmHelperLink::ensureCompiled + lookupCompiled; drop use PHPCompiler\JIT / NestedJitCompileScope
test/unit/Hex2binRuntimeShrinkTest.php — guard JitVmHelperLink::ensureCompiled, no hand-rolled NestedJitCompileScope::run / parseAndCompile / new JIT(
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/unit/Hex2binRuntimeShrinkTest.php'
make bootstrap-selfhost-vm-driver-execute-probe
Done when
Refs #1492, #14627, #22701, #22683
Category
php-in-php· runtime-shrink (#1492, peer #22701 StringUtf8Latin1 / #22683 OpensslEncrypt)Problem
lib/JIT/Builtin/StringHex2bin.phpstill hand-rollsNestedJitCompileScope::run+parseAndCompile+new JIT()forHex2binJitHelper.php. Peer runtimes route helper compile throughJitVmHelperLink::ensureCompiledfor consistent user-script env clearing, insert-block restore, and helper-runtime cache.php-src reference
PHP_FUNCTION(hex2bin)(semantics unchanged; compile-path only)PHP implementation target
lib/JIT/Builtin/StringHex2bin.php— replaceensureJitHelperCompiledbody withJitVmHelperLink::ensureCompiled+lookupCompiled; dropuse PHPCompiler\JIT/NestedJitCompileScopetest/unit/Hex2binRuntimeShrinkTest.php— guardJitVmHelperLink::ensureCompiled, no hand-rolledNestedJitCompileScope::run/parseAndCompile/new JIT(Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/unit/Hex2binRuntimeShrinkTest.php' make bootstrap-selfhost-vm-driver-execute-probeDone when
StringHex2binusesJitVmHelperLink::ensureCompiledonly for helper compilemake bootstrap-selfhost-vm-driver-execute-probegreenRefs #1492, #14627, #22701, #22683