| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index 21c38d59dfc481ef24d989029ea80e375d3201e4..589bd5a48f16bc2f892396f4fc3d2b2a99cac6b1 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -288,6 +288,16 @@ void TargetCollector::AddTarget(Label* target, Zone* zone) {
|
| }
|
|
|
|
|
| +void UnaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
|
| + // TODO(olivf) If this Operation is used in a test context, then the
|
| + // expression has a ToBoolean stub and we want to collect the type
|
| + // 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 operand.
|
| + set_to_boolean_types(oracle->ToBooleanTypes(expression()->test_id()));
|
| +}
|
| +
|
| +
|
| bool UnaryOperation::ResultOverwriteAllowed() {
|
| switch (op_) {
|
| case Token::BIT_NOT:
|
| @@ -299,6 +309,16 @@ bool UnaryOperation::ResultOverwriteAllowed() {
|
| }
|
|
|
|
|
| +void BinaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
|
| + // TODO(olivf) If this Operation is used in a test context, then the right
|
| + // hand side has a ToBoolean stub and we want to collect the type 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.
|
| + set_to_boolean_types(oracle->ToBooleanTypes(right()->test_id()));
|
| +}
|
| +
|
| +
|
| bool BinaryOperation::ResultOverwriteAllowed() {
|
| switch (op_) {
|
| case Token::COMMA:
|
|
|