| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 756ae0d83eff31c6e8056dfa84ad150f45ca7499..d5a2546fd11cad1ca0cdd55fa197047547906b0f 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -4747,15 +4747,18 @@ class HRandom V8_FINAL : public HTemplateInstruction<1> {
|
|
|
| class HAdd V8_FINAL : public HArithmeticBinaryOperation {
|
| public:
|
| - static HInstruction* New(Zone* zone,
|
| - HValue* context,
|
| - HValue* left,
|
| - HValue* right);
|
| + static HInstruction* New(
|
| + Zone* zone,
|
| + HValue* context,
|
| + HValue* left,
|
| + HValue* right,
|
| + Representation forced_representation = Representation::None());
|
|
|
| // Add is only commutative if two integer values are added and not if two
|
| // tagged values are added (because it might be a String concatenation).
|
| + // We also do not commute (pointer + offset).
|
| virtual bool IsCommutative() const V8_OVERRIDE {
|
| - return !representation().IsTagged();
|
| + return !representation().IsTagged() && !representation().IsExternal();
|
| }
|
|
|
| virtual HValue* EnsureAndPropagateNotMinusZero(
|
| @@ -4791,6 +4794,10 @@ class HAdd V8_FINAL : public HArithmeticBinaryOperation {
|
| }
|
| }
|
|
|
| + virtual Representation RepresentationFromInputs() V8_OVERRIDE;
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE;
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(Add)
|
|
|
| protected:
|
| @@ -6508,6 +6515,8 @@ class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> {
|
| } else if (field_representation().IsDouble() ||
|
| field_representation().IsSmi()) {
|
| return field_representation();
|
| + } else if (field_representation().IsExternal()) {
|
| + return Representation::External();
|
| }
|
| }
|
| return Representation::Tagged();
|
|
|