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

Unified Diff: src/parser.cc

Issue 873823003: Move object literal checking into checker classes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Split the impl of the checker into 2 classes Created 5 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
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 51e79bb14cf1c6519de925d6bb1434e06ccc225f..59a6e0ab4f5bb9e672eb7c8d4cc0f002bba4f73a 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -4010,6 +4010,8 @@ ClassLiteral* Parser::ParseClassLiteral(const AstRawString* name,
block_scope->set_start_position(scanner()->location().end_pos);
}
+
+ ClassLiteralChecker checker(this);
ZoneList<ObjectLiteral::Property*>* properties = NewPropertyList(4, zone());
FunctionLiteral* constructor = NULL;
bool has_seen_constructor = false;
@@ -4022,9 +4024,9 @@ ClassLiteral* Parser::ParseClassLiteral(const AstRawString* name,
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(
+ &checker, in_class, is_static, &is_computed_name, &has_seen_constructor,
+ CHECK_OK);
if (has_seen_constructor && constructor == NULL) {
constructor = GetPropertyValue(property)->AsFunctionLiteral();
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/ppc/full-codegen-ppc.cc » ('j') | src/preparser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698