| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/double.h" | 8 #include "src/double.h" |
| 9 #include "src/elements.h" | 9 #include "src/elements.h" |
| 10 #include "src/factory.h" | 10 #include "src/factory.h" |
| (...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 return Representation::External(); | 1436 return Representation::External(); |
| 1437 } | 1437 } |
| 1438 return HArithmeticBinaryOperation::RepresentationFromInputs(); | 1438 return HArithmeticBinaryOperation::RepresentationFromInputs(); |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 | 1441 |
| 1442 Representation HAdd::RequiredInputRepresentation(int index) { | 1442 Representation HAdd::RequiredInputRepresentation(int index) { |
| 1443 if (index == 2) { | 1443 if (index == 2) { |
| 1444 Representation left_rep = left()->representation(); | 1444 Representation left_rep = left()->representation(); |
| 1445 if (left_rep.IsExternal()) { | 1445 if (left_rep.IsExternal()) { |
| 1446 return Representation::Integer32(); | 1446 // Either Tagged or Integer32. |
| 1447 return Representation::None(); |
| 1447 } | 1448 } |
| 1448 } | 1449 } |
| 1449 return HArithmeticBinaryOperation::RequiredInputRepresentation(index); | 1450 return HArithmeticBinaryOperation::RequiredInputRepresentation(index); |
| 1450 } | 1451 } |
| 1451 | 1452 |
| 1452 | 1453 |
| 1453 static bool IsIdentityOperation(HValue* arg1, HValue* arg2, int32_t identity) { | 1454 static bool IsIdentityOperation(HValue* arg1, HValue* arg2, int32_t identity) { |
| 1454 return arg1->representation().IsSpecialization() && | 1455 return arg1->representation().IsSpecialization() && |
| 1455 arg2->EqualsInteger32Constant(identity); | 1456 arg2->EqualsInteger32Constant(identity); |
| 1456 } | 1457 } |
| (...skipping 3254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4711 case HObjectAccess::kExternalMemory: | 4712 case HObjectAccess::kExternalMemory: |
| 4712 os << "[external-memory]"; | 4713 os << "[external-memory]"; |
| 4713 break; | 4714 break; |
| 4714 } | 4715 } |
| 4715 | 4716 |
| 4716 return os << "@" << access.offset(); | 4717 return os << "@" << access.offset(); |
| 4717 } | 4718 } |
| 4718 | 4719 |
| 4719 } // namespace internal | 4720 } // namespace internal |
| 4720 } // namespace v8 | 4721 } // namespace v8 |
| OLD | NEW |