Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: src/preparser.h

Issue 1273543002: Delete --harmony-computed-property-names flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index f4961e76a83f39d1a5f170c6e9bcf7757cf501d4..22633b6a030b39824e01f387b336bc04903b85d6 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -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;
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698