Remove always-true --harmony-array-prototype-values flag
It's been enabled for several releases now. R=gsathya@chromium.org Change-Id: Ib1806a1373821ee542dae2fd80f639b56bd99ed9 Reviewed-on: https://chromium-review.googlesource.com/c/1384796 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#58381}
This commit is contained in:
parent
e5e0501552
commit
6776944f8f
@ -1727,9 +1727,12 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
||||
InstallFunctionWithBuiltinId(isolate_, proto, "entries",
|
||||
Builtins::kArrayPrototypeEntries, 0, true,
|
||||
BuiltinFunctionId::kArrayEntries);
|
||||
InstallFunctionAtSymbol(isolate_, proto, factory->iterator_symbol(),
|
||||
"values", Builtins::kArrayPrototypeValues, 0, true,
|
||||
DONT_ENUM, BuiltinFunctionId::kArrayValues);
|
||||
Handle<JSFunction> values_iterator = InstallFunctionWithBuiltinId(
|
||||
isolate_, proto, "values", Builtins::kArrayPrototypeValues, 0, true,
|
||||
BuiltinFunctionId::kArrayValues);
|
||||
JSObject::AddProperty(isolate_, proto, factory->iterator_symbol(),
|
||||
values_iterator, DONT_ENUM);
|
||||
|
||||
SimpleInstallFunction(isolate_, proto, "forEach", Builtins::kArrayForEach,
|
||||
1, false);
|
||||
SimpleInstallFunction(isolate_, proto, "filter", Builtins::kArrayFilter, 1,
|
||||
@ -4400,30 +4403,6 @@ void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
|
||||
}
|
||||
}
|
||||
|
||||
void Genesis::InitializeGlobal_harmony_array_prototype_values() {
|
||||
if (!FLAG_harmony_array_prototype_values) return;
|
||||
Handle<JSFunction> array_constructor(native_context()->array_function(),
|
||||
isolate());
|
||||
Handle<JSObject> array_prototype(
|
||||
JSObject::cast(array_constructor->instance_prototype()), isolate());
|
||||
Handle<Object> values_iterator =
|
||||
JSObject::GetProperty(isolate(), array_prototype,
|
||||
factory()->iterator_symbol())
|
||||
.ToHandleChecked();
|
||||
DCHECK(values_iterator->IsJSFunction());
|
||||
JSObject::AddProperty(isolate(), array_prototype, factory()->values_string(),
|
||||
values_iterator, DONT_ENUM);
|
||||
|
||||
Handle<Object> unscopables =
|
||||
JSObject::GetProperty(isolate(), array_prototype,
|
||||
factory()->unscopables_symbol())
|
||||
.ToHandleChecked();
|
||||
DCHECK(unscopables->IsJSObject());
|
||||
JSObject::AddProperty(isolate(), Handle<JSObject>::cast(unscopables),
|
||||
factory()->values_string(), factory()->true_value(),
|
||||
NONE);
|
||||
}
|
||||
|
||||
void Genesis::InitializeGlobal_harmony_array_flat() {
|
||||
if (!FLAG_harmony_array_flat) return;
|
||||
Handle<JSFunction> array_constructor(native_context()->array_function(),
|
||||
|
@ -236,7 +236,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_prototype_values, "harmony Array.prototype.values") \
|
||||
V(harmony_array_flat, "harmony Array.prototype.{flat,flatMap}") \
|
||||
V(harmony_symbol_description, "harmony Symbol.prototype.description") \
|
||||
V(harmony_global, "harmony global") \
|
||||
|
@ -62,6 +62,7 @@ function PostNatives(utils) {
|
||||
findIndex: true,
|
||||
includes: true,
|
||||
keys: true,
|
||||
values: true,
|
||||
};
|
||||
|
||||
%ToFastProperties(unscopables);
|
||||
|
@ -1,8 +1,6 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Flags: --harmony-array-prototype-values
|
||||
|
||||
// Functionality of the values iterator is tested elsewhere; this test
|
||||
// merely verifies that the 'values' property is set up correctly.
|
||||
|
Loading…
Reference in New Issue
Block a user