v8/test
Jungshik Shin 919270e024 Fix the fast path for locale canonicalization
Not all 2 or 3 letter language codes are canonical. Some of them need
to be canonicalized.

Specifically, exclude {jw,ji,iw,in} and all three-letter codes from the
fast path except for 'fil'.

{jw,ji,iw,in} are deprecated ISO 639 codes for
{Javanese, Yiddish, Hebrew, Indonesian}. They should be
canonicalized to {jv,yi,he,id}. So, do not return early
in the fast path, but pass it down to the full canonicalization.

In addition, there are 70+ deprecated 3-letter codes that need to be
replaced by their modern equivalents. Instead of checking and replacing
in v8, just pass them to ICU to handle.

Along with the following ICU change, two more tests will pass.

  https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1026797

These two tests still fail because of the disagreement between ICU and the test
expectations about 5 grandfathered tags with no preferred value (e.g.
i-default, zh-min, cel-gaulish).

  'intl402/Intl/getCanonicalLocales/canonicalized-tags'
  'intl402/Intl/getCanonicalLocales/preferred-grandfathered'

Bug: v8:5693, v8:7669
Test: test262/intl402/language-tags-canonicalized.js
Test: test262/intl402/Intl/preferred-variants.js
Test: intl/general/language_tags_with_preferred_values.js
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ide7e9c90ac046859604c7b71c641f84ce9c64be5
Reviewed-on: https://chromium-review.googlesource.com/1023379
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52823}
2018-04-26 18:10:04 +00:00
..
benchmarks Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00
cctest [wasm] Implement Managed<T> with std::shared_ptr<T> 2018-04-26 15:53:42 +00:00
common [wasm][cleanup] Move ValueType into its own header file 2018-04-24 13:55:18 +00:00
debugger [runtime] Do not refer directly to the closure stored in the context 2018-04-25 17:24:02 +00:00
fuzzer [wasm] Basic wasm tier-up 2018-04-24 13:56:23 +00:00
inspector Reland "[inspector] added timeout for Debugger.evaluateOnCallFrame method" 2018-04-26 15:08:52 +00:00
intl Fix the fast path for locale canonicalization 2018-04-26 18:10:04 +00:00
js-perf-test Gracefully fail BigInt TypedArray.p.sort benchmarks. 2018-04-19 12:21:10 +00:00
memory
message Reland "Reland "[d8][wasm] Test wasm compilation completion"" 2018-04-10 08:24:27 +00:00
mjsunit [wasm] Update WebAssembly.Global constructor 2018-04-26 18:01:53 +00:00
mkgrokdump [builtins] Re-enable embedded builtins 2018-04-17 08:27:48 +00:00
mozilla [test] Skip flaky test 2018-04-06 15:19:34 +00:00
preparser Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00
test262 Fix the fast path for locale canonicalization 2018-04-26 18:10:04 +00:00
unittests [turbofan] Move Number.parseInt to JSCallReducer 2018-04-26 07:06:24 +00:00
wasm-spec-tests [wasm] Update spec tests 2018-04-25 12:02:21 +00:00
webkit [builtins] Properly reject immediately throwing thenables. 2018-04-24 07:55:00 +00:00
BUILD.gn Reland "[build] Remove legacy isolate configurations" 2018-03-28 12:36:55 +00:00