From 3b4cadedee8e45a56771ed861b68a8ac8e5db285 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Thu, 14 Feb 2019 11:00:15 +0100 Subject: [PATCH] Remove always-true --harmony-symbol-description runtime flag It shipped in Chrome 70. Bug: v8:7807, v8:8562 Change-Id: I5c5a9fc23656018ee6e9115af7a0c779230e681b Reviewed-on: https://chromium-review.googlesource.com/c/1450787 Commit-Queue: Mathias Bynens Reviewed-by: Sathya Gunasekaran Reviewed-by: Adam Klein Cr-Commit-Position: refs/heads/master@{#59589} --- src/bootstrapper.cc | 17 +++++------------ src/builtins/builtins-symbol-gen.cc | 4 ++-- src/flag-definitions.h | 1 - test/mjsunit/harmony/symbol-description.js | 2 -- test/mkgrokdump/mkgrokdump.cc | 2 +- tools/v8heapconst.py | 2 +- 6 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 33df196f2f..32311e0f93 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -2159,6 +2159,11 @@ void Genesis::InitializeGlobal(Handle global_object, Builtins::kSymbolPrototypeValueOf, 0, true, BuiltinFunctionId::kSymbolPrototypeValueOf); + // Install the Symbol.prototype.description getter. + SimpleInstallGetter(isolate_, prototype, + factory->InternalizeUtf8String("description"), + Builtins::kSymbolPrototypeDescriptionGetter, true); + // Install the @@toPrimitive function. InstallFunctionAtSymbol( isolate_, prototype, factory->to_primitive_symbol(), @@ -4248,18 +4253,6 @@ void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { InstallToStringTag(isolate_, isolate()->atomics_object(), "Atomics"); } -void Genesis::InitializeGlobal_harmony_symbol_description() { - if (!FLAG_harmony_symbol_description) return; - - // Symbol.prototype.description - Handle symbol_fun(native_context()->symbol_function(), isolate()); - Handle symbol_prototype( - JSObject::cast(symbol_fun->instance_prototype()), isolate()); - SimpleInstallGetter(isolate(), symbol_prototype, - factory()->InternalizeUtf8String("description"), - Builtins::kSymbolPrototypeDescriptionGetter, true); -} - void Genesis::InitializeGlobal_harmony_string_matchall() { if (!FLAG_harmony_string_matchall) return; diff --git a/src/builtins/builtins-symbol-gen.cc b/src/builtins/builtins-symbol-gen.cc index 425fbab5d1..0a9a1f26c7 100644 --- a/src/builtins/builtins-symbol-gen.cc +++ b/src/builtins/builtins-symbol-gen.cc @@ -10,8 +10,8 @@ namespace v8 { namespace internal { // ----------------------------------------------------------------------------- -// ES6 #sec-symbol-objects -// ES ##sec-symbol.prototype.description +// ES #sec-symbol-objects +// ES #sec-symbol.prototype.description TF_BUILTIN(SymbolPrototypeDescriptionGetter, CodeStubAssembler) { Node* context = Parameter(Descriptor::kContext); Node* receiver = Parameter(Descriptor::kReceiver); diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 05cd23883f..24e42b9cd1 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -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_symbol_description, "harmony Symbol.prototype.description") \ V(harmony_global, "harmony global") \ V(harmony_json_stringify, "well-formed JSON.stringify") \ V(harmony_public_fields, "harmony public instance fields in class literals") \ diff --git a/test/mjsunit/harmony/symbol-description.js b/test/mjsunit/harmony/symbol-description.js index ccba44c978..39de1b065d 100644 --- a/test/mjsunit/harmony/symbol-description.js +++ b/test/mjsunit/harmony/symbol-description.js @@ -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-symbol-description - { let desc = Object.getOwnPropertyDescriptor(Symbol.prototype, 'description'); assertEquals(desc.set, undefined); diff --git a/test/mkgrokdump/mkgrokdump.cc b/test/mkgrokdump/mkgrokdump.cc index 5582fd2b75..60b46656e4 100644 --- a/test/mkgrokdump/mkgrokdump.cc +++ b/test/mkgrokdump/mkgrokdump.cc @@ -16,7 +16,7 @@ namespace v8 { static const char* kHeader = - "# Copyright 2018 the V8 project authors. All rights reserved.\n" + "# Copyright 2019 the V8 project authors. All rights reserved.\n" "# Use of this source code is governed by a BSD-style license that can\n" "# be found in the LICENSE file.\n" "\n" diff --git a/tools/v8heapconst.py b/tools/v8heapconst.py index 47b41f5d64..fee1bc7d0d 100644 --- a/tools/v8heapconst.py +++ b/tools/v8heapconst.py @@ -1,4 +1,4 @@ -# Copyright 2018 the V8 project authors. All rights reserved. +# Copyright 2019 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.