Category
php-in-php · runtime-shrink (#1492, peer #31403 / #31374 / #30530)
Problem
User-script strrchr() already routes through StrrchrJitHelper + StringStrrchr (__phpc_jit_strrchr, #15406). Always-on LibcExtern + Module::jitInit still register libc strrchr for every compile — same dead always-on surface #31403 removed for stat/access/lstat.
| Path |
Today |
Target |
User-script AOT strrchr() |
StrrchrJitHelper / VmString::strrchr (already) |
unchanged |
LibcExtern |
always-on strrchr |
drop row |
Module::jitInit |
always-on try/add |
drop; comment #31403 peer |
NestedJIT JitTempnamKernel |
ensureLibc already declares strrchr module-locally |
unchanged |
ReflectionSetup::shortNameFromCstr |
lookupFunction relies on always-on |
ensureLibcStrrchr module-local |
php-src reference
PHP implementation target
lib/JIT/LibcExtern.php — drop strrchr row; cite this issue
ext/standard/Module.php — drop always-on decl
lib/JIT/Builtin/ReflectionSetup.php — ensureLibcStrrchr before shortNameFromCstr lookup
test/unit/LibcExternDeadDeclsRuntimeShrinkTest.php + ModuleAlwaysOnFsDeclsRuntimeShrinkTest.php — guard the drop
Repro
./script/phpunit.sh --filter LibcExternDeadDeclsRuntimeShrinkTest
./script/phpunit.sh --filter ModuleAlwaysOnFsDeclsRuntimeShrinkTest
Done when
Refs #1492, #31403, #31374, #30530, #15406
Category
php-in-php· runtime-shrink (#1492, peer #31403 / #31374 / #30530)Problem
User-script
strrchr()already routes throughStrrchrJitHelper+StringStrrchr(__phpc_jit_strrchr, #15406). Always-onLibcExtern+Module::jitInitstill register libcstrrchrfor every compile — same dead always-on surface #31403 removed forstat/access/lstat.strrchr()StrrchrJitHelper/VmString::strrchr(already)LibcExternstrrchrModule::jitInitJitTempnamKernelensureLibcalready declaresstrrchrmodule-locallyReflectionSetup::shortNameFromCstrlookupFunctionrelies on always-onensureLibcStrrchrmodule-localphp-src reference
PHP_FUNCTION(strrchr)(semantics stay in PHP helpers; libc is thin ABI only for NestedJIT path basename)PHP implementation target
lib/JIT/LibcExtern.php— dropstrrchrrow; cite this issueext/standard/Module.php— drop always-on decllib/JIT/Builtin/ReflectionSetup.php—ensureLibcStrrchrbeforeshortNameFromCstrlookuptest/unit/LibcExternDeadDeclsRuntimeShrinkTest.php+ModuleAlwaysOnFsDeclsRuntimeShrinkTest.php— guard the dropRepro
Done when
strrchrabsent fromLibcExternspecs andModule::jitInitalways-on declsReflectionSetupdeclaresstrrchrmodule-locally;JitTempnamKernelkeep workingRefs #1492, #31403, #31374, #30530, #15406