| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index 84949c09aa1df1b3038f20d6ab2a8c6a45e267ae..3bdce74f1766dfc89067a79b386d4d594822608d 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -1262,6 +1262,26 @@ HValue* HBitwise::Canonicalize() {
|
| }
|
|
|
|
|
| +Representation HAdd::RepresentationFromInputs() {
|
| + Representation left_rep = left()->representation();
|
| + if (left_rep.IsExternal()) {
|
| + return Representation::External();
|
| + }
|
| + return HArithmeticBinaryOperation::RepresentationFromInputs();
|
| +}
|
| +
|
| +
|
| +Representation HAdd::RequiredInputRepresentation(int index) {
|
| + if (index == 2) {
|
| + Representation left_rep = left()->representation();
|
| + if (left_rep.IsExternal()) {
|
| + return Representation::Integer32();
|
| + }
|
| + }
|
| + return HArithmeticBinaryOperation::RequiredInputRepresentation(index);
|
| +}
|
| +
|
| +
|
| static bool IsIdentityOperation(HValue* arg1, HValue* arg2, int32_t identity) {
|
| return arg1->representation().IsSpecialization() &&
|
| arg2->EqualsInteger32Constant(identity);
|
|
|