| Index: src/preparser.cc
|
| diff --git a/src/preparser.cc b/src/preparser.cc
|
| index fc4481fd868d24b1a13a627db6d961fbdeae5dea..13bbc4100530b53da25cb9aef37019246c8ee679 100644
|
| --- a/src/preparser.cc
|
| +++ b/src/preparser.cc
|
| @@ -1323,16 +1323,15 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
|
| }
|
| Expect(Token::RPAREN, CHECK_OK);
|
|
|
| - // Determine if the function will be lazily compiled.
|
| - // Currently only happens to top-level functions.
|
| - // Optimistically assume that all top-level functions are lazily compiled.
|
| - bool is_lazily_compiled = (outer_scope_type == GLOBAL_SCOPE &&
|
| - !inside_with && allow_lazy() &&
|
| - !parenthesized_function_);
|
| + // See Parser::ParseFunctionLiteral for more information about lazy parsing
|
| + // and lazy compilation.
|
| + bool is_lazily_parsed = (outer_scope_type == GLOBAL_SCOPE &&
|
| + !inside_with && allow_lazy() &&
|
| + !parenthesized_function_);
|
| parenthesized_function_ = false;
|
|
|
| Expect(Token::LBRACE, CHECK_OK);
|
| - if (is_lazily_compiled) {
|
| + if (is_lazily_parsed) {
|
| ParseLazyFunctionLiteralBody(CHECK_OK);
|
| } else {
|
| ParseSourceElements(Token::RBRACE, ok);
|
|
|