Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: src/scopes.cc

Issue 7979001: Scope tree serialization and ScopeIterator cleanup. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« src/scopes.h ('K') | « src/scopes.h ('k') | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698