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

Unified Diff: src/preparser.h

Issue 1168513004: [es6] Super call in arrows and eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Push this_function earlier Created 5 years, 7 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/pattern-rewriter.cc ('k') | src/prettyprinter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 2fe5db1d08e9e0f1b63d68c69950ca29ae31371a..34295c71f297bce5cdca1fc81aa80252298304e5 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1715,9 +1715,15 @@ class PreParserTraits {
return PreParserExpression::This();
}
- static PreParserExpression SuperReference(Scope* scope,
- PreParserFactory* factory,
- int pos) {
+ static PreParserExpression SuperPropertyReference(Scope* scope,
+ PreParserFactory* factory,
+ int pos) {
+ return PreParserExpression::Default();
+ }
+
+ static PreParserExpression SuperCallReference(Scope* scope,
+ PreParserFactory* factory,
+ int pos) {
return PreParserExpression::Default();
}
@@ -3515,7 +3521,7 @@ ParserBase<Traits>::ParseStrongSuperCallExpression(
Consume(Token::SUPER);
int pos = position();
Scanner::Location super_loc = scanner()->location();
- ExpressionT expr = this->SuperReference(scope_, factory(), pos);
+ ExpressionT expr = this->SuperCallReference(scope_, factory(), pos);
if (peek() != Token::LPAREN) {
ReportMessage(MessageTemplate::kStrongConstructorSuper);
@@ -3580,7 +3586,7 @@ ParserBase<Traits>::ParseSuperExpression(bool is_new,
i::IsConstructor(kind)) {
if (peek() == Token::PERIOD || peek() == Token::LBRACK) {
scope->RecordSuperPropertyUsage();
- return this->SuperReference(scope_, factory(), pos);
+ return this->SuperPropertyReference(scope_, factory(), pos);
}
// new super() is never allowed.
// super() is only allowed in derived constructor
@@ -3595,7 +3601,7 @@ ParserBase<Traits>::ParseSuperExpression(bool is_new,
// TODO(rossberg): This might not be the correct FunctionState for the
// method here.
function_state_->set_super_location(scanner()->location());
- return this->SuperReference(scope_, factory(), pos);
+ return this->SuperCallReference(scope_, factory(), pos);
}
}
« no previous file with comments | « src/pattern-rewriter.cc ('k') | src/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698