| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index 38eabdae06aa5d9968d1479e050e883ff7b707f2..35409539df3bd912baf4034421420f30dc93fc73 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -1255,6 +1255,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);
|
| @@ -3749,6 +3769,18 @@ DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR(HSub, -)
|
| #undef DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR
|
|
|
|
|
| +HAdd* HAdd::NewExternalPointerOffset(Zone* zone,
|
| + HValue* context,
|
| + HValue* base_pointer,
|
| + HValue* offset) {
|
| + HAdd* result = new(zone) HAdd(context, base_pointer, offset);
|
| +
|
| + result->set_observed_input_representation(1, Representation::External());
|
| + result->initialize_output_representation(Representation::External());
|
| + return result;
|
| +}
|
| +
|
| +
|
| HInstruction* HStringAdd::New(Zone* zone,
|
| HValue* context,
|
| HValue* left,
|
|
|