Index: src/full-codegen.cc |
=================================================================== |
--- src/full-codegen.cc (revision 8272) |
+++ src/full-codegen.cc (working copy) |
@@ -441,7 +441,7 @@ |
// For simplicity we always test the accumulator register. |
__ Move(result_register(), reg); |
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL); |
- codegen()->DoTest(true_label_, false_label_, fall_through_); |
+ codegen()->DoTest(this); |
} |
@@ -463,7 +463,7 @@ |
// For simplicity we always test the accumulator register. |
__ pop(result_register()); |
codegen()->PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL); |
- codegen()->DoTest(true_label_, false_label_, fall_through_); |
+ codegen()->DoTest(this); |
} |
@@ -513,6 +513,14 @@ |
} |
+void FullCodeGenerator::DoTest(const TestContext* context) { |
+ DoTest(context->condition(), |
+ context->true_label(), |
+ context->false_label(), |
+ context->fall_through()); |
+} |
+ |
+ |
void FullCodeGenerator::VisitDeclarations( |
ZoneList<Declaration*>* declarations) { |
int length = declarations->length(); |
@@ -734,9 +742,9 @@ |
Label discard, restore; |
PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL); |
if (is_logical_and) { |
- DoTest(&discard, &restore, &restore); |
+ DoTest(left, &discard, &restore, &restore); |
} else { |
- DoTest(&restore, &discard, &restore); |
+ DoTest(left, &restore, &discard, &restore); |
} |
__ bind(&restore); |
__ pop(result_register()); |
@@ -753,9 +761,9 @@ |
Label discard; |
PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL); |
if (is_logical_and) { |
- DoTest(&discard, &done, &discard); |
+ DoTest(left, &discard, &done, &discard); |
} else { |
- DoTest(&done, &discard, &discard); |
+ DoTest(left, &done, &discard, &discard); |
} |
__ bind(&discard); |
__ Drop(1); |