Chromium Code Reviews| Index: runtime/vm/flow_graph_builder.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_builder.cc (revision 8724) |
| +++ runtime/vm/flow_graph_builder.cc (working copy) |
| @@ -1073,6 +1073,11 @@ |
| ASSERT(!for_test.is_empty()); // Language spec. |
| EffectGraphVisitor for_body(owner(), temp_index()); |
| + if (for_body.is_open()) { |
|
Vyacheslav Egorov (Google)
2012/06/15 18:02:51
if is not required now. it is always open right af
srdjan
2012/06/15 18:05:06
Done.
|
| + CheckStackOverflowComp* comp = |
| + new CheckStackOverflowComp(node->token_index(), owner()->try_index()); |
| + for_body.AddInstruction(new DoInstr(comp)); |
| + } |
| node->body()->Visit(&for_body); |
| // Labels are set after body traversal. |
| @@ -1099,6 +1104,11 @@ |
| void EffectGraphVisitor::VisitDoWhileNode(DoWhileNode* node) { |
| // Traverse body first in order to generate continue and break labels. |
| EffectGraphVisitor for_body(owner(), temp_index()); |
| + if (for_body.is_open()) { |
|
Vyacheslav Egorov (Google)
2012/06/15 18:02:51
ditto
srdjan
2012/06/15 18:05:06
Done.
|
| + CheckStackOverflowComp* comp = |
| + new CheckStackOverflowComp(node->token_index(), owner()->try_index()); |
| + for_body.AddInstruction(new DoInstr(comp)); |
| + } |
| node->body()->Visit(&for_body); |
| TestGraphVisitor for_test(owner(), |
| @@ -1163,12 +1173,12 @@ |
| EffectGraphVisitor for_body(owner(), temp_index()); |
| TargetEntryInstr* body_entry = new TargetEntryInstr(); |
| for_body.AddInstruction(body_entry); |
| - node->body()->Visit(&for_body); |
| if (for_body.is_open()) { |
|
Vyacheslav Egorov (Google)
2012/06/15 18:02:51
ditto
srdjan
2012/06/15 18:05:06
Done.
|
| CheckStackOverflowComp* comp = |
| new CheckStackOverflowComp(node->token_index(), owner()->try_index()); |
| for_body.AddInstruction(new DoInstr(comp)); |
| } |
| + node->body()->Visit(&for_body); |
| // Join loop body, increment and compute their end instruction. |
| ASSERT(!for_body.is_empty()); |