Chromium Code Reviews| Index: src/scopes.cc |
| diff --git a/src/scopes.cc b/src/scopes.cc |
| index 9aba84f2c99bbf3c17b4c5342e304d32f0a353d5..f3e16eae996e96a332c9e66be92650e99a9907a7 100644 |
| --- a/src/scopes.cc |
| +++ b/src/scopes.cc |
| @@ -157,8 +157,12 @@ Scope::Scope(Scope* inner_scope, |
| decls_(4), |
| already_resolved_(true) { |
| SetDefaults(type, NULL, scope_info); |
| - if (!scope_info.is_null() && scope_info->HasHeapAllocatedLocals()) { |
| - num_heap_slots_ = scope_info_->NumberOfContextSlots(); |
| + if (!scope_info.is_null()) { |
| + if (scope_info->HasHeapAllocatedLocals()) { |
| + num_heap_slots_ = scope_info_->NumberOfContextSlots(); |
| + } |
| + source_beg_statement_pos_ = scope_info_->SourceBegStatementPos(); |
| + source_end_statement_pos_ = scope_info_->SourceEndStatementPos(); |
| } |
| AddInnerScope(inner_scope); |
| } |
| @@ -208,6 +212,8 @@ void Scope::SetDefaults(Type type, |
| num_stack_slots_ = 0; |
| num_heap_slots_ = 0; |
| scope_info_ = scope_info; |
| + source_beg_statement_pos_ = RelocInfo::kNoPosition; |
|
Kevin Millikin (Chromium)
2011/10/05 08:43:36
You could consider setting positions for all scope
Steven
2011/10/06 19:09:27
It is set for all scopes during initial parsing, b
|
| + source_end_statement_pos_ = RelocInfo::kNoPosition; |
| } |