| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_OBJECTS_H_ | 28 #ifndef V8_OBJECTS_H_ |
| 29 #define V8_OBJECTS_H_ | 29 #define V8_OBJECTS_H_ |
| 30 | 30 |
| 31 #include "allocation.h" | 31 #include "allocation.h" |
| 32 #include "builtins.h" | 32 #include "builtins.h" |
| 33 #include "elements-kind.h" |
| 33 #include "list.h" | 34 #include "list.h" |
| 34 #include "property-details.h" | 35 #include "property-details.h" |
| 35 #include "smart-array-pointer.h" | 36 #include "smart-array-pointer.h" |
| 36 #include "unicode-inl.h" | 37 #include "unicode-inl.h" |
| 37 #if V8_TARGET_ARCH_ARM | 38 #if V8_TARGET_ARCH_ARM |
| 38 #include "arm/constants-arm.h" | 39 #include "arm/constants-arm.h" |
| 39 #elif V8_TARGET_ARCH_MIPS | 40 #elif V8_TARGET_ARCH_MIPS |
| 40 #include "mips/constants-mips.h" | 41 #include "mips/constants-mips.h" |
| 41 #endif | 42 #endif |
| 42 #include "v8checks.h" | 43 #include "v8checks.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // - CodeCache | 125 // - CodeCache |
| 125 // | 126 // |
| 126 // Formats of Object*: | 127 // Formats of Object*: |
| 127 // Smi: [31 bit signed int] 0 | 128 // Smi: [31 bit signed int] 0 |
| 128 // HeapObject: [32 bit direct pointer] (4 byte aligned) | 01 | 129 // HeapObject: [32 bit direct pointer] (4 byte aligned) | 01 |
| 129 // Failure: [30 bit signed int] 11 | 130 // Failure: [30 bit signed int] 11 |
| 130 | 131 |
| 131 namespace v8 { | 132 namespace v8 { |
| 132 namespace internal { | 133 namespace internal { |
| 133 | 134 |
| 134 enum ElementsKind { | |
| 135 // The "fast" kind for elements that only contain SMI values. Must be first | |
| 136 // to make it possible to efficiently check maps for this kind. | |
| 137 FAST_SMI_ONLY_ELEMENTS, | |
| 138 | |
| 139 // The "fast" kind for tagged values. Must be second to make it possible to | |
| 140 // efficiently check maps for this and the FAST_SMI_ONLY_ELEMENTS kind | |
| 141 // together at once. | |
| 142 FAST_ELEMENTS, | |
| 143 | |
| 144 // The "fast" kind for unwrapped, non-tagged double values. | |
| 145 FAST_DOUBLE_ELEMENTS, | |
| 146 | |
| 147 // The "slow" kind. | |
| 148 DICTIONARY_ELEMENTS, | |
| 149 NON_STRICT_ARGUMENTS_ELEMENTS, | |
| 150 // The "fast" kind for external arrays | |
| 151 EXTERNAL_BYTE_ELEMENTS, | |
| 152 EXTERNAL_UNSIGNED_BYTE_ELEMENTS, | |
| 153 EXTERNAL_SHORT_ELEMENTS, | |
| 154 EXTERNAL_UNSIGNED_SHORT_ELEMENTS, | |
| 155 EXTERNAL_INT_ELEMENTS, | |
| 156 EXTERNAL_UNSIGNED_INT_ELEMENTS, | |
| 157 EXTERNAL_FLOAT_ELEMENTS, | |
| 158 EXTERNAL_DOUBLE_ELEMENTS, | |
| 159 EXTERNAL_PIXEL_ELEMENTS, | |
| 160 | |
| 161 // Derived constants from ElementsKind | |
| 162 FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_BYTE_ELEMENTS, | |
| 163 LAST_EXTERNAL_ARRAY_ELEMENTS_KIND = EXTERNAL_PIXEL_ELEMENTS, | |
| 164 FIRST_ELEMENTS_KIND = FAST_SMI_ONLY_ELEMENTS, | |
| 165 LAST_ELEMENTS_KIND = EXTERNAL_PIXEL_ELEMENTS | |
| 166 }; | |
| 167 | |
| 168 enum CompareMapMode { | 135 enum CompareMapMode { |
| 169 REQUIRE_EXACT_MAP, | 136 REQUIRE_EXACT_MAP, |
| 170 ALLOW_ELEMENT_TRANSITION_MAPS | 137 ALLOW_ELEMENT_TRANSITION_MAPS |
| 171 }; | 138 }; |
| 172 | 139 |
| 173 enum KeyedAccessGrowMode { | 140 enum KeyedAccessGrowMode { |
| 174 DO_NOT_ALLOW_JSARRAY_GROWTH, | 141 DO_NOT_ALLOW_JSARRAY_GROWTH, |
| 175 ALLOW_JSARRAY_GROWTH | 142 ALLOW_JSARRAY_GROWTH |
| 176 }; | 143 }; |
| 177 | 144 |
| 178 const int kElementsKindCount = LAST_ELEMENTS_KIND - FIRST_ELEMENTS_KIND + 1; | |
| 179 | |
| 180 void PrintElementsKind(FILE* out, ElementsKind kind); | |
| 181 | |
| 182 inline bool IsMoreGeneralElementsKindTransition(ElementsKind from_kind, | |
| 183 ElementsKind to_kind); | |
| 184 | |
| 185 // Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER. | 145 // Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER. |
| 186 enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER }; | 146 enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER }; |
| 187 | 147 |
| 188 | 148 |
| 189 // PropertyNormalizationMode is used to specify whether to keep | 149 // PropertyNormalizationMode is used to specify whether to keep |
| 190 // inobject properties when normalizing properties of a JSObject. | 150 // inobject properties when normalizing properties of a JSObject. |
| 191 enum PropertyNormalizationMode { | 151 enum PropertyNormalizationMode { |
| 192 CLEAR_INOBJECT_PROPERTIES, | 152 CLEAR_INOBJECT_PROPERTIES, |
| 193 KEEP_INOBJECT_PROPERTIES | 153 KEEP_INOBJECT_PROPERTIES |
| 194 }; | 154 }; |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 // EnsureWritableFastElements in this case. | 1462 // EnsureWritableFastElements in this case. |
| 1503 // | 1463 // |
| 1504 // In the slow mode the elements is either a NumberDictionary, an | 1464 // In the slow mode the elements is either a NumberDictionary, an |
| 1505 // ExternalArray, or a FixedArray parameter map for a (non-strict) | 1465 // ExternalArray, or a FixedArray parameter map for a (non-strict) |
| 1506 // arguments object. | 1466 // arguments object. |
| 1507 DECL_ACCESSORS(elements, FixedArrayBase) | 1467 DECL_ACCESSORS(elements, FixedArrayBase) |
| 1508 inline void initialize_elements(); | 1468 inline void initialize_elements(); |
| 1509 MUST_USE_RESULT inline MaybeObject* ResetElements(); | 1469 MUST_USE_RESULT inline MaybeObject* ResetElements(); |
| 1510 inline ElementsKind GetElementsKind(); | 1470 inline ElementsKind GetElementsKind(); |
| 1511 inline ElementsAccessor* GetElementsAccessor(); | 1471 inline ElementsAccessor* GetElementsAccessor(); |
| 1512 inline bool HasFastSmiOnlyElements(); | 1472 inline bool HasFastSmiElements(); |
| 1513 inline bool HasFastElements(); | 1473 inline bool HasFastObjectElements(); |
| 1514 // Returns if an object has either FAST_ELEMENT or FAST_SMI_ONLY_ELEMENT | 1474 inline bool HasFastSmiOrObjectElements(); |
| 1515 // elements. TODO(danno): Rename HasFastTypeElements to HasFastElements() and | |
| 1516 // HasFastElements to HasFastObjectElements. | |
| 1517 inline bool HasFastTypeElements(); | |
| 1518 inline bool HasFastDoubleElements(); | 1475 inline bool HasFastDoubleElements(); |
| 1476 inline bool HasFastHoleyElements(); |
| 1519 inline bool HasNonStrictArgumentsElements(); | 1477 inline bool HasNonStrictArgumentsElements(); |
| 1520 inline bool HasDictionaryElements(); | 1478 inline bool HasDictionaryElements(); |
| 1521 inline bool HasExternalPixelElements(); | 1479 inline bool HasExternalPixelElements(); |
| 1522 inline bool HasExternalArrayElements(); | 1480 inline bool HasExternalArrayElements(); |
| 1523 inline bool HasExternalByteElements(); | 1481 inline bool HasExternalByteElements(); |
| 1524 inline bool HasExternalUnsignedByteElements(); | 1482 inline bool HasExternalUnsignedByteElements(); |
| 1525 inline bool HasExternalShortElements(); | 1483 inline bool HasExternalShortElements(); |
| 1526 inline bool HasExternalUnsignedShortElements(); | 1484 inline bool HasExternalUnsignedShortElements(); |
| 1527 inline bool HasExternalIntElements(); | 1485 inline bool HasExternalIntElements(); |
| 1528 inline bool HasExternalUnsignedIntElements(); | 1486 inline bool HasExternalUnsignedIntElements(); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); | 1661 MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); |
| 1704 MUST_USE_RESULT MaybeObject* SetIdentityHash(Object* hash, CreationFlag flag); | 1662 MUST_USE_RESULT MaybeObject* SetIdentityHash(Object* hash, CreationFlag flag); |
| 1705 | 1663 |
| 1706 static Handle<Object> DeleteProperty(Handle<JSObject> obj, | 1664 static Handle<Object> DeleteProperty(Handle<JSObject> obj, |
| 1707 Handle<String> name); | 1665 Handle<String> name); |
| 1708 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); | 1666 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); |
| 1709 | 1667 |
| 1710 static Handle<Object> DeleteElement(Handle<JSObject> obj, uint32_t index); | 1668 static Handle<Object> DeleteElement(Handle<JSObject> obj, uint32_t index); |
| 1711 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode); | 1669 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode); |
| 1712 | 1670 |
| 1713 inline void ValidateSmiOnlyElements(); | 1671 void ValidateElements(); |
| 1714 | 1672 |
| 1715 // Makes sure that this object can contain HeapObject as elements. | 1673 // Makes sure that this object can contain HeapObject as elements. |
| 1716 MUST_USE_RESULT inline MaybeObject* EnsureCanContainHeapObjectElements(); | 1674 MUST_USE_RESULT inline MaybeObject* EnsureCanContainHeapObjectElements(); |
| 1717 | 1675 |
| 1718 // Makes sure that this object can contain the specified elements. | 1676 // Makes sure that this object can contain the specified elements. |
| 1719 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 1677 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
| 1720 Object** elements, | 1678 Object** elements, |
| 1721 uint32_t count, | 1679 uint32_t count, |
| 1722 EnsureElementsMode mode); | 1680 EnsureElementsMode mode); |
| 1723 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 1681 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
| 1724 FixedArrayBase* elements, | 1682 FixedArrayBase* elements, |
| 1683 uint32_t length, |
| 1725 EnsureElementsMode mode); | 1684 EnsureElementsMode mode); |
| 1726 MUST_USE_RESULT MaybeObject* EnsureCanContainElements( | 1685 MUST_USE_RESULT MaybeObject* EnsureCanContainElements( |
| 1727 Arguments* arguments, | 1686 Arguments* arguments, |
| 1728 uint32_t first_arg, | 1687 uint32_t first_arg, |
| 1729 uint32_t arg_count, | 1688 uint32_t arg_count, |
| 1730 EnsureElementsMode mode); | 1689 EnsureElementsMode mode); |
| 1731 | 1690 |
| 1732 // Do we want to keep the elements in fast case when increasing the | 1691 // Do we want to keep the elements in fast case when increasing the |
| 1733 // capacity? | 1692 // capacity? |
| 1734 bool ShouldConvertToSlowElements(int new_capacity); | 1693 bool ShouldConvertToSlowElements(int new_capacity); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 PropertyAttributes attributes, | 1772 PropertyAttributes attributes, |
| 1814 StrictModeFlag strict_mode, | 1773 StrictModeFlag strict_mode, |
| 1815 bool check_prototype = true, | 1774 bool check_prototype = true, |
| 1816 SetPropertyMode set_mode = SET_PROPERTY); | 1775 SetPropertyMode set_mode = SET_PROPERTY); |
| 1817 | 1776 |
| 1818 // Returns the index'th element. | 1777 // Returns the index'th element. |
| 1819 // The undefined object if index is out of bounds. | 1778 // The undefined object if index is out of bounds. |
| 1820 MUST_USE_RESULT MaybeObject* GetElementWithInterceptor(Object* receiver, | 1779 MUST_USE_RESULT MaybeObject* GetElementWithInterceptor(Object* receiver, |
| 1821 uint32_t index); | 1780 uint32_t index); |
| 1822 | 1781 |
| 1823 enum SetFastElementsCapacityMode { | 1782 enum SetFastElementsCapacitySmiMode { |
| 1824 kAllowSmiOnlyElements, | 1783 kAllowSmiOnlyElements, |
| 1825 kForceSmiOnlyElements, | 1784 kForceSmiOnlyElements, |
| 1826 kDontAllowSmiOnlyElements | 1785 kDontAllowSmiOnlyElements |
| 1827 }; | 1786 }; |
| 1828 | 1787 |
| 1829 // Replace the elements' backing store with fast elements of the given | 1788 // Replace the elements' backing store with fast elements of the given |
| 1830 // capacity. Update the length for JSArrays. Returns the new backing | 1789 // capacity. Update the length for JSArrays. Returns the new backing |
| 1831 // store. | 1790 // store. |
| 1832 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength( | 1791 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength( |
| 1833 int capacity, | 1792 int capacity, |
| 1834 int length, | 1793 int length, |
| 1835 SetFastElementsCapacityMode set_capacity_mode); | 1794 SetFastElementsCapacitySmiMode smi_mode); |
| 1836 MUST_USE_RESULT MaybeObject* SetFastDoubleElementsCapacityAndLength( | 1795 MUST_USE_RESULT MaybeObject* SetFastDoubleElementsCapacityAndLength( |
| 1837 int capacity, | 1796 int capacity, |
| 1838 int length); | 1797 int length); |
| 1839 | 1798 |
| 1840 // Lookup interceptors are used for handling properties controlled by host | 1799 // Lookup interceptors are used for handling properties controlled by host |
| 1841 // objects. | 1800 // objects. |
| 1842 inline bool HasNamedInterceptor(); | 1801 inline bool HasNamedInterceptor(); |
| 1843 inline bool HasIndexedInterceptor(); | 1802 inline bool HasIndexedInterceptor(); |
| 1844 | 1803 |
| 1845 // Support functions for v8 api (needed for correct interceptor behavior). | 1804 // Support functions for v8 api (needed for correct interceptor behavior). |
| (...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4620 (elements_kind << kElementsKindShift)); | 4579 (elements_kind << kElementsKindShift)); |
| 4621 ASSERT(this->elements_kind() == elements_kind); | 4580 ASSERT(this->elements_kind() == elements_kind); |
| 4622 } | 4581 } |
| 4623 | 4582 |
| 4624 inline ElementsKind elements_kind() { | 4583 inline ElementsKind elements_kind() { |
| 4625 return static_cast<ElementsKind>( | 4584 return static_cast<ElementsKind>( |
| 4626 (bit_field2() & kElementsKindMask) >> kElementsKindShift); | 4585 (bit_field2() & kElementsKindMask) >> kElementsKindShift); |
| 4627 } | 4586 } |
| 4628 | 4587 |
| 4629 // Tells whether the instance has fast elements that are only Smis. | 4588 // Tells whether the instance has fast elements that are only Smis. |
| 4630 inline bool has_fast_smi_only_elements() { | 4589 inline bool has_fast_smi_elements() { |
| 4631 return elements_kind() == FAST_SMI_ONLY_ELEMENTS; | 4590 return IsFastSmiElementsKind(elements_kind()); |
| 4632 } | 4591 } |
| 4633 | 4592 |
| 4634 // Tells whether the instance has fast elements. | 4593 // Tells whether the instance has fast elements. |
| 4635 inline bool has_fast_elements() { | 4594 inline bool has_fast_object_elements() { |
| 4636 return elements_kind() == FAST_ELEMENTS; | 4595 return IsFastObjectElementsKind(elements_kind()); |
| 4596 } |
| 4597 |
| 4598 inline bool has_fast_smi_or_object_elements() { |
| 4599 return IsFastSmiOrObjectElementsKind(elements_kind()); |
| 4637 } | 4600 } |
| 4638 | 4601 |
| 4639 inline bool has_fast_double_elements() { | 4602 inline bool has_fast_double_elements() { |
| 4640 return elements_kind() == FAST_DOUBLE_ELEMENTS; | 4603 return IsFastDoubleElementsKind(elements_kind()); |
| 4641 } | 4604 } |
| 4642 | 4605 |
| 4643 inline bool has_non_strict_arguments_elements() { | 4606 inline bool has_non_strict_arguments_elements() { |
| 4644 return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS; | 4607 return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS; |
| 4645 } | 4608 } |
| 4646 | 4609 |
| 4647 inline bool has_external_array_elements() { | 4610 inline bool has_external_array_elements() { |
| 4648 ElementsKind kind(elements_kind()); | 4611 ElementsKind kind(elements_kind()); |
| 4649 return kind >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && | 4612 return kind >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && |
| 4650 kind <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND; | 4613 kind <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND; |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4921 static const int kHasNonInstancePrototype = 1; | 4884 static const int kHasNonInstancePrototype = 1; |
| 4922 static const int kIsHiddenPrototype = 2; | 4885 static const int kIsHiddenPrototype = 2; |
| 4923 static const int kHasNamedInterceptor = 3; | 4886 static const int kHasNamedInterceptor = 3; |
| 4924 static const int kHasIndexedInterceptor = 4; | 4887 static const int kHasIndexedInterceptor = 4; |
| 4925 static const int kIsUndetectable = 5; | 4888 static const int kIsUndetectable = 5; |
| 4926 static const int kHasInstanceCallHandler = 6; | 4889 static const int kHasInstanceCallHandler = 6; |
| 4927 static const int kIsAccessCheckNeeded = 7; | 4890 static const int kIsAccessCheckNeeded = 7; |
| 4928 | 4891 |
| 4929 // Bit positions for bit field 2 | 4892 // Bit positions for bit field 2 |
| 4930 static const int kIsExtensible = 0; | 4893 static const int kIsExtensible = 0; |
| 4931 static const int kFunctionWithPrototype = 1; | 4894 static const int kStringWrapperSafeForDefaultValueOf = 1; |
| 4932 static const int kStringWrapperSafeForDefaultValueOf = 2; | 4895 static const int kAttachedToSharedFunctionInfo = 2; |
| 4933 static const int kAttachedToSharedFunctionInfo = 3; | |
| 4934 // No bits can be used after kElementsKindFirstBit, they are all reserved for | 4896 // No bits can be used after kElementsKindFirstBit, they are all reserved for |
| 4935 // storing ElementKind. | 4897 // storing ElementKind. |
| 4936 static const int kElementsKindShift = 4; | 4898 static const int kElementsKindShift = 3; |
| 4937 static const int kElementsKindBitCount = 4; | 4899 static const int kElementsKindBitCount = 5; |
| 4938 | 4900 |
| 4939 // Derived values from bit field 2 | 4901 // Derived values from bit field 2 |
| 4940 static const int kElementsKindMask = (-1 << kElementsKindShift) & | 4902 static const int kElementsKindMask = (-1 << kElementsKindShift) & |
| 4941 ((1 << (kElementsKindShift + kElementsKindBitCount)) - 1); | 4903 ((1 << (kElementsKindShift + kElementsKindBitCount)) - 1); |
| 4942 static const int8_t kMaximumBitField2FastElementValue = static_cast<int8_t>( | 4904 static const int8_t kMaximumBitField2FastElementValue = static_cast<int8_t>( |
| 4943 (FAST_ELEMENTS + 1) << Map::kElementsKindShift) - 1; | 4905 (FAST_ELEMENTS + 1) << Map::kElementsKindShift) - 1; |
| 4944 static const int8_t kMaximumBitField2FastSmiOnlyElementValue = | 4906 static const int8_t kMaximumBitField2FastSmiOnlyElementValue = |
| 4945 static_cast<int8_t>((FAST_SMI_ONLY_ELEMENTS + 1) << | 4907 static_cast<int8_t>((FAST_SMI_ELEMENTS + 1) << |
| 4908 Map::kElementsKindShift) - 1; |
| 4909 static const int8_t kMaximumBitField2FastHoleyElementValue = |
| 4910 static_cast<int8_t>((FAST_HOLEY_ELEMENTS + 1) << |
| 4911 Map::kElementsKindShift) - 1; |
| 4912 static const int8_t kMaximumBitField2FastHoleySmiOnlyElementValue = |
| 4913 static_cast<int8_t>((FAST_HOLEY_SMI_ELEMENTS + 1) << |
| 4946 Map::kElementsKindShift) - 1; | 4914 Map::kElementsKindShift) - 1; |
| 4947 | 4915 |
| 4948 // Bit positions for bit field 3 | 4916 // Bit positions for bit field 3 |
| 4949 static const int kIsShared = 0; | 4917 static const int kIsShared = 0; |
| 4918 static const int kFunctionWithPrototype = 1; |
| 4950 | 4919 |
| 4951 // Layout of the default cache. It holds alternating name and code objects. | 4920 // Layout of the default cache. It holds alternating name and code objects. |
| 4952 static const int kCodeCacheEntrySize = 2; | 4921 static const int kCodeCacheEntrySize = 2; |
| 4953 static const int kCodeCacheEntryNameOffset = 0; | 4922 static const int kCodeCacheEntryNameOffset = 0; |
| 4954 static const int kCodeCacheEntryCodeOffset = 1; | 4923 static const int kCodeCacheEntryCodeOffset = 1; |
| 4955 | 4924 |
| 4956 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset, | 4925 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset, |
| 4957 kPointerFieldsEndOffset, | 4926 kPointerFieldsEndOffset, |
| 4958 kSize> BodyDescriptor; | 4927 kSize> BodyDescriptor; |
| 4959 | 4928 |
| (...skipping 3676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8636 } else { | 8605 } else { |
| 8637 value &= ~(1 << bit_position); | 8606 value &= ~(1 << bit_position); |
| 8638 } | 8607 } |
| 8639 return value; | 8608 return value; |
| 8640 } | 8609 } |
| 8641 }; | 8610 }; |
| 8642 | 8611 |
| 8643 } } // namespace v8::internal | 8612 } } // namespace v8::internal |
| 8644 | 8613 |
| 8645 #endif // V8_OBJECTS_H_ | 8614 #endif // V8_OBJECTS_H_ |
| OLD | NEW |