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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2589733002: Setup local var descriptors in kernel mode. (Closed)
Patch Set: Created 4 years 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/compiler.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index 2f1b8f2a7ce029b43c95a813ed8ec33b61f86d47..53985e21e2cd58b4209ff344cc4c4403c4a97208 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -662,7 +662,7 @@ void ScopeBuilder::VisitFunctionNode(FunctionNode* node) {
node->body()->AcceptStatementVisitor(this);
}
- // Ensure that :await_jump_var and :await_ctx_var are captured.
+ // Ensure that :await_jump_var, :await_ctx_var and :async_op are captured.
if (node->async_marker() == FunctionNode::kSyncYielding) {
{
LocalVariable* temp = NULL;
@@ -676,6 +676,13 @@ void ScopeBuilder::VisitFunctionNode(FunctionNode* node) {
(depth_.function_ == 0) ? &result_->yield_context_variable : &temp,
Symbols::AwaitContextVar());
}
+ {
+ LocalVariable* temp =
+ scope_->LookupVariable(Symbols::AsyncOperation(), true);
+ if (temp != NULL) {
+ scope_->CaptureVariable(temp);
+ }
+ }
}
}
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698