Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index e816471ce604561601f90dfd08f41e25ed3d7495..5675c55571b33799daab064bc118944bc1c0fe13 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); |