| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 0f6cb6e473d7454dd9cb1709f3b2faef1f1feaf3..8c8f426485f7b4437401042a3898c77de1f10d68 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -720,6 +720,11 @@ class HValue: public ZoneObject {
|
| return representation();
|
| }
|
|
|
| + // Type feedback access.
|
| + virtual Representation ObservedInputRepresentation(int index) {
|
| + return RequiredInputRepresentation(index);
|
| + }
|
| +
|
| // This gives the instruction an opportunity to replace itself with an
|
| // instruction that does the same in some better way. To replace an
|
| // instruction with a new one, first add the new instruction to the graph,
|
| @@ -2398,11 +2403,17 @@ class HPhi: public HValue {
|
|
|
| void set_is_convertible_to_integer(bool b) {
|
| is_convertible_to_integer_ = b;
|
| + if (!is_convertible_to_integer_) {
|
| + non_phi_uses_[Representation::kInteger32] = 0;
|
| + indirect_uses_[Representation::kInteger32] = 0;
|
| + }
|
| }
|
|
|
| bool AllOperandsConvertibleToInteger() {
|
| for (int i = 0; i < OperandCount(); ++i) {
|
| - if (!OperandAt(i)->IsConvertibleToInteger()) return false;
|
| + if (!OperandAt(i)->IsConvertibleToInteger()) {
|
| + return false;
|
| + }
|
| }
|
| return true;
|
| }
|
| @@ -2556,6 +2567,7 @@ class HBinaryOperation: public HTemplateInstruction<3> {
|
| if (IsCommutative() && left()->IsConstant()) return right();
|
| return left();
|
| }
|
| +
|
| HValue* MostConstantOperand() {
|
| if (IsCommutative() && left()->IsConstant()) return left();
|
| return right();
|
| @@ -2721,6 +2733,9 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
|
| set_representation(Representation::Tagged());
|
| SetFlag(kFlexibleRepresentation);
|
| SetAllSideEffects();
|
| + observed_input_representation_[0] = Representation::Tagged();
|
| + observed_input_representation_[1] = Representation::None();
|
| + observed_input_representation_[2] = Representation::None();
|
| }
|
|
|
| virtual Representation RequiredInputRepresentation(int index) {
|
| @@ -2740,7 +2755,18 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
|
|
|
| virtual HType CalculateInferredType();
|
|
|
| + virtual Representation ObservedInputRepresentation(int index) {
|
| + return observed_input_representation_[index];
|
| + }
|
| +
|
| + void InitializeObservedInputRepresentation(Representation r) {
|
| + observed_input_representation_[1] = r;
|
| + observed_input_representation_[2] = r;
|
| + }
|
| +
|
| DECLARE_ABSTRACT_INSTRUCTION(BitwiseBinaryOperation)
|
| + private:
|
| + Representation observed_input_representation_[3];
|
| };
|
|
|
|
|
|
|