Category
php-in-php · runtime-shrink (#1492, peer #30530 / #31374)
Problem
User-script file_exists / is_* / stat paths already route through StatPathJitHelper + JitStatPathKernel / JitStatKernel (#23297 / #27013). Always-on LibcExtern + Module::jitInit still register libc stat/access/lstat for every compile — same dead always-on surface #31374 removed for chmod/mkdir and #30530 removed for unlink/realpath/….
| Path |
Today |
Target |
| User-script AOT path predicates / fields |
PHP helpers + JitStatKernel (already) |
unchanged |
LibcExtern |
always-on stat/access/lstat |
drop rows |
Module::jitInit |
always-on try/add |
drop; comment #30530/#31374 peer |
NestedJIT JitStatKernel |
lookupFunction relies on always-on |
module-local ensureLibcStat |
TouchLibcRuntime / FtokRuntime / JitFsGlobKernel |
lookup assumes always-on |
ensure module-locally (Ftok already has ensureLibcStat) |
php-src reference
PHP implementation target
lib/JIT/LibcExtern.php — drop stat/access/lstat rows; cite this issue
ext/standard/Module.php — drop always-on decls
ext/standard/JitStatKernel.php — ensureLibcStat before mode/access/longField
lib/JIT/Builtin/TouchLibcRuntime.php / FtokRuntime.php / ext/standard/JitFsGlobKernel.php — ensure before lookup
test/unit/LibcExternDeadDeclsRuntimeShrinkTest.php, ModuleAlwaysOnFsDeclsRuntimeShrinkTest.php, StatPathRuntimeShrinkTest.php
Repro / verify
./script/phpunit.sh --filter 'LibcExternDeadDeclsRuntimeShrinkTest|ModuleAlwaysOnFsDeclsRuntimeShrinkTest|StatPathRuntimeShrinkTest|FtokRuntimeShrinkTest|TouchRuntimeShrinkTest'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r "var_export(file_exists(__FILE__));"'
Done when
Refs #1492, #30530, #31374, #23297, #27013
Category
php-in-php· runtime-shrink (#1492, peer #30530 / #31374)Problem
User-script
file_exists/is_*/statpaths already route throughStatPathJitHelper+JitStatPathKernel/JitStatKernel(#23297 / #27013). Always-onLibcExtern+Module::jitInitstill register libcstat/access/lstatfor every compile — same dead always-on surface #31374 removed forchmod/mkdirand #30530 removed forunlink/realpath/….JitStatKernel(already)LibcExternstat/access/lstatModule::jitInitJitStatKernellookupFunctionrelies on always-onensureLibcStatTouchLibcRuntime/FtokRuntime/JitFsGlobKernelensureLibcStat)php-src reference
php_stat/php_access(semantics stay in PHP helpers; libc is thin ABI only)PHP implementation target
lib/JIT/LibcExtern.php— dropstat/access/lstatrows; cite this issueext/standard/Module.php— drop always-on declsext/standard/JitStatKernel.php—ensureLibcStatbefore mode/access/longFieldlib/JIT/Builtin/TouchLibcRuntime.php/FtokRuntime.php/ext/standard/JitFsGlobKernel.php— ensure before lookuptest/unit/LibcExternDeadDeclsRuntimeShrinkTest.php,ModuleAlwaysOnFsDeclsRuntimeShrinkTest.php,StatPathRuntimeShrinkTest.phpRepro / verify
Done when
LibcExtern/Moduleno longer always-declarestat/access/lstatRefs #1492, #30530, #31374, #23297, #27013