Commit c8c7bae0 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

Revert "[cleanup] Remove harmony-intl-dateformat-day-period"

This reverts commit 5e041b82.

Reason for revert: Mysterious breakage of SIMD tests: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/41767/overview

Original change's description:
> [cleanup] Remove harmony-intl-dateformat-day-period
>
> harmony-intl-dateformat-day-period is shipped in M92
>
> Bug: v8:12109
> Change-Id: I7d24463c0cc353c4baf52326159beb04592b81b5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099087
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76468}

Bug: v8:12109
Change-Id: If7f32c650dc88bf6280573db9d6e42f89277778e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116806
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#76470}
parent ce814692
......@@ -325,6 +325,8 @@ DEFINE_BOOL(harmony_shipping, true, "enable all shipped harmony features")
#ifdef V8_INTL_SUPPORT
#define HARMONY_SHIPPING(V) \
HARMONY_SHIPPING_BASE(V) \
V(harmony_intl_dateformat_day_period, \
"Add dayPeriod option to DateTimeFormat") \
V(harmony_intl_displaynames_v2, "Intl.DisplayNames v2") \
V(harmony_intl_more_timezone, \
"Extend Intl.DateTimeFormat timeZoneName Option")
......
......@@ -4402,6 +4402,7 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_error_cause)
#ifdef V8_INTL_SUPPORT
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_intl_best_fit_matcher)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_intl_displaynames_v2)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_intl_dateformat_day_period)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_intl_more_timezone)
#endif // V8_INTL_SUPPORT
......
......@@ -144,14 +144,16 @@ static std::vector<PatternItem> BuildPatternItems() {
kNarrowLongShort2DigitNumeric));
items.push_back(PatternItem("day", {{"dd", "2-digit"}, {"d", "numeric"}},
k2DigitNumeric));
items.push_back(PatternItem("dayPeriod",
{{"BBBBB", "narrow"},
{"bbbbb", "narrow"},
{"BBBB", "long"},
{"bbbb", "long"},
{"B", "short"},
{"b", "short"}},
kNarrowLongShort));
if (FLAG_harmony_intl_dateformat_day_period) {
items.push_back(PatternItem("dayPeriod",
{{"BBBBB", "narrow"},
{"bbbbb", "narrow"},
{"BBBB", "long"},
{"bbbb", "long"},
{"B", "short"},
{"b", "short"}},
kNarrowLongShort));
}
items.push_back(PatternItem("hour",
{{"HH", "2-digit"},
{"H", "numeric"},
......@@ -921,7 +923,9 @@ MaybeHandle<JSObject> JSDateTimeFormat::ToDateTimeOptions(
// a. For each of the property names "dayPeriod", "hour", "minute",
// "second", "fractionalSecondDigits", do
std::vector<Handle<String>> list;
list.push_back(factory->dayPeriod_string());
if (FLAG_harmony_intl_dateformat_day_period) {
list.push_back(factory->dayPeriod_string());
}
list.push_back(factory->hour_string());
list.push_back(factory->minute_string());
list.push_back(factory->second_string());
......
......@@ -44,6 +44,7 @@ from testrunner.outproc import test262
# TODO(littledan): move the flag mapping into the status file
FEATURE_FLAGS = {
'Intl.DateTimeFormat-dayPeriod': '--harmony-intl-dateformat-day-period',
'Intl.Locale-info': '--harmony_intl_locale_info',
'Intl.DateTimeFormat-extend-timezonename': '--harmony_intl_more_timezone',
'Intl.DisplayNames-v2': '--harmony_intl_displaynames_v2',
......
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