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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 10562010: Chek stack overflow in while an do-while node (in order to be able to interrupt loops). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | « 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/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 8724)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -1074,6 +1074,11 @@
EffectGraphVisitor for_body(owner(), temp_index());
node->body()->Visit(&for_body);
+ if (for_body.is_open()) {
+ CheckStackOverflowComp* comp =
+ new CheckStackOverflowComp(node->token_index(), owner()->try_index());
+ for_body.AddInstruction(new DoInstr(comp));
+ }
Vyacheslav Egorov (Google) 2012/06/15 17:43:02 I am not sure that this is enough for the case lik
srdjan 2012/06/15 17:56:10 Done.
// Labels are set after body traversal.
SourceLabel* lbl = node->label();
@@ -1100,6 +1105,11 @@
// Traverse body first in order to generate continue and break labels.
EffectGraphVisitor for_body(owner(), temp_index());
node->body()->Visit(&for_body);
+ if (for_body.is_open()) {
+ CheckStackOverflowComp* comp =
+ new CheckStackOverflowComp(node->token_index(), owner()->try_index());
+ for_body.AddInstruction(new DoInstr(comp));
+ }
TestGraphVisitor for_test(owner(),
temp_index(),
« 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