| Index: src/preparser.h
|
| diff --git a/src/preparser.h b/src/preparser.h
|
| index bdab177585bb05902be2d9c772132c82cf54fd82..b50019c0e406c7822ec1fcfb6abcbafb623d655d 100644
|
| --- a/src/preparser.h
|
| +++ b/src/preparser.h
|
| @@ -979,7 +979,8 @@ class PreParserScope {
|
| bool IsDeclared(const PreParserIdentifier& identifier) const { return false; }
|
| void DeclareParameter(const PreParserIdentifier& identifier, VariableMode) {}
|
| void RecordArgumentsUsage() {}
|
| - void RecordSuperUsage() {}
|
| + void RecordSuperPropertyUsage() {}
|
| + void RecordSuperConstructorCallUsage() {}
|
| void RecordThisUsage() {}
|
|
|
| // Allow scope->Foo() to work.
|
| @@ -2563,7 +2564,6 @@ ParserBase<Traits>::ParseMemberWithNewPrefixesExpression(bool* ok) {
|
| int new_pos = position();
|
| ExpressionT result = this->EmptyExpression();
|
| if (Check(Token::SUPER)) {
|
| - scope_->RecordSuperUsage();
|
| result = this->SuperReference(scope_, factory());
|
| } else {
|
| result = this->ParseMemberWithNewPrefixesExpression(CHECK_OK);
|
| @@ -2623,10 +2623,12 @@ ParserBase<Traits>::ParseMemberExpression(bool* ok) {
|
| } else if (peek() == Token::SUPER) {
|
| int beg_pos = position();
|
| Consume(Token::SUPER);
|
| - scope_->RecordSuperUsage();
|
| Token::Value next = peek();
|
| - if (next == Token::PERIOD || next == Token::LBRACK ||
|
| - next == Token::LPAREN) {
|
| + if (next == Token::PERIOD || next == Token::LBRACK) {
|
| + scope_->RecordSuperPropertyUsage();
|
| + result = this->SuperReference(scope_, factory());
|
| + } else if (next == Token::LPAREN) {
|
| + scope_->RecordSuperConstructorCallUsage();
|
| result = this->SuperReference(scope_, factory());
|
| } else {
|
| ReportMessageAt(Scanner::Location(beg_pos, position()),
|
|
|