Index: src/preparser.cc |
diff --git a/src/preparser.cc b/src/preparser.cc |
index 2bed1932710e0573a015a3503bbe2894fa23d11d..049179c8cd8f0d9568a973f49404c527481691f2 100644 |
--- a/src/preparser.cc |
+++ b/src/preparser.cc |
@@ -102,18 +102,18 @@ PreParserExpression PreParserTraits::ParseFunctionLiteral( |
PreParser::PreParseResult PreParser::PreParseLazyFunction( |
- LanguageMode language_mode, bool is_generator, ParserRecorder* log) { |
+ LanguageMode language_mode, FunctionKind kind, ParserRecorder* log) { |
log_ = log; |
// Lazy functions always have trivial outer scopes (no with/catch scopes). |
PreParserScope top_scope(scope_, SCRIPT_SCOPE); |
PreParserFactory top_factory(NULL); |
- FunctionState top_state(&function_state_, &scope_, &top_scope, &top_factory); |
+ FunctionState top_state(&function_state_, &scope_, &top_scope, |
+ kNormalFunction, &top_factory); |
scope_->SetLanguageMode(language_mode); |
PreParserScope function_scope(scope_, FUNCTION_SCOPE); |
PreParserFactory function_factory(NULL); |
- FunctionState function_state(&function_state_, &scope_, &function_scope, |
+ FunctionState function_state(&function_state_, &scope_, &function_scope, kind, |
&function_factory); |
- function_state.set_is_generator(is_generator); |
DCHECK_EQ(Token::LBRACE, scanner()->current_token()); |
bool ok = true; |
int start_position = peek_position(); |
@@ -864,9 +864,8 @@ PreParser::Expression PreParser::ParseFunctionLiteral( |
ScopeType outer_scope_type = scope_->type(); |
PreParserScope function_scope(scope_, FUNCTION_SCOPE); |
PreParserFactory factory(NULL); |
- FunctionState function_state(&function_state_, &scope_, &function_scope, |
+ FunctionState function_state(&function_state_, &scope_, &function_scope, kind, |
&factory); |
- function_state.set_is_generator(IsGeneratorFunction(kind)); |
// FormalParameterList :: |
// '(' (Identifier)*[','] ')' |
Expect(Token::LPAREN, CHECK_OK); |