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

Unified Diff: src/preparser.cc

Issue 867153003: new classes: special construct stub for derived classs and TDZ for `this`. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CR feedback 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/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 4d621c2dd9004c0a2b3434a8be2e561b42cfc1ee..cced33b00871b3d2b65ef55f8dab3e41fb885132 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -979,8 +979,10 @@ PreParserExpression PreParser::ParseClassLiteral(
scope_->SetStrictMode(STRICT);
scope_->SetScopeName(name);
+ bool has_extends = false;
rossberg 2015/02/02 16:32:38 Nit: bool has_extends = Check(Token::EXTENDS);
Dmitry Lomov (no reviews) 2015/02/03 15:47:04 Done.
if (Check(Token::EXTENDS)) {
ParseLeftHandSideExpression(CHECK_OK);
+ has_extends = true;
}
bool has_seen_constructor = false;
@@ -992,8 +994,8 @@ PreParserExpression PreParser::ParseClassLiteral(
const bool is_static = false;
bool is_computed_name = false; // Classes do not care about computed
// property names here.
- ParsePropertyDefinition(NULL, in_class, is_static, &is_computed_name,
- &has_seen_constructor, CHECK_OK);
+ ParsePropertyDefinition(NULL, in_class, has_extends, is_static,
+ &is_computed_name, &has_seen_constructor, CHECK_OK);
}
Expect(Token::RBRACE, CHECK_OK);

Powered by Google App Engine
This is Rietveld 408576698