Category
Foundation · php-in-php · runtime-shrink · cold-build / #32122 .1-mint class
Problem
Type::initialize still eagerly ensureLinkeds eight file-I/O / URL runtimes on every full load path:
StringReadfile / StringFileGetContents / StringFilePutContents
MimeContentTypeRuntime / MetaTagsRuntime / StringErrorLog
GetHeadersRuntime / ParseUrlRuntime
Always-on NestedJIT of those ABIs vs Runtime owners that declare module-locally (getNamedFunction first) is the same .1 mint class as #31894 / #32122. Peer batches already dropped serialize (#34384) and strip_tags/uu/utf8 (#34414).
Call sites already (or will) ensureLinked before lookup: readfile.php, JitFileGetContents, JitFilePutContents, JitMimeContentType, JitGetMetaTags, JitErrorLog, JitGetHeaders, JitParseUrl.
php-src reference
PHP implementation target
lib/JIT/Builtin/Type.php — drop the eight eager ensureLinked calls from initialize (keep StringTime eager)
ext/standard/JitFileGetContents.php / JitFilePutContents.php — ensureLinked before __compiler_file_* lookup if missing
- Unit shrink tests mirroring
#34414
Repro / verify
./script/aot-smoke.sh
./script/phpunit.sh --filter 'TypeDeadTypeInitializeLazyFileIo|TypeDead(Readfile|FileGetContents|FilePutContents|MimeContentType|GetMetaTags|ErrorLog|GetHeaders|ParseUrl)Abi'
./script/docker-exec.sh -- bash -lc 'script/cold-build-check.sh'
Done when
Category
Foundation· php-in-php · runtime-shrink · cold-build / #32122 .1-mint classProblem
Type::initializestill eagerlyensureLinkeds eight file-I/O / URL runtimes on every full load path:StringReadfile/StringFileGetContents/StringFilePutContentsMimeContentTypeRuntime/MetaTagsRuntime/StringErrorLogGetHeadersRuntime/ParseUrlRuntimeAlways-on NestedJIT of those ABIs vs Runtime owners that declare module-locally (
getNamedFunctionfirst) is the same.1mint class as #31894 / #32122. Peer batches already dropped serialize (#34384) and strip_tags/uu/utf8 (#34414).Call sites already (or will)
ensureLinkedbefore lookup:readfile.php,JitFileGetContents,JitFilePutContents,JitMimeContentType,JitGetMetaTags,JitErrorLog,JitGetHeaders,JitParseUrl.php-src reference
ext/standard/file.c—readfile/file_get_contents/file_put_contentsext/standard/url.c—parse_url/get_headersext/standard/basic_functions.c—error_log/mime_content_type/get_meta_tagsPHP implementation target
lib/JIT/Builtin/Type.php— drop the eight eagerensureLinkedcalls frominitialize(keepStringTimeeager)ext/standard/JitFileGetContents.php/JitFilePutContents.php—ensureLinkedbefore__compiler_file_*lookup if missing#34414Repro / verify
Done when
Type::initializeno longer eagerly links the eight runtimesfile_get_contents/file_put_contents/readfile/error_log/parse_urlAOT repros still workaot-smokestays 8/8; no newlib/AOT/runtime/*.c