Skip to content

php-in-php: lazy stdlib string/file helpers from Type::String_::implement (#35613) - #35613

Merged
PurHur merged 1 commit into
masterfrom
agent/runtime-shrink-string-implement-lazy-35613
Aug 28, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/runtime-shrink-string-implement-lazy-35613

Conversation

@PurHur

@PurHur PurHur commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

Continues the #32122 / .1 mint class runtime-shrink ladder (peer #35609): drop 21 eager ::implement() calls from Type\String_::implement() for stdlib string/file helpers whose ext/ and Jit* call sites already ensureLinked before lookup.

Removed from full Type init NestedJIT:

  • htmlspecialchars/decode, preg_quote, add/stripslashes, urlencode/decode, nl2br, ucwords
  • random_bytes, serialize/unserialize, http_build_query, parse_str
  • deploy path, readfile, file_get/get/put contents, mime_content_type, meta tags, get_browser

Left eager: StringBitwiseNot (Helper emits inline — needs call-site ensureLinked first, #35301), IniSet/IniGet/ErrorReporting (JitIni get/set + JitErrorReporting still lookup without ensureLinked, #34848), date/time batch (peer #34241).

No new runtime/*.cRUNTIME_C_SOURCES stays empty.

Root cause

Eager NestedJIT during Type\String_::implement() on the full JIT load path mints duplicate ABI symbols (*.1) when Runtime and Context both link the same helper (#31894 / #32122).

Test plan

./script/phpunit.sh --filter TypeStringImplementLazyStdlibRuntimeShrinkTest
# OK (3 tests, 76 assertions)

./script/aot-smoke.sh
# aot-smoke: 8 passed, 0 failed

./script/docker-exec.sh -- bash -lc './script/cold-build-check.sh'
# cold-build-check: ok — clean-checkout compile of hello world took 3s (budget 120s)

Not run: full ci-fast.sh, differential sweep, north-star5-verify-fast (compile-spine stub audit already 0/0 stubbed; change is lazy-link only on full Type init path).

Made with Cursor

…ment (#35613)

Drop 21 eager NestedJIT calls during full Type init; ext/standard and Jit*
call sites already ensureLinked. Reduces .1 ABI mint risk on hello-world and
other scripts that never touch those builtins (peer #35609).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 3d6a9a0 into master Aug 28, 2026
1 check failed
@PurHur
PurHur deleted the agent/runtime-shrink-string-implement-lazy-35613 branch August 28, 2026 10:06
PurHur added a commit that referenced this pull request Aug 31, 2026
… (#36102)

TypeDeadHttpBuildQueryAbiRuntimeShrinkTest still expected eager
StringHttpBuildQuery::implement in Type\String_::implement after #35613
moved http_build_query to call-site ensureLinked. Assert lazy wiring instead.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant