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

Unified Diff: src/parser.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
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | src/runtime.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 053ff26f3c114f6a32f5df391c9231a45e27a6c5..4481ddce520e9c3e243d334743a0aeeee42ac3f6 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -471,9 +471,12 @@ class SaveScope BASE_EMBEDDED {
: parser_(parser),
previous_top_scope_(parser->top_scope_) {
parser->top_scope_ = scope;
+ scope->SetSourceBegStatementPos(parser_->scanner().location().beg_pos);
Kevin Millikin (Chromium) 2011/10/05 08:43:36 I'm leery of setting this implicitly. It's too ea
Steven 2011/10/06 19:09:27 Doing it explicitly now as it also gives me more c
}
~SaveScope() {
+ parser_->top_scope_->SetSourceEndStatementPos(
+ parser_->scanner().location().beg_pos);
parser_->top_scope_ = previous_top_scope_;
}
@@ -3883,6 +3886,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> function_name,
type,
has_duplicate_parameters);
function_literal->set_function_token_position(function_token_position);
+ scope->SetSourceBegStatementPos(start_pos);
Kevin Millikin (Chromium) 2011/10/05 08:43:36 It's a bit warty that some scopes have positions s
Steven 2011/10/06 19:09:27 Removed the local variables and removed them from
+ scope->SetSourceEndStatementPos(end_pos);
if (fni_ != NULL && should_infer_name) fni_->AddFunction(function_literal);
return function_literal;
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698