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

Unified Diff: runtime/vm/scopes.h

Issue 1308163006: Reduce the number of captured variables in async code, by only capturing local (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 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 | « runtime/vm/parser.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.h
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index b9a2b1a4b56dde6316e365a9a9d2754664c79238..5faf502eb1857e817f0639df2116522c6092d5f0 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -327,9 +327,9 @@ class LocalScope : public ZoneAllocated {
// from this scope and belonging to outer scopes.
RawContextScope* PreserveOuterScope(int current_context_level) const;
- // Recursively traverses all siblings and children and marks all variables as
- // captured.
- void RecursivelyCaptureAllVariables();
+ // Mark all local variables that are accessible from this scope up to
+ // top_scope (included) as captured.
+ void CaptureLocalVariables(LocalScope* top_scope);
// Creates a LocalScope representing the outer scope of a local function to be
// compiled. This outer scope contains the variables captured by the function
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698