Commit c70ec473 authored by jshin's avatar jshin Committed by Commit bot

Turn on icu_case_mapping by default

Update string-capitalize expected result because now it
passes all the tests in the file.
Mark fast/js/string-capitalization as failing with no_i18n.

Relanding after revert because the failure was taken care of
by Adam's CL at https://codereview.chromium.org/2597543002 .

3rd langing after a crash is taken care of in
https://codereview.chromium.org/2621393002

In addition to the previous version of this CL (PS #4) that landed and
reverted, drop String.prototype.to(Locale){Upper,Lower}Case from the
whitelist of built-in functions for side-effect-free-debugging.

BUG=v8:4477, v8:4476
TEST=test262/{built-ins,intl402}/Strings/*, webkit/fast/js/*,
     mjsunit/string-case, intl/general/case*

Cr-Original-Original-Commit-Position: refs/heads/master@{#41834}
Committed: https://chromium.googlesource.com/v8/v8/+/7c79e23c34ea971947eedc6e42d8a882617c0e47
Review-Url: https://codereview.chromium.org/2588963002
Cr-Original-Commit-Position: refs/heads/master@{#41883}
Committed: https://chromium.googlesource.com/v8/v8/+/a42c8c67dece5328896b13d37c5c846a2a0f5b0b
Review-Url: https://codereview.chromium.org/2588963002
Cr-Commit-Position: refs/heads/master@{#42524}
parent 5ccc719a
...@@ -205,7 +205,7 @@ DEFINE_IMPLICATION(es_staging, move_object_start) ...@@ -205,7 +205,7 @@ DEFINE_IMPLICATION(es_staging, move_object_start)
V(harmony_object_rest_spread, "harmony object rest spread properties") V(harmony_object_rest_spread, "harmony object rest spread properties")
// Features that are complete (but still behind --harmony/es-staging flag). // Features that are complete (but still behind --harmony/es-staging flag).
#define HARMONY_STAGED_BASE(V) \ #define HARMONY_STAGED(V) \
V(harmony_regexp_lookbehind, "harmony regexp lookbehind") \ V(harmony_regexp_lookbehind, "harmony regexp lookbehind") \
V(harmony_restrictive_generators, \ V(harmony_restrictive_generators, \
"harmony restrictions on generator declarations") \ "harmony restrictions on generator declarations") \
...@@ -213,21 +213,14 @@ DEFINE_IMPLICATION(es_staging, move_object_start) ...@@ -213,21 +213,14 @@ DEFINE_IMPLICATION(es_staging, move_object_start)
V(harmony_trailing_commas, \ V(harmony_trailing_commas, \
"harmony trailing commas in function parameter lists") "harmony trailing commas in function parameter lists")
#ifdef V8_I18N_SUPPORT
#define HARMONY_STAGED(V) \
HARMONY_STAGED_BASE(V) \
V(icu_case_mapping, "case mapping with ICU rather than Unibrow")
#else
#define HARMONY_STAGED(V) HARMONY_STAGED_BASE(V)
#endif
// Features that are shipping (turned on by default, but internal flag remains). // Features that are shipping (turned on by default, but internal flag remains).
#define HARMONY_SHIPPING_BASE(V) #define HARMONY_SHIPPING_BASE(V)
#ifdef V8_I18N_SUPPORT #ifdef V8_I18N_SUPPORT
#define HARMONY_SHIPPING(V) \ #define HARMONY_SHIPPING(V) \
HARMONY_SHIPPING_BASE(V) \ HARMONY_SHIPPING_BASE(V) \
V(datetime_format_to_parts, "Intl.DateTimeFormat.formatToParts") V(datetime_format_to_parts, "Intl.DateTimeFormat.formatToParts") \
V(icu_case_mapping, "case mapping with ICU rather than Unibrow")
#else #else
#define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V) #define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V)
#endif #endif
......
...@@ -46,7 +46,10 @@ function listener(event, exec_state, event_data, data) { ...@@ -46,7 +46,10 @@ function listener(event, exec_state, event_data, data) {
for (f of Object.getOwnPropertyNames(String.prototype)) { for (f of Object.getOwnPropertyNames(String.prototype)) {
if (typeof String.prototype[f] === "function") { if (typeof String.prototype[f] === "function") {
// Do not expect locale-specific or regexp-related functions to work. // Do not expect locale-specific or regexp-related functions to work.
// {Lower,Upper}Case (Locale-specific or not) do not work either.
if (f.indexOf("locale") >= 0) continue; if (f.indexOf("locale") >= 0) continue;
if (f.indexOf("Lower") >= 0) continue;
if (f.indexOf("Upper") >= 0) continue;
if (f == "normalize") continue; if (f == "normalize") continue;
if (f == "match") continue; if (f == "match") continue;
if (f == "search") continue; if (f == "search") continue;
...@@ -54,6 +57,10 @@ function listener(event, exec_state, event_data, data) { ...@@ -54,6 +57,10 @@ function listener(event, exec_state, event_data, data) {
success("abcd"[f](2), `"abcd".${f}(2);`); success("abcd"[f](2), `"abcd".${f}(2);`);
} }
} }
fail("'abCd'.toLowerCase()");
fail("'abcd'.toUpperCase()");
fail("'abCd'.toLocaleLowerCase()");
fail("'abcd'.toLocaleUpperCase()");
fail("'abcd'.match(/a/)"); fail("'abcd'.match(/a/)");
fail("'abcd'.replace(/a/)"); fail("'abcd'.replace(/a/)");
fail("'abcd'.search(/a/)"); fail("'abcd'.search(/a/)");
......
...@@ -26,8 +26,8 @@ This test checks that toLowerCase and toUpperCase handle certain non-trivial cas ...@@ -26,8 +26,8 @@ This test checks that toLowerCase and toUpperCase handle certain non-trivial cas
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
FAIL String("A𐐀").toLowerCase() should be a𐐨. Was a𐐀. PASS String("A𐐀").toLowerCase() is "a𐐨"
FAIL String("a𐐨").toUpperCase() should be A𐐀. Was A𐐨. PASS String("a𐐨").toUpperCase() is "A𐐀"
PASS String("ΚΟΣΜΟΣ ΚΟΣΜΟΣ").toLowerCase() is "κοσμος κοσμος" PASS String("ΚΟΣΜΟΣ ΚΟΣΜΟΣ").toLowerCase() is "κοσμος κοσμος"
PASS String("ß").toUpperCase() is "SS" PASS String("ß").toUpperCase() is "SS"
PASS String("ʼn").toUpperCase() is "ʼN" PASS String("ʼn").toUpperCase() is "ʼN"
......
...@@ -125,5 +125,10 @@ ...@@ -125,5 +125,10 @@
'*': [SKIP], '*': [SKIP],
}], # variant == wasm_traps }], # variant == wasm_traps
##############################################################################
['no_i18n == True', {
'fast/js/string-capitalization': [FAIL],
}], # variant == wasm_traps
############################################################################## ##############################################################################
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment