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

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: CHECK_OK fixed 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
« no previous file with comments | « src/preparser.h ('k') | src/runtime/runtime-classes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 6cf0f1db4589797c2f2eaa5affe46167d0412636..68d9109db4e85aa7972db4fe377f62a101fd9ba3 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -1004,7 +1004,8 @@ PreParserExpression PreParser::ParseClassLiteral(
scope_->SetStrictMode(STRICT);
scope_->SetScopeName(name);
- if (Check(Token::EXTENDS)) {
+ bool has_extends = Check(Token::EXTENDS);
+ if (has_extends) {
ParseLeftHandSideExpression(CHECK_OK);
}
@@ -1018,8 +1019,8 @@ PreParserExpression PreParser::ParseClassLiteral(
const bool is_static = false;
bool is_computed_name = false; // Classes do not care about computed
// property names here.
- ParsePropertyDefinition(&checker, in_class, is_static, &is_computed_name,
- &has_seen_constructor, CHECK_OK);
+ ParsePropertyDefinition(&checker, in_class, has_extends, is_static,
+ &is_computed_name, &has_seen_constructor, CHECK_OK);
}
Expect(Token::RBRACE, CHECK_OK);
« no previous file with comments | « src/preparser.h ('k') | src/runtime/runtime-classes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698