Category
bug · php-in-php · Trust / #32122 .1 mint class · ensureFullStandaloneBodies shrink
Problem
Context::ensureFullStandaloneBodies still NestedJITs StringFormat (__compiler_sprintf / __compiler_printf / __compiler_number_format) during full standalone init. Thin hello-world and scripts that never call sprintf()/printf()/number_format() pay that NestedJIT — leftover Context NestedJIT vs Runtime ABI drift mints sprintf.1 / printf.1 / number_format.1 (#31894 / #32122).
Call sites already implementIfDeclared / ensureLinked before lookup:
ext/standard/JitSprintf.php, JitPrintf.php, JitNumberFormat.php, JitFprintf.php, JitVfprintf.php, JitVsprintf.php
vprintf_.php / vfprintf_.php
lib/JIT/Builtin/PregMatchRuntime.php, StringOpendir.php
Peer ensureFull drops: #35127 Getenv, #35113 RandomBytes, #35099 ExceptionBridge, #35089 Utf8/Define/…, #35086 Stream*, #35065 Json/Offset, #35073 Assert/Gc.
php-src reference
PHP implementation target
lib/JIT/Context.php — remove StringFormat::ensureStandaloneBodies from ensureFullStandaloneBodies
- Document lazy-full on
StringFormat.php
- Guard test peer
#35127 shape; update peer shrink tests that still assert Format stays
- No new
runtime/*.c
Repro / verify
./script/aot-smoke.sh
./script/phpunit.sh --filter 'ContextFullStandaloneLazyStringFormatShrinkTest|ContextFullStandaloneLazyGetenvShrinkTest|TypeDeadFormatAbiRuntimeShrinkTest|StringFormatRuntimeStandaloneTest'
./script/docker-exec.sh -- bash -lc 'php bin/compile.php -o /tmp/hw.bin -r "echo \"hi\";" && /tmp/hw.bin'
./script/docker-exec.sh -- bash -lc 'php bin/compile.php -o /tmp/sf.bin -r "echo sprintf(\"%s\", \"ok\");" && /tmp/sf.bin'
Done when
Parent
Category
bug· php-in-php · Trust / #32122.1mint class · ensureFullStandaloneBodies shrinkProblem
Context::ensureFullStandaloneBodiesstill NestedJITsStringFormat(__compiler_sprintf/__compiler_printf/__compiler_number_format) during full standalone init. Thin hello-world and scripts that never callsprintf()/printf()/number_format()pay that NestedJIT — leftover Context NestedJIT vs Runtime ABI drift mintssprintf.1/printf.1/number_format.1(#31894 / #32122).Call sites already
implementIfDeclared/ensureLinkedbefore lookup:ext/standard/JitSprintf.php,JitPrintf.php,JitNumberFormat.php,JitFprintf.php,JitVfprintf.php,JitVsprintf.phpvprintf_.php/vfprintf_.phplib/JIT/Builtin/PregMatchRuntime.php,StringOpendir.phpPeer ensureFull drops: #35127 Getenv, #35113 RandomBytes, #35099 ExceptionBridge, #35089 Utf8/Define/…, #35086 Stream*, #35065 Json/Offset, #35073 Assert/Gc.
php-src reference
ext/standard/formatted_print.c—PHP_FUNCTION(sprintf)/printf/number_formatPHP implementation target
lib/JIT/Context.php— removeStringFormat::ensureStandaloneBodiesfromensureFullStandaloneBodiesStringFormat.php#35127shape; update peer shrink tests that still assert Format staysruntime/*.cRepro / verify
Done when
ensureFullStandaloneBodiesdoes not NestedJIT StringFormat./script/aot-smoke.shstays 8/8hi;sprintf("%s","ok")AOT printsokParent