Chromium Code Reviews| Index: src/data-flow.cc |
| diff --git a/src/data-flow.cc b/src/data-flow.cc |
| index efd14fcb184facc8e04937e3f5923a5b0f719568..7330215af04e3daf44be33a5c1e973b54f103367 100644 |
| --- a/src/data-flow.cc |
| +++ b/src/data-flow.cc |
| @@ -214,12 +214,13 @@ static Statement* PeelForLoop(ForStatement* stmt) { |
| block->AddStatement(init); |
| } |
| - // Copy the condition. |
| + // Copy the condition but mark the copy as no longer a loop condition. |
| CopyAstVisitor copy_visitor; |
| Expression* cond_copy = stmt->cond() != NULL |
| ? copy_visitor.DeepCopyExpr(stmt->cond()) |
| : new Literal(Factory::true_value()); |
| if (copy_visitor.HasStackOverflow()) return NULL; |
| + cond_copy->set_is_loop_condition(false); |
|
Søren Thygesen Gjesse
2010/03/23 13:21:02
Strictly speaking this is a lie, and it will cause
Kevin Millikin (Chromium)
2010/03/23 13:36:26
I guess not. I've removed it for now.
|
| // Construct a block with the peeled body and the rest of the for-loop. |
| Statement* body_copy = copy_visitor.DeepCopyStmt(stmt->body()); |