JIT: route lowered builtin class methods via VM registry (#36202) - #36293
Merged
Conversation
Resolve Class::method from the VM registry when a JIT call() override exists, and fail user-script AOT at resolve time for registered-but-unlowered methods instead of silently emitting ExternalMethod null. 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
findInternalClassMethodInVmRegistry()soresolveRegisteredInternalBuiltin()can resolveClass::methodfrom the VM registry when the handler overridesVmClassMethod::call()for JIT.PHP_COMPILER_AOT_USER_SCRIPT=1) now fails at resolve time with the method name when a registered builtin has no JIT lowering, instead of silently emittingExternalMethodnull (Self-host P0: JIT external class method calls in bundled lib (PhpParser, etc.) #579).ExternalMethod+ manifest bind (Spine split-TU is blocked on cross-chunk binding: no spine chunk compiles in isolation today #24429).Slice 1 of #36202 — allowlist deletion and moving
call()onto VM classes is follow-up work.Test plan
./script/phpunit.sh --filter ExternalMethodBindTest→ OK (15 tests, 34 assertions)./script/aot-smoke.sh→ 9 passed, 0 failedscript/differential-sweep.sh --aot --repeat 3not run (no lowering/CFG change; resolve-path only)Closes #36202
Made with Cursor