Index: src/full-codegen.h |
=================================================================== |
--- src/full-codegen.h (revision 8228) |
+++ src/full-codegen.h (working copy) |
@@ -298,7 +298,10 @@ |
// Helper function to convert a pure value into a test context. The value |
// is expected on the stack or the accumulator, depending on the platform. |
// See the platform-specific implementation for details. |
- void DoTest(Label* if_true, Label* if_false, Label* fall_through); |
+ void DoTest(Expression* condition, |
+ Label* if_true, |
+ Label* if_false, |
+ Label* fall_through); |
// Helper function to split control flow and avoid a branch to the |
// fall-through label if it is set up. |
@@ -347,7 +350,7 @@ |
Label* if_true, |
Label* if_false, |
Label* fall_through) { |
- TestContext context(this, if_true, if_false, fall_through); |
+ TestContext context(this, expr, if_true, if_false, fall_through); |
VisitInCurrentContext(expr); |
} |
@@ -670,11 +673,13 @@ |
class TestContext : public ExpressionContext { |
public: |
- explicit TestContext(FullCodeGenerator* codegen, |
- Label* true_label, |
- Label* false_label, |
- Label* fall_through) |
+ TestContext(FullCodeGenerator* codegen, |
+ Expression* condition, |
+ Label* true_label, |
+ Label* false_label, |
+ Label* fall_through) |
: ExpressionContext(codegen), |
+ condition_(condition), |
true_label_(true_label), |
false_label_(false_label), |
fall_through_(fall_through) { } |
@@ -704,6 +709,7 @@ |
virtual bool IsTest() const { return true; } |
private: |
+ Expression* condition_; |
Label* true_label_; |
Label* false_label_; |
Label* fall_through_; |