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

Unified Diff: src/parsing/parser-base.h

Issue 2646333002: [parser] Delete has_seen_proto in ObjectLiteral. (Closed)
Patch Set: Created 3 years, 11 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/ast/ast.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 3ddf2f550a76b13f835e053cb7868cffdb42fa6c..46283f5f6ce61affaabfaf4e9da49722b3bcf17a 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -2552,7 +2552,6 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseObjectLiteral(
typename Types::ObjectPropertyList properties =
impl()->NewObjectPropertyList(4);
int number_of_boilerplate_properties = 0;
- bool has_seen_proto = false;
bool has_computed_names = false;
bool has_rest_property = false;
@@ -2576,9 +2575,7 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseObjectLiteral(
has_rest_property = true;
}
- if (!impl()->IsBoilerplateProperty(property)) {
- has_seen_proto = true;
- } else if (!has_computed_names) {
+ if (impl()->IsBoilerplateProperty(property) && !has_computed_names) {
// Count CONSTANT or COMPUTED properties to maintain the enumeration
// order.
number_of_boilerplate_properties++;
@@ -2599,8 +2596,8 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseObjectLiteral(
int literal_index = function_state_->NextMaterializedLiteralIndex();
return factory()->NewObjectLiteral(properties, literal_index,
- number_of_boilerplate_properties,
- has_seen_proto, pos, has_rest_property);
+ number_of_boilerplate_properties, pos,
+ has_rest_property);
}
template <typename Impl>
« no previous file with comments | « src/ast/ast.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698