| Index: src/full-codegen.cc
|
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc
|
| index 796b0717cf0e84dc1a627cfeed126f4565e2ab2a..97987c27a80c7aae2c1349a12141fbcf171bad70 100644
|
| --- a/src/full-codegen.cc
|
| +++ b/src/full-codegen.cc
|
| @@ -1128,9 +1128,14 @@ void FullCodeGenerator::VisitConditional(Conditional* expr) {
|
| __ bind(&true_case);
|
| SetExpressionPosition(expr->then_expression(),
|
| expr->then_expression_position());
|
| - Visit(expr->then_expression());
|
| - // If control flow falls through Visit, jump to done.
|
| - if (!context()->IsTest()) {
|
| + if (context()->IsTest()) {
|
| + const TestContext* for_test = TestContext::cast(context());
|
| + VisitForControl(expr->then_expression(),
|
| + for_test->true_label(),
|
| + for_test->false_label(),
|
| + NULL);
|
| + } else {
|
| + Visit(expr->then_expression());
|
| __ jmp(&done);
|
| }
|
|
|
|
|