Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index 123a7bdc6f636615b399530f15942846673ff85b..e3ce0f0172a4c340c0a904d30c6511b7b9bb476a 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -1280,9 +1280,8 @@ void* Parser::ParseStatementList(ZoneList<Statement*>* body, int end_token, |
Scanner::Location old_super_loc = function_state_->super_location(); |
Statement* stat = ParseStatementListItem(CHECK_OK); |
- if (is_strong(language_mode()) && |
- scope_->is_function_scope() && |
- i::IsConstructor(function_state_->kind())) { |
+ if (is_strong(language_mode()) && scope_->is_function_scope() && |
+ IsClassConstructor(function_state_->kind())) { |
Scanner::Location this_loc = function_state_->this_location(); |
Scanner::Location super_loc = function_state_->super_location(); |
if (this_loc.beg_pos != old_this_loc.beg_pos && |
@@ -1336,7 +1335,7 @@ void* Parser::ParseStatementList(ZoneList<Statement*>* body, int end_token, |
if (use_strong_found) { |
scope_->SetLanguageMode( |
static_cast<LanguageMode>(scope_->language_mode() | STRONG)); |
- if (i::IsConstructor(function_state_->kind())) { |
+ if (IsClassConstructor(function_state_->kind())) { |
// "use strong" cannot occur in a class constructor body, to avoid |
// unintuitive strong class object semantics. |
ParserTraits::ReportMessageAt( |
@@ -2642,7 +2641,7 @@ Statement* Parser::ParseExpressionOrLabelledStatement( |
// Fall through. |
case Token::SUPER: |
if (is_strong(language_mode()) && |
- i::IsConstructor(function_state_->kind())) { |
+ IsClassConstructor(function_state_->kind())) { |
bool is_this = peek() == Token::THIS; |
Expression* expr; |
ExpressionClassifier classifier; |
@@ -2849,7 +2848,7 @@ Statement* Parser::ParseReturnStatement(bool* ok) { |
} |
} else { |
if (is_strong(language_mode()) && |
- i::IsConstructor(function_state_->kind())) { |
+ IsClassConstructor(function_state_->kind())) { |
int pos = peek_position(); |
ReportMessageAt(Scanner::Location(pos, pos + 1), |
MessageTemplate::kStrongConstructorReturnValue); |
@@ -4604,7 +4603,7 @@ ZoneList<Statement*>* Parser::ParseEagerFunctionBody( |
// For concise constructors, check that they are constructed, |
// not called. |
- if (i::IsConstructor(kind)) { |
+ if (IsClassConstructor(kind)) { |
AddAssertIsConstruct(result, pos); |
} |