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

Unified Diff: runtime/vm/flow_graph_builder.cc

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/ast_transformer.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 8214f6950606214653259bbf168e7cb89375d6cc..371ec0eb70658f932a35ce667691ce6841942e49 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2331,10 +2331,11 @@ void EffectGraphVisitor::VisitAwaitMarkerNode(AwaitMarkerNode* node) {
// We need to create a new await state which involves:
// * Increase the jump counter. Sanity check against the list of targets.
// * Save the current context for resuming.
- ASSERT(node->scope() != NULL);
- LocalVariable* jump_var = node->scope()->LookupVariable(
+ ASSERT(node->async_scope() != NULL);
+ ASSERT(node->await_scope() != NULL);
+ LocalVariable* jump_var = node->async_scope()->LookupVariable(
Symbols::AwaitJumpVar(), false);
- LocalVariable* ctx_var = node->scope()->LookupVariable(
+ LocalVariable* ctx_var = node->async_scope()->LookupVariable(
Symbols::AwaitContextVar(), false);
ASSERT((jump_var != NULL) && jump_var->is_captured());
ASSERT((ctx_var != NULL) && ctx_var->is_captured());
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698