Commit b7726c44 authored by adamk's avatar adamk Committed by Commit bot

Delete --harmony-computed-property-names flag

It was shipped in V8 4.4.

Review URL: https://codereview.chromium.org/1273543002

Cr-Commit-Position: refs/heads/master@{#30038}
parent eeb1149d
......@@ -1844,7 +1844,6 @@ EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy_let)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls)
......@@ -1880,7 +1879,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_let)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring)
......@@ -2564,7 +2562,6 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_sloppy_natives[] = {nullptr};
static const char* harmony_sloppy_let_natives[] = {nullptr};
static const char* harmony_unicode_regexps_natives[] = {nullptr};
static const char* harmony_computed_property_names_natives[] = {nullptr};
static const char* harmony_rest_parameters_natives[] = {nullptr};
static const char* harmony_reflect_natives[] = {"native harmony-reflect.js",
nullptr};
......
......@@ -208,7 +208,6 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode")
// Features that are shipping (turned on by default, but internal flag remains).
#define HARMONY_SHIPPING(V) \
V(harmony_arrow_functions, "harmony arrow functions") \
V(harmony_computed_property_names, "harmony computed property names") \
V(harmony_new_target, "harmony new.target") \
V(harmony_object_observe, "harmony Object.observe") \
V(harmony_spreadcalls, "harmony spread-calls") \
......
......@@ -913,8 +913,6 @@ Parser::Parser(ParseInfo* info)
set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
set_allow_harmony_sloppy(FLAG_harmony_sloppy);
set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
set_allow_harmony_computed_property_names(
FLAG_harmony_computed_property_names);
set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters);
set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls);
set_allow_harmony_destructuring(FLAG_harmony_destructuring);
......@@ -4492,7 +4490,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
SET_ALLOW(harmony_arrow_functions);
SET_ALLOW(harmony_sloppy);
SET_ALLOW(harmony_sloppy_let);
SET_ALLOW(harmony_computed_property_names);
SET_ALLOW(harmony_rest_parameters);
SET_ALLOW(harmony_spreadcalls);
SET_ALLOW(harmony_destructuring);
......
......@@ -111,7 +111,6 @@ class ParserBase : public Traits {
allow_harmony_arrow_functions_(false),
allow_harmony_sloppy_(false),
allow_harmony_sloppy_let_(false),
allow_harmony_computed_property_names_(false),
allow_harmony_rest_parameters_(false),
allow_harmony_spreadcalls_(false),
allow_harmony_destructuring_(false),
......@@ -129,7 +128,6 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(harmony_arrow_functions);
ALLOW_ACCESSORS(harmony_sloppy);
ALLOW_ACCESSORS(harmony_sloppy_let);
ALLOW_ACCESSORS(harmony_computed_property_names);
ALLOW_ACCESSORS(harmony_rest_parameters);
ALLOW_ACCESSORS(harmony_spreadcalls);
ALLOW_ACCESSORS(harmony_destructuring);
......@@ -803,7 +801,6 @@ class ParserBase : public Traits {
bool allow_harmony_arrow_functions_;
bool allow_harmony_sloppy_;
bool allow_harmony_sloppy_let_;
bool allow_harmony_computed_property_names_;
bool allow_harmony_rest_parameters_;
bool allow_harmony_spreadcalls_;
bool allow_harmony_destructuring_;
......@@ -2503,19 +2500,17 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParsePropertyName(
*name = this->GetNumberAsSymbol(scanner());
break;
case Token::LBRACK:
if (allow_harmony_computed_property_names_) {
*is_computed_name = true;
Consume(Token::LBRACK);
ExpressionClassifier computed_name_classifier;
ExpressionT expression = ParseAssignmentExpression(
true, &computed_name_classifier, CHECK_OK);
classifier->AccumulateReclassifyingAsPattern(computed_name_classifier);
Expect(Token::RBRACK, CHECK_OK);
return expression;
}
case Token::LBRACK: {
*is_computed_name = true;
Consume(Token::LBRACK);
ExpressionClassifier computed_name_classifier;
ExpressionT expression =
ParseAssignmentExpression(true, &computed_name_classifier, CHECK_OK);
classifier->AccumulateReclassifyingAsPattern(computed_name_classifier);
Expect(Token::RBRACK, CHECK_OK);
return expression;
}
// Fall through.
case Token::STATIC:
*is_static = true;
......
......@@ -1429,7 +1429,6 @@ enum ParserFlag {
kAllowHarmonyRestParameters,
kAllowHarmonySloppy,
kAllowHarmonySloppyLet,
kAllowHarmonyComputedPropertyNames,
kAllowHarmonySpreadCalls,
kAllowHarmonyDestructuring,
kAllowHarmonySpreadArrays,
......@@ -1458,8 +1457,6 @@ void SetParserFlags(i::ParserBase<Traits>* parser,
flags.Contains(kAllowHarmonySpreadCalls));
parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));
parser->set_allow_harmony_computed_property_names(
flags.Contains(kAllowHarmonyComputedPropertyNames));
parser->set_allow_harmony_destructuring(
flags.Contains(kAllowHarmonyDestructuring));
parser->set_allow_harmony_spread_arrays(
......@@ -5264,7 +5261,6 @@ TEST(ComputedPropertyName) {
NULL};
static const ParserFlag always_flags[] = {
kAllowHarmonyComputedPropertyNames,
kAllowHarmonySloppy,
};
RunParserSyncTest(context_data, error_data, kError, NULL, 0,
......@@ -5293,7 +5289,6 @@ TEST(ComputedPropertyNameShorthandError) {
NULL};
static const ParserFlag always_flags[] = {
kAllowHarmonyComputedPropertyNames,
kAllowHarmonySloppy,
};
RunParserSyncTest(context_data, error_data, kError, NULL, 0,
......@@ -5586,11 +5581,7 @@ TEST(DuplicateProtoNoError) {
NULL
};
static const ParserFlag always_flags[] = {
kAllowHarmonyComputedPropertyNames,
};
RunParserSyncTest(context_data, error_data, kSuccess, NULL, 0,
always_flags, arraysize(always_flags));
RunParserSyncTest(context_data, error_data, kSuccess);
}
......@@ -6329,7 +6320,6 @@ TEST(StrongModeFreeVariablesNotDeclared) {
TEST(DestructuringPositiveTests) {
i::FLAG_harmony_destructuring = true;
i::FLAG_harmony_arrow_functions = true;
i::FLAG_harmony_computed_property_names = true;
const char* context_data[][2] = {{"'use strict'; let ", " = {};"},
{"var ", " = {};"},
......@@ -6378,8 +6368,7 @@ TEST(DestructuringPositiveTests) {
"[a,,...rest]",
NULL};
// clang-format on
static const ParserFlag always_flags[] = {kAllowHarmonyComputedPropertyNames,
kAllowHarmonyArrowFunctions,
static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
kAllowHarmonyDestructuring};
RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
arraysize(always_flags));
......@@ -6389,9 +6378,7 @@ TEST(DestructuringPositiveTests) {
TEST(DestructuringNegativeTests) {
i::FLAG_harmony_destructuring = true;
i::FLAG_harmony_arrow_functions = true;
i::FLAG_harmony_computed_property_names = true;
static const ParserFlag always_flags[] = {kAllowHarmonyComputedPropertyNames,
kAllowHarmonyArrowFunctions,
static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
kAllowHarmonyDestructuring};
{ // All modes.
......@@ -6560,9 +6547,7 @@ TEST(DestructuringDisallowPatternsInForVarIn) {
TEST(DestructuringDuplicateParams) {
i::FLAG_harmony_destructuring = true;
i::FLAG_harmony_arrow_functions = true;
i::FLAG_harmony_computed_property_names = true;
static const ParserFlag always_flags[] = {kAllowHarmonyComputedPropertyNames,
kAllowHarmonyArrowFunctions,
static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
kAllowHarmonyDestructuring};
const char* context_data[][2] = {{"'use strict';", ""},
{"function outer() { 'use strict';", "}"},
......@@ -6590,9 +6575,7 @@ TEST(DestructuringDuplicateParams) {
TEST(DestructuringDuplicateParamsSloppy) {
i::FLAG_harmony_destructuring = true;
i::FLAG_harmony_arrow_functions = true;
i::FLAG_harmony_computed_property_names = true;
static const ParserFlag always_flags[] = {kAllowHarmonyComputedPropertyNames,
kAllowHarmonyArrowFunctions,
static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
kAllowHarmonyDestructuring};
const char* context_data[][2] = {
{"", ""}, {"function outer() {", "}"}, {nullptr, nullptr}};
......@@ -6615,9 +6598,7 @@ TEST(DestructuringDuplicateParamsSloppy) {
TEST(DestructuringDisallowPatternsInSingleParamArrows) {
i::FLAG_harmony_destructuring = true;
i::FLAG_harmony_arrow_functions = true;
i::FLAG_harmony_computed_property_names = true;
static const ParserFlag always_flags[] = {kAllowHarmonyComputedPropertyNames,
kAllowHarmonyArrowFunctions,
static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
kAllowHarmonyDestructuring};
const char* context_data[][2] = {{"'use strict';", ""},
{"function outer() { 'use strict';", "}"},
......@@ -6640,10 +6621,9 @@ TEST(DestructuringDisallowPatternsInRestParams) {
i::FLAG_harmony_destructuring = true;
i::FLAG_harmony_arrow_functions = true;
i::FLAG_harmony_rest_parameters = true;
i::FLAG_harmony_computed_property_names = true;
static const ParserFlag always_flags[] = {
kAllowHarmonyComputedPropertyNames, kAllowHarmonyArrowFunctions,
kAllowHarmonyRestParameters, kAllowHarmonyDestructuring};
static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions,
kAllowHarmonyRestParameters,
kAllowHarmonyDestructuring};
const char* context_data[][2] = {{"'use strict';", ""},
{"function outer() { 'use strict';", "}"},
{"", ""},
......
......@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-computed-property-names
// Test that we throw early syntax errors in harmony mode
// when using an immutable binding in an assigment or with
// prefix/postfix decrement/increment operators.
......
......@@ -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-computed-property-names --harmony-sloppy
// Flags: --harmony-sloppy
// Flags: --allow-natives-syntax
......
......@@ -4,8 +4,6 @@
'use strict';
// Flags: --harmony-computed-property-names
function ID(x) {
return x;
......
......@@ -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-computed-property-names --allow-natives-syntax
// Flags: --allow-natives-syntax
(function TestProtoDeopt() {
......
......@@ -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-computed-property-names
function ID(x) {
return x;
......
......@@ -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-computed-property-names --allow-natives-syntax
// Flags: --allow-natives-syntax
function ID(x) {
......
......@@ -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-computed-property-names
function ID(x) {
return x;
......
......@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-computed-property-names
// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
// Test that we throw early syntax errors in harmony mode
......
......@@ -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-destructuring --harmony-computed-property-names
// Flags: --harmony-destructuring
// Flags: --harmony-arrow-functions --no-lazy --allow-natives-syntax
......
......@@ -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-destructuring --harmony-computed-property-names
// Flags: --harmony-destructuring
// Flags: --harmony-arrow-functions --allow-natives-syntax
......
......@@ -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-destructuring --harmony-computed-property-names
// Flags: --harmony-destructuring
// Flags: --harmony-arrow-functions --harmony-rest-parameters
(function TestObjectLiteralPattern() {
......
......@@ -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-computed-property-names --harmony-sloppy
// Flags: --harmony-sloppy
assertThrows(function f() {
var t = { toString: function() { throw new Error(); } };
......
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --strong-mode --harmony-rest-parameters --harmony-arrow-functions
// Flags: --harmony-computed-property-names
// Note that it's essential for these tests that the reference is inside dead
// code (because we already produce ReferenceErrors for run-time unresolved
......
......@@ -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-destructuring --harmony-computed-property-names
// Flags: --harmony-destructuring
// Flags: --harmony-arrow-functions --strong-mode --allow-natives-syntax
(function() {
......
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