| 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/factory.h" | 9 #include "src/factory.h" |
| 10 #include "src/hydrogen-infer-representation.h" | 10 #include "src/hydrogen-infer-representation.h" |
| (...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 InstanceType* last) { | 1619 InstanceType* last) { |
| 1620 DCHECK(is_interval_check()); | 1620 DCHECK(is_interval_check()); |
| 1621 switch (check_) { | 1621 switch (check_) { |
| 1622 case IS_SPEC_OBJECT: | 1622 case IS_SPEC_OBJECT: |
| 1623 *first = FIRST_SPEC_OBJECT_TYPE; | 1623 *first = FIRST_SPEC_OBJECT_TYPE; |
| 1624 *last = LAST_SPEC_OBJECT_TYPE; | 1624 *last = LAST_SPEC_OBJECT_TYPE; |
| 1625 return; | 1625 return; |
| 1626 case IS_JS_ARRAY: | 1626 case IS_JS_ARRAY: |
| 1627 *first = *last = JS_ARRAY_TYPE; | 1627 *first = *last = JS_ARRAY_TYPE; |
| 1628 return; | 1628 return; |
| 1629 case IS_JS_DATE: |
| 1630 *first = *last = JS_DATE_TYPE; |
| 1631 return; |
| 1629 default: | 1632 default: |
| 1630 UNREACHABLE(); | 1633 UNREACHABLE(); |
| 1631 } | 1634 } |
| 1632 } | 1635 } |
| 1633 | 1636 |
| 1634 | 1637 |
| 1635 void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) { | 1638 void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) { |
| 1636 DCHECK(!is_interval_check()); | 1639 DCHECK(!is_interval_check()); |
| 1637 switch (check_) { | 1640 switch (check_) { |
| 1638 case IS_STRING: | 1641 case IS_STRING: |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 HValue* HCheckValue::Canonicalize() { | 1691 HValue* HCheckValue::Canonicalize() { |
| 1689 return (value()->IsConstant() && | 1692 return (value()->IsConstant() && |
| 1690 HConstant::cast(value())->EqualsUnique(object_)) ? NULL : this; | 1693 HConstant::cast(value())->EqualsUnique(object_)) ? NULL : this; |
| 1691 } | 1694 } |
| 1692 | 1695 |
| 1693 | 1696 |
| 1694 const char* HCheckInstanceType::GetCheckName() const { | 1697 const char* HCheckInstanceType::GetCheckName() const { |
| 1695 switch (check_) { | 1698 switch (check_) { |
| 1696 case IS_SPEC_OBJECT: return "object"; | 1699 case IS_SPEC_OBJECT: return "object"; |
| 1697 case IS_JS_ARRAY: return "array"; | 1700 case IS_JS_ARRAY: return "array"; |
| 1701 case IS_JS_DATE: |
| 1702 return "date"; |
| 1698 case IS_STRING: return "string"; | 1703 case IS_STRING: return "string"; |
| 1699 case IS_INTERNALIZED_STRING: return "internalized_string"; | 1704 case IS_INTERNALIZED_STRING: return "internalized_string"; |
| 1700 } | 1705 } |
| 1701 UNREACHABLE(); | 1706 UNREACHABLE(); |
| 1702 return ""; | 1707 return ""; |
| 1703 } | 1708 } |
| 1704 | 1709 |
| 1705 | 1710 |
| 1706 std::ostream& HCheckInstanceType::PrintDataTo( | 1711 std::ostream& HCheckInstanceType::PrintDataTo( |
| 1707 std::ostream& os) const { // NOLINT | 1712 std::ostream& os) const { // NOLINT |
| (...skipping 3001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4709 case HObjectAccess::kExternalMemory: | 4714 case HObjectAccess::kExternalMemory: |
| 4710 os << "[external-memory]"; | 4715 os << "[external-memory]"; |
| 4711 break; | 4716 break; |
| 4712 } | 4717 } |
| 4713 | 4718 |
| 4714 return os << "@" << access.offset(); | 4719 return os << "@" << access.offset(); |
| 4715 } | 4720 } |
| 4716 | 4721 |
| 4717 } // namespace internal | 4722 } // namespace internal |
| 4718 } // namespace v8 | 4723 } // namespace v8 |
| OLD | NEW |