Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 9f586469583c5cc7681c6a78c8f3d05b7b3ed260..664bf396c09b9ba17fd73fd8e16e00c420c9fb3b 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -1627,7 +1627,8 @@ class PreParserTraits { |
PreParserIdentifier name, Scanner::Location function_name_location, |
FunctionNameValidity function_name_validity, FunctionKind kind, |
int function_token_position, FunctionLiteral::FunctionType type, |
- FunctionLiteral::ArityRestriction arity_restriction, bool* ok); |
+ FunctionLiteral::ArityRestriction arity_restriction, |
+ LanguageMode language_mode, bool* ok); |
PreParserExpression ParseClassLiteral(PreParserIdentifier name, |
Scanner::Location class_name_location, |
@@ -1775,7 +1776,8 @@ class PreParser : public ParserBase<PreParserTraits> { |
Identifier name, Scanner::Location function_name_location, |
FunctionNameValidity function_name_validity, FunctionKind kind, |
int function_token_pos, FunctionLiteral::FunctionType function_type, |
- FunctionLiteral::ArityRestriction arity_restriction, bool* ok); |
+ FunctionLiteral::ArityRestriction arity_restriction, |
+ LanguageMode language_mode, bool* ok); |
void ParseLazyFunctionLiteralBody(bool* ok, |
Scanner::BookmarkScope* bookmark = nullptr); |
@@ -2550,7 +2552,7 @@ ParserBase<Traits>::ParsePropertyDefinition( |
value = this->ParseFunctionLiteral( |
name, scanner()->location(), kSkipFunctionNameCheck, kind, |
RelocInfo::kNoPosition, FunctionLiteral::ANONYMOUS_EXPRESSION, |
- FunctionLiteral::NORMAL_ARITY, |
+ FunctionLiteral::NORMAL_ARITY, language_mode(), |
CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); |
return factory()->NewObjectLiteralProperty(name_expression, value, |
@@ -2583,7 +2585,7 @@ ParserBase<Traits>::ParsePropertyDefinition( |
name, scanner()->location(), kSkipFunctionNameCheck, kind, |
RelocInfo::kNoPosition, FunctionLiteral::ANONYMOUS_EXPRESSION, |
is_get ? FunctionLiteral::GETTER_ARITY : FunctionLiteral::SETTER_ARITY, |
- CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); |
+ language_mode(), CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); |
// Make sure the name expression is a string since we need a Name for |
// Runtime_DefineAccessorPropertyUnchecked and since we can determine this |
@@ -3302,7 +3304,7 @@ ParserBase<Traits>::ParseMemberExpression(ExpressionClassifier* classifier, |
is_generator ? FunctionKind::kGeneratorFunction |
: FunctionKind::kNormalFunction, |
function_token_position, function_type, FunctionLiteral::NORMAL_ARITY, |
- CHECK_OK); |
+ language_mode(), CHECK_OK); |
} else if (peek() == Token::SUPER) { |
const bool is_new = false; |
result = ParseSuperExpression(is_new, classifier, CHECK_OK); |