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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2535813002: VM: [Kernel] Need to keep `stack_` correct, fixes failures in debug JIT mode (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | 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 dedb3fd533b564ece324959071bae95ba21bde9c..598fd7360a414057e5a683a9af8364ec68a65cc9 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -3817,6 +3817,7 @@ Fragment FlowGraphBuilder::TranslateStatement(Statement* statement) {
intptr_t original_context_depth = context_depth_;
#endif
statement->AcceptStatementVisitor(this);
+ ASSERT(stack_ == NULL);
DEBUG_ASSERT(context_depth_ == original_context_depth);
return fragment_;
}
@@ -4945,6 +4946,8 @@ void FlowGraphBuilder::VisitReturnStatement(ReturnStatement* node) {
} else {
instructions += Return();
}
+ } else {
+ Pop();
}
fragment_ = instructions;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698