Commit ebb6716f authored by Frank Tang's avatar Frank Tang Committed by V8 LUCI CQ

[intl] Removed shipped flag

Clean up two flags which control features shipped in m99
  harmony_intl_locale_info
  harmony_intl_enumeration

Bug: v8:10743, v8:11638
Change-Id: I856afaceb0972052d1bcc70b162e8f9ee9071dd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3508169Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79397}
parent afe71f39
......@@ -340,10 +340,7 @@ DEFINE_BOOL(harmony_shipping, true, "enable all shipped harmony features")
V(harmony_array_find_last, "harmony array find last helpers")
#ifdef V8_INTL_SUPPORT
#define HARMONY_SHIPPING(V) \
HARMONY_SHIPPING_BASE(V) \
V(harmony_intl_enumeration, "Intl Enumeration API") \
V(harmony_intl_locale_info, "Intl Locale info")
#define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V)
#else
#define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V)
#endif
......
......@@ -2817,6 +2817,9 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
SimpleInstallFunction(isolate(), intl, "getCanonicalLocales",
Builtin::kIntlGetCanonicalLocales, 1, false);
SimpleInstallFunction(isolate(), intl, "supportedValuesOf",
Builtin::kIntlSupportedValuesOf, 1, false);
{ // -- D a t e T i m e F o r m a t
Handle<JSFunction> date_time_format_constructor = InstallFunction(
isolate_, intl, "DateTimeFormat", JS_DATE_TIME_FORMAT_TYPE,
......@@ -3081,6 +3084,23 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
SimpleInstallGetter(isolate(), prototype,
factory->numberingSystem_string(),
Builtin::kLocalePrototypeNumberingSystem, true);
// Intl Locale Info functions
SimpleInstallGetter(isolate(), prototype, factory->calendars_string(),
Builtin::kLocalePrototypeCalendars, true);
SimpleInstallGetter(isolate(), prototype, factory->collations_string(),
Builtin::kLocalePrototypeCollations, true);
SimpleInstallGetter(isolate(), prototype, factory->hourCycles_string(),
Builtin::kLocalePrototypeHourCycles, true);
SimpleInstallGetter(isolate(), prototype,
factory->numberingSystems_string(),
Builtin::kLocalePrototypeNumberingSystems, true);
SimpleInstallGetter(isolate(), prototype, factory->textInfo_string(),
Builtin::kLocalePrototypeTextInfo, true);
SimpleInstallGetter(isolate(), prototype, factory->timeZones_string(),
Builtin::kLocalePrototypeTimeZones, true);
SimpleInstallGetter(isolate(), prototype, factory->weekInfo_string(),
Builtin::kLocalePrototypeWeekInfo, true);
}
{ // -- D i s p l a y N a m e s
......@@ -5321,28 +5341,6 @@ void Genesis::InitializeGlobal_harmony_temporal() {
#ifdef V8_INTL_SUPPORT
void Genesis::InitializeGlobal_harmony_intl_locale_info() {
if (!FLAG_harmony_intl_locale_info) return;
Handle<JSObject> prototype(
JSObject::cast(native_context()->intl_locale_function().prototype()),
isolate_);
SimpleInstallGetter(isolate(), prototype, factory()->calendars_string(),
Builtin::kLocalePrototypeCalendars, true);
SimpleInstallGetter(isolate(), prototype, factory()->collations_string(),
Builtin::kLocalePrototypeCollations, true);
SimpleInstallGetter(isolate(), prototype, factory()->hourCycles_string(),
Builtin::kLocalePrototypeHourCycles, true);
SimpleInstallGetter(isolate(), prototype,
factory()->numberingSystems_string(),
Builtin::kLocalePrototypeNumberingSystems, true);
SimpleInstallGetter(isolate(), prototype, factory()->textInfo_string(),
Builtin::kLocalePrototypeTextInfo, true);
SimpleInstallGetter(isolate(), prototype, factory()->timeZones_string(),
Builtin::kLocalePrototypeTimeZones, true);
SimpleInstallGetter(isolate(), prototype, factory()->weekInfo_string(),
Builtin::kLocalePrototypeWeekInfo, true);
}
void Genesis::InitializeGlobal_harmony_intl_number_format_v3() {
if (!FLAG_harmony_intl_number_format_v3) return;
......@@ -5369,20 +5367,6 @@ void Genesis::InitializeGlobal_harmony_intl_number_format_v3() {
false);
}
void Genesis::InitializeGlobal_harmony_intl_enumeration() {
if (!FLAG_harmony_intl_enumeration) return;
Handle<JSObject> intl = Handle<JSObject>::cast(
JSReceiver::GetProperty(
isolate(),
Handle<JSReceiver>(native_context()->global_object(), isolate()),
factory()->InternalizeUtf8String("Intl"))
.ToHandleChecked());
SimpleInstallFunction(isolate(), intl, "supportedValuesOf",
Builtin::kIntlSupportedValuesOf, 1, false);
}
#endif // V8_INTL_SUPPORT
Handle<JSFunction> Genesis::CreateArrayBuffer(
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of calendar is sorted
let name = "calendar";
let items = Intl.supportedValuesOf(name);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of calendar fit 'type'
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
Intl.supportedValuesOf("calendar").forEach(
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of collation is sorted
let name = "collation";
let items = Intl.supportedValuesOf(name);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of collation fit 'type'
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
Intl.supportedValuesOf("collation").forEach(
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of currency is sorted
let name = "currency";
let items = Intl.supportedValuesOf(name);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of currency fit 'type'
let regex = /^[A-Z]{3}$/;
Intl.supportedValuesOf("currency").forEach(
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Chrome filter out data of algorithm numberingSystems so we need to test none
// of them got returned.
let name = "numberingSystem";
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of numberingSystem is sorted
let name = "numberingSystem";
let items = Intl.supportedValuesOf(name);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of numberingSystem fit 'type'
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
Intl.supportedValuesOf("numberingSystem").forEach(
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test invalid keys
["calendars", "collations", "currencies", "numberingSystems", "timeZones", "units",
1, 0.3, true, false, {}, [] ].forEach(
......
......@@ -2,6 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
assertEquals("supportedValuesOf", Intl.supportedValuesOf.name);
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
let descriptor = Object.getOwnPropertyDescriptor(
Intl, "supportedValuesOf");
assertTrue(descriptor.writable);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test valid keys
["calendar", "collation", "currency", "numberingSystem", "timeZone", "unit"].forEach(
function(key) {
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of timeZone is sorted
let name = "timeZone";
let items = Intl.supportedValuesOf(name);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_enumeration
// Test the return items of unit is sorted
let name = "unit";
let items = Intl.supportedValuesOf(name);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_locale_info
// Test the return items of calendars fit 'type'
let a_to_z = "abcdefghijklmnopqrstuvwxyz";
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_locale_info
// Test the return items of collations fit 'type'
let a_to_z = "abcdefghijklmnopqrstuvwxyz";
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_locale_info
// Check getter properties against the spec.
function checkProperties(property) {
let desc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, property);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_locale_info
function checkLocale(locale) {
let l = new Intl.Locale(locale);
assertTrue(Array.isArray(l.calendars));
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_locale_info
// Test Unicode extension.
function testExt(base, ukey, uvalue, property) {
let baseLocale = new Intl.Locale(base);
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_locale_info
// Check the return array has no undefined
function checkNoUndefined(l, items) {
items.forEach( function(item) {
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_locale_info
// Check the return array are sorted
function checkSortedArray(l, name, items) {
assertEquals([...items].sort(), items,
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony_intl_locale_info
// Test the return items of numberingSystems fit 'type'
let a_to_z = "abcdefghijklmnopqrstuvwxyz";
let regex = /^[a-zA-Z0-9]{3,8}(-[a-zA-Z0-9]{3,8})*$/;
......
......@@ -44,8 +44,6 @@ from testrunner.outproc import test262
# TODO(littledan): move the flag mapping into the status file
FEATURE_FLAGS = {
'Intl.Locale-info': '--harmony_intl_locale_info',
'Intl-enumeration': '--harmony_intl_enumeration',
'Intl.NumberFormat-v3': '--harmony_intl_number_format_v3',
'Symbol.prototype.description': '--harmony-symbol-description',
'FinalizationRegistry': '--harmony-weak-refs-with-cleanup-some',
......
......@@ -497,62 +497,62 @@ KNOWN_OBJECTS = {
("read_only_space", 0x0368d): "EmptyFunctionScopeInfo",
("read_only_space", 0x036b1): "NativeScopeInfo",
("read_only_space", 0x036c9): "HashSeed",
("old_space", 0x041f5): "ArgumentsIteratorAccessor",
("old_space", 0x04239): "ArrayLengthAccessor",
("old_space", 0x0427d): "BoundFunctionLengthAccessor",
("old_space", 0x042c1): "BoundFunctionNameAccessor",
("old_space", 0x04305): "ErrorStackAccessor",
("old_space", 0x04349): "FunctionArgumentsAccessor",
("old_space", 0x0438d): "FunctionCallerAccessor",
("old_space", 0x043d1): "FunctionNameAccessor",
("old_space", 0x04415): "FunctionLengthAccessor",
("old_space", 0x04459): "FunctionPrototypeAccessor",
("old_space", 0x0449d): "StringLengthAccessor",
("old_space", 0x044e1): "InvalidPrototypeValidityCell",
("old_space", 0x044e9): "EmptyScript",
("old_space", 0x04529): "ManyClosuresCell",
("old_space", 0x04535): "ArrayConstructorProtector",
("old_space", 0x04549): "NoElementsProtector",
("old_space", 0x0455d): "MegaDOMProtector",
("old_space", 0x04571): "IsConcatSpreadableProtector",
("old_space", 0x04585): "ArraySpeciesProtector",
("old_space", 0x04599): "TypedArraySpeciesProtector",
("old_space", 0x045ad): "PromiseSpeciesProtector",
("old_space", 0x045c1): "RegExpSpeciesProtector",
("old_space", 0x045d5): "StringLengthProtector",
("old_space", 0x045e9): "ArrayIteratorProtector",
("old_space", 0x045fd): "ArrayBufferDetachingProtector",
("old_space", 0x04611): "PromiseHookProtector",
("old_space", 0x04625): "PromiseResolveProtector",
("old_space", 0x04639): "MapIteratorProtector",
("old_space", 0x0464d): "PromiseThenProtector",
("old_space", 0x04661): "SetIteratorProtector",
("old_space", 0x04675): "StringIteratorProtector",
("old_space", 0x04689): "SingleCharacterStringCache",
("old_space", 0x04a91): "StringSplitCache",
("old_space", 0x04e99): "RegExpMultipleCache",
("old_space", 0x052a1): "BuiltinsConstantsTable",
("old_space", 0x056cd): "AsyncFunctionAwaitRejectSharedFun",
("old_space", 0x056f1): "AsyncFunctionAwaitResolveSharedFun",
("old_space", 0x05715): "AsyncGeneratorAwaitRejectSharedFun",
("old_space", 0x05739): "AsyncGeneratorAwaitResolveSharedFun",
("old_space", 0x0575d): "AsyncGeneratorYieldResolveSharedFun",
("old_space", 0x05781): "AsyncGeneratorReturnResolveSharedFun",
("old_space", 0x057a5): "AsyncGeneratorReturnClosedRejectSharedFun",
("old_space", 0x057c9): "AsyncGeneratorReturnClosedResolveSharedFun",
("old_space", 0x057ed): "AsyncIteratorValueUnwrapSharedFun",
("old_space", 0x05811): "PromiseAllResolveElementSharedFun",
("old_space", 0x05835): "PromiseAllSettledResolveElementSharedFun",
("old_space", 0x05859): "PromiseAllSettledRejectElementSharedFun",
("old_space", 0x0587d): "PromiseAnyRejectElementSharedFun",
("old_space", 0x058a1): "PromiseCapabilityDefaultRejectSharedFun",
("old_space", 0x058c5): "PromiseCapabilityDefaultResolveSharedFun",
("old_space", 0x058e9): "PromiseCatchFinallySharedFun",
("old_space", 0x0590d): "PromiseGetCapabilitiesExecutorSharedFun",
("old_space", 0x05931): "PromiseThenFinallySharedFun",
("old_space", 0x05955): "PromiseThrowerFinallySharedFun",
("old_space", 0x05979): "PromiseValueThunkFinallySharedFun",
("old_space", 0x0599d): "ProxyRevokeSharedFun",
("old_space", 0x04215): "ArgumentsIteratorAccessor",
("old_space", 0x04259): "ArrayLengthAccessor",
("old_space", 0x0429d): "BoundFunctionLengthAccessor",
("old_space", 0x042e1): "BoundFunctionNameAccessor",
("old_space", 0x04325): "ErrorStackAccessor",
("old_space", 0x04369): "FunctionArgumentsAccessor",
("old_space", 0x043ad): "FunctionCallerAccessor",
("old_space", 0x043f1): "FunctionNameAccessor",
("old_space", 0x04435): "FunctionLengthAccessor",
("old_space", 0x04479): "FunctionPrototypeAccessor",
("old_space", 0x044bd): "StringLengthAccessor",
("old_space", 0x04501): "InvalidPrototypeValidityCell",
("old_space", 0x04509): "EmptyScript",
("old_space", 0x04549): "ManyClosuresCell",
("old_space", 0x04555): "ArrayConstructorProtector",
("old_space", 0x04569): "NoElementsProtector",
("old_space", 0x0457d): "MegaDOMProtector",
("old_space", 0x04591): "IsConcatSpreadableProtector",
("old_space", 0x045a5): "ArraySpeciesProtector",
("old_space", 0x045b9): "TypedArraySpeciesProtector",
("old_space", 0x045cd): "PromiseSpeciesProtector",
("old_space", 0x045e1): "RegExpSpeciesProtector",
("old_space", 0x045f5): "StringLengthProtector",
("old_space", 0x04609): "ArrayIteratorProtector",
("old_space", 0x0461d): "ArrayBufferDetachingProtector",
("old_space", 0x04631): "PromiseHookProtector",
("old_space", 0x04645): "PromiseResolveProtector",
("old_space", 0x04659): "MapIteratorProtector",
("old_space", 0x0466d): "PromiseThenProtector",
("old_space", 0x04681): "SetIteratorProtector",
("old_space", 0x04695): "StringIteratorProtector",
("old_space", 0x046a9): "SingleCharacterStringCache",
("old_space", 0x04ab1): "StringSplitCache",
("old_space", 0x04eb9): "RegExpMultipleCache",
("old_space", 0x052c1): "BuiltinsConstantsTable",
("old_space", 0x056ed): "AsyncFunctionAwaitRejectSharedFun",
("old_space", 0x05711): "AsyncFunctionAwaitResolveSharedFun",
("old_space", 0x05735): "AsyncGeneratorAwaitRejectSharedFun",
("old_space", 0x05759): "AsyncGeneratorAwaitResolveSharedFun",
("old_space", 0x0577d): "AsyncGeneratorYieldResolveSharedFun",
("old_space", 0x057a1): "AsyncGeneratorReturnResolveSharedFun",
("old_space", 0x057c5): "AsyncGeneratorReturnClosedRejectSharedFun",
("old_space", 0x057e9): "AsyncGeneratorReturnClosedResolveSharedFun",
("old_space", 0x0580d): "AsyncIteratorValueUnwrapSharedFun",
("old_space", 0x05831): "PromiseAllResolveElementSharedFun",
("old_space", 0x05855): "PromiseAllSettledResolveElementSharedFun",
("old_space", 0x05879): "PromiseAllSettledRejectElementSharedFun",
("old_space", 0x0589d): "PromiseAnyRejectElementSharedFun",
("old_space", 0x058c1): "PromiseCapabilityDefaultRejectSharedFun",
("old_space", 0x058e5): "PromiseCapabilityDefaultResolveSharedFun",
("old_space", 0x05909): "PromiseCatchFinallySharedFun",
("old_space", 0x0592d): "PromiseGetCapabilitiesExecutorSharedFun",
("old_space", 0x05951): "PromiseThenFinallySharedFun",
("old_space", 0x05975): "PromiseThrowerFinallySharedFun",
("old_space", 0x05999): "PromiseValueThunkFinallySharedFun",
("old_space", 0x059bd): "ProxyRevokeSharedFun",
}
# Lower 32 bits of first page addresses for various heap spaces.
......
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