php-in-php: lazy strcoll/strnatcmp from HashTable::implement (#35626) - #35626
Merged
Merged
Conversation
Defer StringStrcoll and StringNaturalCompare NestedJIT until locale/natural sort implement* methods run, so thin hello-world AOT skips those ABIs during init (peer #35614 Type::String_::implement lazy batch). Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
PurHur
added a commit
that referenced
this pull request
Aug 28, 2026
…#35392) (#35649) Move StringTriggerError declare/ensure from HashTable::implement entry to implementReadStringKeyValue only — peer #35626 strcoll lazy pattern. Scripts that use arrays but never read missing string keys skip NestedJIT trigger_error during init, reducing cold-build LLVM surface (#31894 / #32122 .1 mint class). Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
added a commit
that referenced
this pull request
Aug 29, 2026
…35747) HashTable::implement no longer calls ensureLibcStrtol on every full load; numeric-string key lookup ensures the module-local strtol(3) decl only when that path is emitted. Reduces cold-build LLVM surface for hello-world (#31894 / #32122 .1 mint class). Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StringStrcoll/StringNaturalCompareNestedJIT fromHashTable::implement()— thin hello-world AOT no longer links locale/natural sort ABIs during init.ensureStrcollAbis()/ensureNaturalCompareAbis()only from the fiveimplementSort*methods that actuallylookupFunctionstrcoll or strnatcmp (peer Self-host: sync gen-0 sidecar stamp after #35606/#35607 spine edits (#8703) #35614 Type::String_::implement lazy batch).runtime/*.c— PHP JIT bridges only.Test plan
./script/phpunit.sh --filter 'HashTableLazyStringCompareRuntimeShrinkTest|HashTableCompareRuntimeShrinkTest'→ OK (7 tests, 41 assertions)./script/aot-smoke.sh→ 8 passed, 0 failed./script/docker-exec.sh -- bash -lc 'script/cold-build-check.sh'→ ok (4s)ci-fast.shnot run (targeted gates above sufficient for lazy-init shrink)Made with Cursor