Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index 6b6532149f05df1a5be973299ce35234a02c715e..216daa27d23d423ddcc1afa47ab9fc0b1b5c10bb 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -124,7 +124,8 @@ Scope::Scope(Zone* zone, Scope* outer_scope, ScopeType scope_type) |
SetDefaults(); |
set_language_mode(outer_scope->language_mode()); |
force_context_allocation_ = |
- !is_function_scope() && outer_scope->has_forced_context_allocation(); |
+ (!is_function_scope() && outer_scope->has_forced_context_allocation()) || |
+ is_eval_scope(); |
adamk
2017/01/03 18:33:43
I don't think you want to do this here; "forced co
marja
2017/01/03 19:55:50
Done.
|
outer_scope_->AddInnerScope(this); |
} |
@@ -1179,7 +1180,6 @@ bool Scope::AllowsLazyParsingWithoutUnresolvedVariables( |
// the parse, since context allocation of those variables is already |
// guaranteed to be correct. |
for (const Scope* s = this; s != outer; s = s->outer_scope_) { |
- if (s->is_eval_scope()) return false; |
// Catch scopes force context allocation of all variables. |
if (s->is_catch_scope()) continue; |
// With scopes do not introduce variables that need allocation. |