Remove always-true --harmony-array-flat runtime flag

It shipped in Chrome 69.

Bug: v8:7220, v8:8562
Change-Id: I09d5ee9e98fc32ae3163c8983d552b99ac4f08e6
Reviewed-on: https://chromium-review.googlesource.com/c/1450781
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59309}
This commit is contained in:
Mathias Bynens 2019-02-01 19:10:25 -07:00 committed by Commit Bot
parent 8b79fe31ac
commit b62a7f18cb
7 changed files with 5 additions and 22 deletions

View File

@ -1733,6 +1733,10 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
native_context()->set_array_for_each_iterator(*for_each_fun);
SimpleInstallFunction(isolate_, proto, "filter", Builtins::kArrayFilter, 1,
false);
SimpleInstallFunction(isolate_, proto, "flat",
Builtins::kArrayPrototypeFlat, 0, false);
SimpleInstallFunction(isolate_, proto, "flatMap",
Builtins::kArrayPrototypeFlatMap, 1, false);
SimpleInstallFunction(isolate_, proto, "map", Builtins::kArrayMap, 1,
false);
SimpleInstallFunction(isolate_, proto, "every", Builtins::kArrayEvery, 1,
@ -4214,18 +4218,6 @@ void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
InstallToStringTag(isolate_, isolate()->atomics_object(), "Atomics");
}
void Genesis::InitializeGlobal_harmony_array_flat() {
if (!FLAG_harmony_array_flat) return;
Handle<JSFunction> array_constructor(native_context()->array_function(),
isolate());
Handle<JSObject> array_prototype(
JSObject::cast(array_constructor->instance_prototype()), isolate());
SimpleInstallFunction(isolate(), array_prototype, "flat",
Builtins::kArrayPrototypeFlat, 0, false);
SimpleInstallFunction(isolate(), array_prototype, "flatMap",
Builtins::kArrayPrototypeFlatMap, 1, false);
}
void Genesis::InitializeGlobal_harmony_symbol_description() {
if (!FLAG_harmony_symbol_description) return;

View File

@ -234,7 +234,6 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_import_meta, "harmony import.meta property") \
V(harmony_dynamic_import, "harmony dynamic import") \
V(harmony_array_flat, "harmony Array.prototype.{flat,flatMap}") \
V(harmony_symbol_description, "harmony Symbol.prototype.description") \
V(harmony_global, "harmony global") \
V(harmony_json_stringify, "well-formed JSON.stringify") \

View File

@ -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-array-flat
{
class MyArray extends Array {
static get [Symbol.species]() {

View File

@ -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-array-flat
assertEquals(Array.prototype.flat.length, 0);
assertEquals(Array.prototype.flat.name, 'flat');

View File

@ -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-array-flat
{
class MyArray extends Array {
static get [Symbol.species]() {

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-array-flat --allow-natives-syntax
// Flags: --allow-natives-syntax
assertEquals(Array.prototype.flatMap.length, 1);
assertEquals(Array.prototype.flatMap.name, 'flatMap');

View File

@ -46,8 +46,6 @@ FEATURE_FLAGS = {
'class-static-fields-public': '--harmony-class-fields',
'class-fields-private': '--harmony-private-fields',
'class-static-fields-private': '--harmony-private-fields',
'Array.prototype.flat': '--harmony-array-flat',
'Array.prototype.flatMap': '--harmony-array-flat',
'String.prototype.matchAll': '--harmony-string-matchall',
'Symbol.matchAll': '--harmony-string-matchall',
'numeric-separator-literal': '--harmony-numeric-separator',