v8/test/intl
Jakob Gruber 6fbb8bc806 [intl] A fast path for Intl::CompareStrings
Certain collators and subject strings may take this new fast
path without calling into the (slow) ICU comparison functions.

This CL can be roughly split into three topics:
1. The fast path check, precomputed and implemented as a whitelist
   on the current locale string.
2. The actual fast path, which checks subject string eligibility
   and performs L1 and L3 collation weight comparisons all in one pass.
3. Resuming from an aborted fast-path into the generic path.

A longer overview is available at
https://docs.google.com/document/d/1oyDwjYn2JyHsx2YnJJKhjX0WMNQXb8ao86-DRzqiYNg/edit?usp=sharing

JetStream2/cdjs scores improve by roughly 40%.

Bug: v8:12196
Change-Id: I5e1bbd731a36c361af9667f9104d6fa15c42e117
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149463
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77284}
2021-10-07 12:35:29 +00:00
..
bigint [Intl] Clean up by removing the following flags 2019-09-12 22:25:41 +00:00
break-iterator [Intl] Remove --harmony-intl-list-format flag from test 2019-02-13 23:22:43 +00:00
collator Add "collation" option to Intl.Collator 2020-07-21 18:32:22 +00:00
date-format Implement "Extend TimeZoneName Option Proposal" 2021-05-27 08:49:22 +00:00
displaynames Implement DisplayNames v2 2021-06-08 17:49:36 +00:00
enumeration [intl] Implement Intl Enumeration API 2021-08-12 18:00:54 +00:00
general [Intl] Update ICU to 69-1 2021-04-20 22:37:09 +00:00
list-format Implement GetOptionsObject/CoerceOptionsToObject 2021-02-26 22:45:22 +00:00
locale [intl] Implement Intl Enumeration API 2021-08-12 18:00:54 +00:00
localematcher Reland "[intl] Improve test coverage of "best fit" localeMatcher" 2021-06-21 17:37:31 +00:00
number-format [intl] Implement ECMA402 PR500 Use OrdinaryHasInstance 2021-01-25 22:33:04 +00:00
overrides Revert "Make intl/overrides/caching.js more 'robust'" 2017-11-13 19:13:13 +00:00
plural-rules [Intl] Add order check test for Intl.* 2018-12-02 23:37:49 +00:00
relative-time-format Fix android test breakage due to lack of locale 2020-04-01 21:34:33 +00:00
segmenter Implement GetOptionsObject/CoerceOptionsToObject 2021-02-26 22:45:22 +00:00
string Ensure String.prototype.normalize.length is 0 2015-08-05 15:13:45 +00:00
assert.js [intl] Fix Intl Locale Info 2021-06-15 19:16:01 +00:00
bad-target.js [intl] Remove redundant type checking system 2017-01-09 22:24:57 +00:00
BUILD.gn [build] Add data deps for d8 test suites 2018-03-26 13:44:58 +00:00
default_locale.js [Intl] Remove GetDefaultLocale 2018-12-07 06:27:42 +00:00
DIR_METADATA Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
intl.status [intl] A fast path for Intl::CompareStrings 2021-10-07 12:35:29 +00:00
not-constructors.js [intl] Remove new.target check in Intl functions and method 2016-12-20 16:06:19 +00:00
OWNERS Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
regress-4870.js Use stricter type checks in Intl's bound methods 2016-05-18 14:57:58 +00:00
regress-5179.js Avoid calling the builtin String.prototype.split in Intl 2016-07-08 16:53:09 +00:00
regress-7481.js [Intl] Reland tests of "Validate u extension type" 2019-01-08 01:53:26 +00:00
regress-7770.js [mjsunit] Fix intl test when LC_MESSAGES is set 2021-08-24 10:10:12 +00:00
regress-7982.js Fix maximize/minimize of Intl.Locale 2020-06-10 00:01:37 +00:00
regress-8030.js Reland test part of "[Intl] Cleans up intl-relative-time-format flag" 2019-01-24 23:17:35 +00:00
regress-8031.js [Intl] Remove --harmony-intl-list-format flag from test 2019-02-13 23:22:43 +00:00
regress-8348.js [Intl] Cutting 43K by removing Unibrow when ICU available 2019-04-03 17:58:51 +00:00
regress-8432.js Drop regress-{8432,8413} from intl.status. 2018-11-18 09:07:16 +00:00
regress-8469.js [Intl] Add regression test for -u-tz- of Intl.DateTimeFormat 2018-12-05 03:02:24 +00:00
regress-8525.js [Intl] Fix numberingSystem for NumberFormat 2018-12-06 11:08:36 +00:00
regress-8604.js Add regression test for v8:8604 2019-04-18 20:48:10 +00:00
regress-8657.js [Intl] Remove harmony-locale flag 2019-05-11 06:02:42 +00:00
regress-8866.js Add regression test for v8:8866 2019-06-06 21:54:10 +00:00
regress-9035.js [Intl] Only use DecimalFormat 2019-03-26 00:28:47 +00:00
regress-9084.js Fix locale of Intl.Collator..resolvedOptions 2020-09-16 15:53:09 +00:00
regress-9312.js [Intl] Add test cases for %%ALIAS locales 2019-05-31 21:37:08 +00:00
regress-9356.js [Intl] Fix /ſ/i.test('ſ'.toUpperCase()) be false. 2019-09-27 18:13:00 +00:00
regress-9408.js [Intl] Clean up by removing the following flags 2019-09-12 22:25:41 +00:00
regress-9464.js Correct the name of the regression test 2019-09-13 16:14:50 +00:00
regress-9475.js [Intl] Clean up by removing the following flags 2019-09-12 22:25:41 +00:00
regress-9513.js [Intl] Clean up by removing the following flags 2019-09-12 22:25:41 +00:00
regress-9642.js Fix crash under lb_LU locale 2019-08-26 17:07:12 +00:00
regress-9731.js [Intl] Fix /k/i.test('\u212A') 2019-09-27 17:37:50 +00:00
regress-9747.js [Intl] Sync ListFormat to latest spec. 2019-09-19 20:02:53 +00:00
regress-9786.js [intl] Remove two flags ship in m80 2020-04-24 19:17:26 +00:00
regress-9787.js [intl] Remove two flags ship in m80 2020-04-24 19:17:26 +00:00
regress-9788.js [intl] Remove two flags ship in m80 2020-04-24 19:17:26 +00:00
regress-9812.js [Intl] Add test for calendar of formatRange 2019-10-07 22:31:39 +00:00
regress-9849.js Fix crash bug with some numberingSystem and dateStyle/timeStyle 2019-10-21 20:12:54 +00:00
regress-9887.js [intl] Remove two flags ship in m80 2020-04-24 19:17:26 +00:00
regress-9912.js Fix the format of date range older than Oct 15 1582 2019-10-29 18:12:25 +00:00
regress-10248.js [regexp] Fix and unify non-unicode case-folding algorithms 2020-03-10 11:09:28 +00:00
regress-10437.js [intl] Add failing test for v8:10437 2020-04-23 17:10:17 +00:00
regress-10438.js Use better error messages for dateStyle/timeStyle 2020-09-11 11:26:50 +00:00
regress-10526.js Reland "Add regression tests for 4 calendar bugs" 2020-11-17 23:47:08 +00:00
regress-10527.js Reland "Add regression tests for 4 calendar bugs" 2020-11-17 23:47:08 +00:00
regress-10528.js Reland "Add regression tests for 4 calendar bugs" 2020-11-17 23:47:08 +00:00
regress-10529.js Reland "Add regression tests for 4 calendar bugs" 2020-11-17 23:47:08 +00:00
regress-10573.js [regexp] Document incorrect assertion in intl/regress-10573.js 2020-06-09 06:27:27 +00:00
regress-10599.js Roll icu to fix sr-ME timeZoneName in Latin bug 2020-06-19 06:42:51 +00:00
regress-10613.js Use better error messages for dateStyle/timeStyle 2020-09-11 11:26:50 +00:00
regress-10836.js Change the order of the DateTimeFormat resolved 2020-08-27 20:39:05 +00:00
regress-10960.js [intl] Fix timezone bug in test 2020-10-05 14:41:51 +00:00
regress-11295.js Fix resolvedOption calendar for "iso8601" 2021-01-12 06:22:08 +00:00
regress-11350.js Fix m(in|ax)imize() with long locale 2021-01-29 00:28:32 +00:00
regress-11595.js Fix BestFitMatcher due to invalid locale id in ICU 2021-04-07 06:17:53 +00:00
regress-364374.js Fix special case timezone RangeError 2020-04-15 18:19:00 +00:00
regress-527926.js [Intl] Fix output of hour:'2-digit', hour12: true 2019-03-21 07:34:22 +00:00
regress-875643.js [Intl] Convert options arg to Object before processing it 2018-08-31 23:56:33 +00:00
regress-888299.js [Intl] Remove incorrect CHECK 2018-09-26 00:24:28 +00:00
regress-895942.js [Intl] Validate extension keys 2018-11-06 12:11:50 +00:00
regress-900013.js Reland "[intl] Clean up intl_segmenter flag" 2020-12-10 10:25:48 +00:00
regress-903566.js [test][cleanup] Revive --time, speed up some tests 2019-09-16 11:24:11 +00:00
regress-917151.js [Intl] Fix CHECK fail in Intl::ToLanguageTag() 2019-01-04 01:33:26 +00:00
regress-925216.js [Intl] Fix DefaultHourCycle to skip hHkK in literal 2019-01-28 22:54:47 +00:00
regress-928068.js [Intl] Fix special case timezone 2019-03-07 23:33:22 +00:00
regress-930304.js [Intl] Fix Null-dereference in CreateICUDateFormatFromCache 2019-02-14 09:53:56 +00:00
regress-966285.js [intl] Remove two flags ship in m80 2020-04-24 19:17:26 +00:00
regress-971636.js [Intl] Fix RegExp [\W] with i flag 2019-06-12 06:18:08 +00:00
regress-992694.js [Intl] Fix Hungarian number format grouping 2019-09-13 17:14:41 +00:00
regress-997401.js Remove CHECK which fail while the locale is long. 2019-09-10 19:28:54 +00:00
regress-1003748.js [Intl] Fix m(ax|in)imumFractionDigits for currency 2019-09-17 16:34:00 +00:00
regress-1012579.js [Intl] Fix ASAN crash listformat w/ > 9 items 2020-11-14 05:42:45 +00:00
regress-1030160.js Fix format of -NAN in toLocaleString() 2020-02-24 17:11:26 +00:00
regress-1041319.js Reland "[Intl] Fix RelativeTimeFormat fatal" 2020-02-18 18:29:08 +00:00
regress-1074578.js Change test expectation per tz2020b 2020-10-15 22:17:03 +00:00
regress-1107661.js Fix "japanese" and "chinese" calendar 2020-10-01 10:32:42 +00:00
regress-1108810.js Fix minimumIntegerDigits in NumberFormat 2020-07-30 17:28:40 +00:00
regress-1121156.js Reland "[intl] Clean up intl_segmenter flag" 2020-12-10 10:25:48 +00:00
regress-1130489.js Fix fuzzer problem due to allocation of string 2020-09-22 19:53:28 +00:00
regress-1132641.js [date] Fix crash by invalid TimeZone "US/x0" names. 2020-09-28 21:34:34 +00:00
regress-1146468.js roll icu to Fix debug assertion in ICU Locale::setKeywordValue 2020-11-14 03:19:17 +00:00
regress-1170305.js [intl] Fix space between day and hour in Chinese locale 2021-01-29 00:29:37 +00:00
regress-1177623.js Fix Use-of-uninitialized-value 2021-02-19 21:11:27 +00:00
regress-1177812.js Fix Use-of-uninitialized-value 2021-02-19 21:11:27 +00:00
regress-1224869.js [Intl] throw instead of DCHECK while long locale 2021-08-03 07:33:29 +00:00
regress-8725514.js [Intl] Throws exception on grandfather and private locale 2019-09-16 20:59:11 +00:00
string-localecompare.js [intl] A fast path for Intl::CompareStrings 2021-10-07 12:35:29 +00:00
testcfg.py [test] Support LC_ALL=en_US.UTF-8 in test runner 2019-06-27 11:54:29 +00:00
toStringTag.js [Intl] Define @@toStringTag for Intl namespace 2020-08-01 02:21:20 +00:00
utils.js