Index: src/scopes.cc |
diff --git a/src/scopes.cc b/src/scopes.cc |
index e05ca172518cdf8cdc7abf4eb9ef697673bd1c9e..9092499ee907b0f006d4ccf31e965c5684343674 100644 |
--- a/src/scopes.cc |
+++ b/src/scopes.cc |
@@ -148,6 +148,7 @@ Scope::Scope(Scope* inner_scope, |
SetDefaults(type, NULL, scope_info); |
if (!scope_info.is_null()) { |
num_heap_slots_ = scope_info_->ContextLength(); |
+ stack_slots_depth_ = scope_info_->StackSlotsDepth(); |
if (*scope_info != ScopeInfo::Empty()) { |
language_mode_ = scope_info->language_mode(); |
} |
@@ -207,6 +208,7 @@ void Scope::SetDefaults(ScopeType type, |
scope_info_ = scope_info; |
start_position_ = RelocInfo::kNoPosition; |
end_position_ = RelocInfo::kNoPosition; |
+ stack_slots_depth_ = 0; |
if (!scope_info.is_null()) { |
scope_calls_eval_ = scope_info->CallsEval(); |
language_mode_ = scope_info->language_mode(); |
@@ -1007,8 +1009,7 @@ bool Scope::MustAllocate(Variable* var) { |
scope_calls_eval_ || |
inner_scope_calls_eval_ || |
scope_contains_with_ || |
- is_catch_scope() || |
- is_block_scope())) { |
+ is_catch_scope())) { |
var->set_is_used(true); |
} |
// Global variables do not need to be allocated. |
@@ -1025,7 +1026,7 @@ bool Scope::MustAllocateInContext(Variable* var) { |
// Exceptions: temporary variables are never allocated in a context; |
// catch-bound variables are always allocated in a context. |
if (var->mode() == TEMPORARY) return false; |
- if (is_catch_scope() || is_block_scope()) return true; |
+ if (is_catch_scope()) return true; |
return var->has_forced_context_allocation() || |
scope_calls_eval_ || |
inner_scope_calls_eval_ || |