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

Unified Diff: src/parser.cc

Issue 807033003: Revert of ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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.h ('k') | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index e5b366bf0d80e42df13938e1942e0d2630f039e3..0713b26e8b9bfb24e9c06ad5c1500754d7243ab1 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -407,8 +407,9 @@
bool ParserTraits::IsThisProperty(Expression* expression) {
DCHECK(expression != NULL);
Property* property = expression->AsProperty();
- return property != NULL && property->obj()->IsVariableProxy() &&
- property->obj()->AsVariableProxy()->is_this();
+ return property != NULL &&
+ property->obj()->AsVariableProxy() != NULL &&
+ property->obj()->AsVariableProxy()->is_this();
}
@@ -432,7 +433,8 @@
void ParserTraits::CheckAssigningFunctionLiteralToProperty(Expression* left,
Expression* right) {
DCHECK(left != NULL);
- if (left->IsProperty() && right->IsFunctionLiteral()) {
+ if (left->AsProperty() != NULL &&
+ right->AsFunctionLiteral() != NULL) {
right->AsFunctionLiteral()->set_pretenure();
}
}
@@ -804,8 +806,6 @@
set_allow_harmony_templates(FLAG_harmony_templates);
set_allow_harmony_sloppy(FLAG_harmony_sloppy);
set_allow_harmony_unicode(FLAG_harmony_unicode);
- set_allow_harmony_computed_property_names(
- FLAG_harmony_computed_property_names);
for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
++feature) {
use_counts_[feature] = 0;
@@ -3976,8 +3976,6 @@
reusable_preparser_->set_allow_harmony_templates(allow_harmony_templates());
reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy());
reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode());
- reusable_preparser_->set_allow_harmony_computed_property_names(
- allow_harmony_computed_property_names());
}
PreParser::PreParseResult result =
reusable_preparser_->PreParseLazyFunction(strict_mode(),
@@ -4037,11 +4035,8 @@
if (fni_ != NULL) fni_->Enter();
const bool in_class = true;
const bool is_static = false;
- bool is_computed_name = false; // Classes do not care about computed
- // property names here.
- ObjectLiteral::Property* property =
- ParsePropertyDefinition(NULL, in_class, is_static, &is_computed_name,
- &has_seen_constructor, CHECK_OK);
+ ObjectLiteral::Property* property = ParsePropertyDefinition(
+ NULL, in_class, is_static, &has_seen_constructor, CHECK_OK);
if (has_seen_constructor && constructor == NULL) {
constructor = GetPropertyValue(property);
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698