| 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/crankshaft/hydrogen-instructions.h" | 5 #include "src/crankshaft/hydrogen-instructions.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/safe_math.h" | 8 #include "src/base/safe_math.h" |
| 9 #include "src/crankshaft/hydrogen-infer-representation.h" | 9 #include "src/crankshaft/hydrogen-infer-representation.h" |
| 10 #include "src/double.h" | 10 #include "src/double.h" |
| (...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1643 case IS_SPEC_OBJECT: | 1643 case IS_SPEC_OBJECT: |
| 1644 *first = FIRST_SPEC_OBJECT_TYPE; | 1644 *first = FIRST_SPEC_OBJECT_TYPE; |
| 1645 *last = LAST_SPEC_OBJECT_TYPE; | 1645 *last = LAST_SPEC_OBJECT_TYPE; |
| 1646 return; | 1646 return; |
| 1647 case IS_JS_ARRAY: | 1647 case IS_JS_ARRAY: |
| 1648 *first = *last = JS_ARRAY_TYPE; | 1648 *first = *last = JS_ARRAY_TYPE; |
| 1649 return; | 1649 return; |
| 1650 case IS_JS_DATE: | 1650 case IS_JS_DATE: |
| 1651 *first = *last = JS_DATE_TYPE; | 1651 *first = *last = JS_DATE_TYPE; |
| 1652 return; | 1652 return; |
| 1653 case IS_JS_REGEXP: |
| 1654 *first = *last = JS_REGEXP_TYPE; |
| 1655 return; |
| 1653 default: | 1656 default: |
| 1654 UNREACHABLE(); | 1657 UNREACHABLE(); |
| 1655 } | 1658 } |
| 1656 } | 1659 } |
| 1657 | 1660 |
| 1658 | 1661 |
| 1659 void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) { | 1662 void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) { |
| 1660 DCHECK(!is_interval_check()); | 1663 DCHECK(!is_interval_check()); |
| 1661 switch (check_) { | 1664 switch (check_) { |
| 1662 case IS_STRING: | 1665 case IS_STRING: |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 HValue* HCheckValue::Canonicalize() { | 1715 HValue* HCheckValue::Canonicalize() { |
| 1713 return (value()->IsConstant() && | 1716 return (value()->IsConstant() && |
| 1714 HConstant::cast(value())->EqualsUnique(object_)) ? NULL : this; | 1717 HConstant::cast(value())->EqualsUnique(object_)) ? NULL : this; |
| 1715 } | 1718 } |
| 1716 | 1719 |
| 1717 | 1720 |
| 1718 const char* HCheckInstanceType::GetCheckName() const { | 1721 const char* HCheckInstanceType::GetCheckName() const { |
| 1719 switch (check_) { | 1722 switch (check_) { |
| 1720 case IS_SPEC_OBJECT: return "object"; | 1723 case IS_SPEC_OBJECT: return "object"; |
| 1721 case IS_JS_ARRAY: return "array"; | 1724 case IS_JS_ARRAY: return "array"; |
| 1722 case IS_JS_DATE: | 1725 case IS_JS_DATE: return "date"; |
| 1723 return "date"; | 1726 case IS_JS_REGEXP: return "regexp"; |
| 1724 case IS_STRING: return "string"; | 1727 case IS_STRING: return "string"; |
| 1725 case IS_INTERNALIZED_STRING: return "internalized_string"; | 1728 case IS_INTERNALIZED_STRING: return "internalized_string"; |
| 1726 } | 1729 } |
| 1727 UNREACHABLE(); | 1730 UNREACHABLE(); |
| 1728 return ""; | 1731 return ""; |
| 1729 } | 1732 } |
| 1730 | 1733 |
| 1731 | 1734 |
| 1732 std::ostream& HCheckInstanceType::PrintDataTo( | 1735 std::ostream& HCheckInstanceType::PrintDataTo( |
| 1733 std::ostream& os) const { // NOLINT | 1736 std::ostream& os) const { // NOLINT |
| (...skipping 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4694 case HObjectAccess::kExternalMemory: | 4697 case HObjectAccess::kExternalMemory: |
| 4695 os << "[external-memory]"; | 4698 os << "[external-memory]"; |
| 4696 break; | 4699 break; |
| 4697 } | 4700 } |
| 4698 | 4701 |
| 4699 return os << "@" << access.offset(); | 4702 return os << "@" << access.offset(); |
| 4700 } | 4703 } |
| 4701 | 4704 |
| 4702 } // namespace internal | 4705 } // namespace internal |
| 4703 } // namespace v8 | 4706 } // namespace v8 |
| OLD | NEW |