| Index: src/full-codegen.cc
|
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc
|
| index 59cbad95b57d11a6b893ee8965fddb066384557a..5ffebfb53b758ad08325b0b46a6e8cb3b84cf55e 100644
|
| --- a/src/full-codegen.cc
|
| +++ b/src/full-codegen.cc
|
| @@ -825,7 +825,7 @@ void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) {
|
|
|
| void FullCodeGenerator::VisitWhileStatement(WhileStatement* stmt) {
|
| Comment cmnt(masm_, "[ WhileStatement");
|
| - Label body, stack_limit_hit, stack_check_success;
|
| + Label body, stack_limit_hit, stack_check_success, done;
|
|
|
| Iteration loop_statement(this, stmt);
|
| increment_loop_depth();
|
| @@ -833,11 +833,6 @@ void FullCodeGenerator::VisitWhileStatement(WhileStatement* stmt) {
|
| // Emit the test at the bottom of the loop.
|
| __ jmp(loop_statement.continue_target());
|
|
|
| - __ bind(&stack_limit_hit);
|
| - StackCheckStub stack_stub;
|
| - __ CallStub(&stack_stub);
|
| - __ jmp(&stack_check_success);
|
| -
|
| __ bind(&body);
|
| Visit(stmt->body());
|
| __ bind(loop_statement.continue_target());
|
| @@ -856,6 +851,14 @@ void FullCodeGenerator::VisitWhileStatement(WhileStatement* stmt) {
|
| loop_statement.break_target());
|
|
|
| __ bind(loop_statement.break_target());
|
| + __ jmp(&done);
|
| +
|
| + __ bind(&stack_limit_hit);
|
| + StackCheckStub stack_stub;
|
| + __ CallStub(&stack_stub);
|
| + __ jmp(&stack_check_success);
|
| +
|
| + __ bind(&done);
|
| decrement_loop_depth();
|
| }
|
|
|
|
|