Category
php-in-php · runtime-shrink (#1492, peer #22575 MathFrexp / #22519 MathModf / #22495 Lcg)
Problem
lib/JIT/Builtin/PowIntRuntime.php still hand-rolls NestedJitCompileScope::run + parseAndCompile + new JIT() for PowIntJitHelper.php. Peer math 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/PowIntRuntime.php — replace ensureJitHelperCompiled body with JitVmHelperLink::ensureCompiled + lookupCompiled; drop use PHPCompiler\JIT / NestedJitCompileScope
test/unit/PowIntRuntimeShrinkTest.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/PowIntRuntimeShrinkTest.php'
make bootstrap-selfhost-vm-driver-execute-probe
Done when
Refs #1492, #9515, #22575, #22519, #22495
Category
php-in-php· runtime-shrink (#1492, peer #22575 MathFrexp / #22519 MathModf / #22495 Lcg)Problem
lib/JIT/Builtin/PowIntRuntime.phpstill hand-rollsNestedJitCompileScope::run+parseAndCompile+new JIT()forPowIntJitHelper.php. Peer math runtimes route helper compile throughJitVmHelperLink::ensureCompiledfor consistent user-script env clearing, insert-block restore, and helper-runtime cache.php-src reference
pow_functioninteger fast path (semantics unchanged; compile-path only)PHP implementation target
lib/JIT/Builtin/PowIntRuntime.php— replaceensureJitHelperCompiledbody withJitVmHelperLink::ensureCompiled+lookupCompiled; dropuse PHPCompiler\JIT/NestedJitCompileScopetest/unit/PowIntRuntimeShrinkTest.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/PowIntRuntimeShrinkTest.php' make bootstrap-selfhost-vm-driver-execute-probeDone when
PowIntRuntimeusesJitVmHelperLink::ensureCompiledonly for helper compilemake bootstrap-selfhost-vm-driver-execute-probegreenRefs #1492, #9515, #22575, #22519, #22495