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

Unified Diff: runtime/vm/scopes.cc

Issue 22678002: Follow-up to capturing instantiator (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/scopes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.cc
===================================================================
--- runtime/vm/scopes.cc (revision 25919)
+++ runtime/vm/scopes.cc (working copy)
@@ -342,7 +342,7 @@
}
-void LocalScope::CaptureVariable(const String& name) {
+bool LocalScope::CaptureVariable(const String& name) {
ASSERT(name.IsSymbol());
LocalScope* current_scope = this;
while (current_scope != NULL) {
@@ -358,10 +358,11 @@
ASSERT(var->owner() != intermediate_scope); // Item is an alias.
intermediate_scope = intermediate_scope->parent();
}
- return;
+ return true;
}
current_scope = current_scope->parent();
}
+ return false;
}
« no previous file with comments | « runtime/vm/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698