Chromium Code Reviews| Index: src/parser.cc |
| diff --git a/src/parser.cc b/src/parser.cc |
| index fb52eef56382155d70889fa53efcc74ba8f5a700..c3b6841cef7c3ffc8c40e0f40f7a38fca2d4f309 100644 |
| --- a/src/parser.cc |
| +++ b/src/parser.cc |
| @@ -519,6 +519,7 @@ void ParserTraits::CheckPossibleEvalCall(Expression* expression, |
| if (callee != NULL && |
| callee->raw_name() == parser_->ast_value_factory()->eval_string()) { |
| scope->DeclarationScope()->RecordEvalCall(); |
| + scope->RecordEvalCall(); |
| } |
| } |
| @@ -3294,8 +3295,8 @@ Statement* Parser::DesugarLexicalBindingsInForStatement( |
| clear_first = |
| factory()->NewExpressionStatement(assignment, RelocInfo::kNoPosition); |
| } |
| - Statement* clear_first_or_next = |
| - factory()->NewIfStatement(compare, clear_first, next, next->position()); |
| + Statement* clear_first_or_next = factory()->NewIfStatement( |
| + compare, clear_first, next, RelocInfo::kNoPosition); |
| inner_block->AddStatement(clear_first_or_next, zone()); |
| } |
| @@ -4038,6 +4039,12 @@ FunctionLiteral* Parser::ParseFunctionLiteral( |
| parenthesized_function_ = false; // The bit was set for this function only. |
| if (is_lazily_parsed) { |
| + for (Scope* s = scope_->outer_scope(); |
| + s != nullptr && (s->is_block_scope() || s->is_catch_scope() || |
|
rossberg
2015/04/21 14:41:02
Would it work to make the condition
s && s != s
Dmitry Lomov (no reviews)
2015/04/21 16:59:24
Great suggestion, done.
|
| + s->is_with_scope()); |
| + s = s->outer_scope()) { |
| + s->ForceContextAllocation(); |
| + } |
| SkipLazyFunctionBody(function_name, &materialized_literal_count, |
| &expected_property_count, CHECK_OK); |
| } else { |