Commit ad1cebe8 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

Revert "Remove always-true --harmony-object-from-entries runtime flag"

This reverts commit 98bbe37e.

Reason for revert: breaks gc_stress bot
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/22113

Original change's description:
> Remove always-true --harmony-object-from-entries runtime flag
>
> It shipped in Chrome 73.
>
> Bug: v8:8021
> Change-Id: I82875829ff081ce055a0184170b15c65efca1c38
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581647
> Commit-Queue: Mathias Bynens <mathias@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Auto-Submit: Mathias Bynens <mathias@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60992}

TBR=gsathya@chromium.org,mathias@chromium.org

Change-Id: I812d62a7e8b70a8646e606da5f0f8812fac330c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8021
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1582882
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60994}
parent feba84a3
......@@ -1474,8 +1474,6 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
native_context()->set_object_keys(*object_keys);
SimpleInstallFunction(isolate_, object_function, "entries",
Builtins::kObjectEntries, 1, true);
SimpleInstallFunction(isolate_, object_function, "fromEntries",
Builtins::kObjectFromEntries, 1, false);
SimpleInstallFunction(isolate_, object_function, "values",
Builtins::kObjectValues, 1, true);
......@@ -4546,6 +4544,12 @@ void Genesis::InitializeGlobal_harmony_intl_segmenter() {
#endif // V8_INTL_SUPPORT
void Genesis::InitializeGlobal_harmony_object_from_entries() {
if (!FLAG_harmony_object_from_entries) return;
SimpleInstallFunction(isolate(), isolate()->object_function(), "fromEntries",
Builtins::kObjectFromEntries, 1, false);
}
Handle<JSFunction> Genesis::CreateArrayBuffer(
Handle<String> name, ArrayBufferKind array_buffer_kind) {
// Create the %ArrayBufferPrototype%
......
......@@ -250,6 +250,7 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
V(harmony_public_fields, "harmony public instance fields in class literals") \
V(harmony_static_fields, "harmony static fields in class literals") \
V(harmony_string_matchall, "harmony String.prototype.matchAll") \
V(harmony_object_from_entries, "harmony Object.fromEntries()") \
V(harmony_await_optimization, "harmony await taking 1 tick") \
V(harmony_private_fields, "harmony private fields in class literals") \
V(harmony_hashbang, "harmony hashbang syntax") \
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-object-from-entries
const fromEntries = Object.fromEntries;
const ObjectPrototype = Object.prototype;
const ObjectPrototypeHasOwnProperty = ObjectPrototype.hasOwnProperty;
......
......@@ -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: --always-opt --allow-natives-syntax
// Flags: --always-opt --harmony-object-from-entries --allow-natives-syntax
function test() {
Object.fromEntries([[]]);
......
......@@ -57,6 +57,7 @@ FEATURE_FLAGS = {
'Symbol.prototype.description': '--harmony-symbol-description',
'globalThis': '--harmony-global',
'export-star-as-namespace-from-module': '--harmony-namespace-exports',
'Object.fromEntries': '--harmony-object-from-entries',
'hashbang': '--harmony-hashbang',
'BigInt': '--harmony-intl-bigint',
}
......
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