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

Unified Diff: src/parser.cc

Issue 7904008: Introduce with scope and rework variable resolution. (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/scopes.h » ('j') | src/scopes.h » ('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 e8d18106165515f7e43e58ba700d5fcf5d63a4cd..b7d367d432bb5d80e3a30f0a50d02557c5282f24 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -2080,7 +2080,11 @@ Statement* Parser::ParseWithStatement(ZoneStringList* labels, bool* ok) {
++with_nesting_level_;
top_scope_->DeclarationScope()->RecordWithStatement();
+ Scope* saved_scope = top_scope_;
Kevin Millikin (Chromium) 2011/09/15 09:38:13 Now that we have three or four places using this p
Steven 2011/09/15 19:54:06 Done.
+ Scope* with_scope = NewScope(top_scope_, Scope::WITH_SCOPE, true);
+ top_scope_ = with_scope;
Statement* stmt = ParseStatement(labels, CHECK_OK);
+ top_scope_ = saved_scope;
--with_nesting_level_;
return new(zone()) WithStatement(expr, stmt);
}
« no previous file with comments | « no previous file | src/scopes.h » ('j') | src/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698