Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index f2ec67f69b7efb899e937089759f2f5d6a6c9cb5..01fbf7e21b6d2550b35465a430272b277061d21d 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -288,6 +288,15 @@ void TargetCollector::AddTarget(Label* target, Zone* zone) { |
} |
+void UnaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { |
+ // TODO(oli) If this Operation is used in a test context, then the expression |
Jakob Kummerow
2013/06/24 15:06:35
nit: the identifier in the parentheses should be t
|
+ // has a ToBool stub and we want to collect this information. However the |
Jakob Kummerow
2013/06/24 15:06:35
nit: s/ToBool/ToBoolean/
|
+ // GraphBuilder expects it to be on the instruction corresponding to the |
+ // TestContext, therefore we have to store it here and not on the operand. |
+ to_boolean_types_ = oracle->ToBooleanTypes(expression()->test_id()); |
+} |
+ |
+ |
bool UnaryOperation::ResultOverwriteAllowed() { |
switch (op_) { |
case Token::BIT_NOT: |
@@ -299,6 +308,16 @@ bool UnaryOperation::ResultOverwriteAllowed() { |
} |
+void BinaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { |
+ // TODO(oli) If this Operation is used in a test context, then the right |
+ // hand side has a ToBool stub and we want to collect this information. |
+ // However the GraphBuilder expects it to be on the instruction corresponding |
+ // to the TestContext, therefore we have to store it here and not on the |
+ // right hand operand. |
+ to_boolean_types_ = oracle->ToBooleanTypes(right()->test_id()); |
+} |
+ |
+ |
bool BinaryOperation::ResultOverwriteAllowed() { |
switch (op_) { |
case Token::COMMA: |