Changeset 260697 in webkit for trunk/Source/JavaScriptCore/ucd

Timestamp:
Apr 25, 2020, 2:14:11 AM (5 years ago)
Author:
Ross Kirsling
Message:

[Intl] Locale validation/canonicalization should defer to ICU
https://bugs.webkit.org/show_bug.cgi?id=210853

Reviewed by Darin Adler.

JSTests:

  • stress/intl-collator.js:
  • stress/intl-datetimeformat.js:
  • stress/intl-numberformat.js:
  • stress/intl-object.js:
  • stress/intl-pluralrules.js:
  • stress/intl-relativetimeformat.js:

Adjust tests, since one of the two fixes in r260151 no longer applies
(and certain sensitivities apply to older ICU versions).

  • test262/expectations.yaml:

Mark eight new passes, two new fails, and six changed failures.
It is an unfortunate and baffling truth that the Intl tests of test262 are often not spec tests at all,
but effectively ICU/CLDR regression tests. These are not carrots worth chasing.

Source/JavaScriptCore:

The mappings for locale canonicalization in latest CLDR are sufficiently complex
that it really no longer makes sense not to have ICU do this work for us.

This means the UTS 35 canonicalization desired by ECMA-402 will not be fully achievable until ICU ~67,
but it's better than reaching right into CLDR and pretending that we *are* ICU.
(On this point, we thus align with V8 and diverge from SM.)

Of course, we can still add our own pre-validations / post-canonicalizations if desired.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Scripts/generateIntlCanonicalizeLanguage.py: Removed.
  • runtime/IntlObject.cpp:

(JSC::intlAvailableLocales):
(JSC::intlCollatorAvailableLocales):
(JSC::canonicalizeLanguageTag):
(JSC::canonicalizeLocaleList):
(JSC::defaultLocale):
(JSC::removeUnicodeLocaleExtension):
(JSC::addMissingScriptLocales): Deleted. This one was ostensibly a fix for an old ICU bug.
(JSC::privateUseLangTag): Deleted.
(JSC::preferredLanguage): Deleted.
(JSC::preferredRegion): Deleted.
(JSC::canonicalLangTag): Deleted.

  • ucd/language-subtag-registry.txt: Removed.
File:
1 deleted

Note: See TracChangeset for help on using the changeset viewer.