Chromium Code Reviews| Index: src/fast-codegen.cc |
| =================================================================== |
| --- src/fast-codegen.cc (revision 3203) |
| +++ src/fast-codegen.cc (working copy) |
| @@ -75,6 +75,7 @@ |
| void FastCodeGenerator::VisitDeclarations( |
| ZoneList<Declaration*>* declarations) { |
| + Comment cmnt(masm_, "[ Declarations"); |
| int length = declarations->length(); |
| int globals = 0; |
| for (int i = 0; i < length; i++) { |
| @@ -289,6 +290,7 @@ |
| void FastCodeGenerator::VisitIfStatement(IfStatement* stmt) { |
| + Comment cmnt(masm_, "[ IfStatement"); |
| // Expressions cannot recursively enter statements, there are no labels in |
| // the state. |
| ASSERT_EQ(NULL, true_label_); |
| @@ -350,9 +352,11 @@ |
| void FastCodeGenerator::VisitForStatement(ForStatement* stmt) { |
| + Comment cmnt(masm_, "[ ForStatement"); |
| Label test, body, exit; |
| if (stmt->init() != NULL) Visit(stmt->init()); |
| + increment_loop_depth(); |
|
Søren Thygesen Gjesse
2009/11/03 13:57:47
How placing the increment_loop_depth()/decrement_l
Kevin Millikin (Chromium)
2009/11/03 14:16:09
I thought about that, but it seemed too complicate
|
| // Emit the test at the bottom of the loop (even if empty). |
| __ jmp(&test); |
| __ bind(&body); |
| @@ -377,6 +381,7 @@ |
| } |
| __ bind(&exit); |
| + decrement_loop_depth(); |
| } |
| @@ -407,6 +412,7 @@ |
| void FastCodeGenerator::VisitConditional(Conditional* expr) { |
| + Comment cmnt(masm_, "[ Conditional"); |
| ASSERT_EQ(Expression::kTest, expr->condition()->context()); |
| ASSERT_EQ(expr->context(), expr->then_expression()->context()); |
| ASSERT_EQ(expr->context(), expr->else_expression()->context()); |
| @@ -447,6 +453,7 @@ |
| void FastCodeGenerator::VisitLiteral(Literal* expr) { |
| + Comment cmnt(masm_, "[ Literal"); |
| Move(expr->context(), expr); |
| } |