Stdlib: AOT Locale::canonicalize / locale_canonicalize (#20760)#20762
Merged
Conversation
Register locale::canonicalize proxy and extend LocaleParser bridge so user-script AOT no longer ExternalMethod-stubs or throws on locale_canonicalize. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
force-pushed
the
agent/stdlib-20760-locale-canonicalize-aot
branch
from
July 19, 2026 00:39
366cac0 to
8e65001
Compare
This was referenced Jul 19, 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
LocaleParserJitHelper/JitLocaleParser/LocaleParserwith canonicalize ABI (PHP-in-PHP, no new C).locale::canonicalizeJIT proxy so user-script AOT does not ExternalMethod-null-stub.locale_canonicalize()+LocaleCanonicalize::call()to the helper path.php-src:
ext/intl/locale/locale_methods.c(locale_canonicalize)Follow-up to #20738 / #20750 (VM landed; AOT was still stubbed).
Closes #20760
Test plan
PHP_COMPILER_PROFILE=8.4 PHP_COMPILER_HELPER_RUNTIME_O=0 php bin/compile.php -o /tmp/r test/repro/issue_20760_locale_canonicalize_aot.php && /tmp/r→canon=en_US/proc=en_US/ok(exit 0)vendor/bin/phpunit --filter "locale_canonicalize_parse|LocaleParserRuntimeShrink"→ OK (5 tests)php script/bootstrap-inventory.php --check→ OK 5818/5818;check-generated-docsOKVerification transcript
Made with Cursor