Commit b62a7f18 authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

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/1450781Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59309}
parent 8b79fe31
......@@ -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;
......
......@@ -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") \
......
......@@ -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]() {
......
......@@ -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');
......
......@@ -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]() {
......
......@@ -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');
......
......@@ -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',
......
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