Runtime shrink: lazy WeakRef/GC ABIs from Refcount::implement (#35802) - #35759
Merged
Merged
Conversation
Refcount::implement no longer NestedJITs WeakRefRuntime, WeakRefNative, or GcCollectCyclesRuntime during init; only implementDelref ensures those ABIs before phpc_weakref_clear_object_typed / phpc_gc_unregister lookup. Reduces cold-build LLVM surface for hello-world (#31894 / #32122 .1 mint class). Co-authored-by: Cursor <cursoragent@cursor.com>
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
WeakRefRuntime::ensureLinked,WeakRefNative::registerDeclarations, andGcCollectCyclesRuntime::ensureDeclarationsfromRefcount::implement()— thin hello-world AOT no longer NestedJITs weakref/gc ABIs during Refcount init.ensureDelrefHelperAbis()only fromimplementDelref()beforelookupFunction('phpc_weakref_clear_object_typed')/phpc_gc_unregister/ destruct probes (peer AOT: array_column() index_key via LLVM setValueBoxKey (re-#13970) #35751 HashTable lazy strtol, php-in-php: lazy strcoll/strnatcmp from HashTable::implement (#35626) #35626 strcoll).runtime/*.c— PHP JIT bridges only.Test plan
./script/phpunit.sh --filter 'RefcountLazyWeakRefRuntimeShrinkTest|WeakRefRegistryRuntimeShrinkTest|WeakReferenceJitTest'→ OK (9 tests, 67 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