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 // Returns true if an object has elements of FAST_SMI_ELEMENTS ElementsKind. |
1513 inline bool HasFastElements(); | 1473 inline bool HasFastSmiElements(); |
1514 // Returns if an object has either FAST_ELEMENT or FAST_SMI_ONLY_ELEMENT | 1474 // Returns true if an object has elements of FAST_ELEMENTS ElementsKind. |
1515 // elements. TODO(danno): Rename HasFastTypeElements to HasFastElements() and | 1475 inline bool HasFastObjectElements(); |
1516 // HasFastElements to HasFastObjectElements. | 1476 // Returns true if an object has elements of FAST_ELEMENTS or |
1517 inline bool HasFastTypeElements(); | 1477 // FAST_SMI_ONLY_ELEMENTS. |
| 1478 inline bool HasFastSmiOrObjectElements(); |
| 1479 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS |
| 1480 // ElementsKind. |
1518 inline bool HasFastDoubleElements(); | 1481 inline bool HasFastDoubleElements(); |
| 1482 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS |
| 1483 // ElementsKind. |
| 1484 inline bool HasFastHoleyElements(); |
1519 inline bool HasNonStrictArgumentsElements(); | 1485 inline bool HasNonStrictArgumentsElements(); |
1520 inline bool HasDictionaryElements(); | 1486 inline bool HasDictionaryElements(); |
1521 inline bool HasExternalPixelElements(); | 1487 inline bool HasExternalPixelElements(); |
1522 inline bool HasExternalArrayElements(); | 1488 inline bool HasExternalArrayElements(); |
1523 inline bool HasExternalByteElements(); | 1489 inline bool HasExternalByteElements(); |
1524 inline bool HasExternalUnsignedByteElements(); | 1490 inline bool HasExternalUnsignedByteElements(); |
1525 inline bool HasExternalShortElements(); | 1491 inline bool HasExternalShortElements(); |
1526 inline bool HasExternalUnsignedShortElements(); | 1492 inline bool HasExternalUnsignedShortElements(); |
1527 inline bool HasExternalIntElements(); | 1493 inline bool HasExternalIntElements(); |
1528 inline bool HasExternalUnsignedIntElements(); | 1494 inline bool HasExternalUnsignedIntElements(); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); | 1669 MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); |
1704 MUST_USE_RESULT MaybeObject* SetIdentityHash(Object* hash, CreationFlag flag); | 1670 MUST_USE_RESULT MaybeObject* SetIdentityHash(Object* hash, CreationFlag flag); |
1705 | 1671 |
1706 static Handle<Object> DeleteProperty(Handle<JSObject> obj, | 1672 static Handle<Object> DeleteProperty(Handle<JSObject> obj, |
1707 Handle<String> name); | 1673 Handle<String> name); |
1708 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); | 1674 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); |
1709 | 1675 |
1710 static Handle<Object> DeleteElement(Handle<JSObject> obj, uint32_t index); | 1676 static Handle<Object> DeleteElement(Handle<JSObject> obj, uint32_t index); |
1711 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode); | 1677 MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode); |
1712 | 1678 |
1713 inline void ValidateSmiOnlyElements(); | 1679 inline void ValidateElements(); |
1714 | 1680 |
1715 // Makes sure that this object can contain HeapObject as elements. | 1681 // Makes sure that this object can contain HeapObject as elements. |
1716 MUST_USE_RESULT inline MaybeObject* EnsureCanContainHeapObjectElements(); | 1682 MUST_USE_RESULT inline MaybeObject* EnsureCanContainHeapObjectElements(); |
1717 | 1683 |
1718 // Makes sure that this object can contain the specified elements. | 1684 // Makes sure that this object can contain the specified elements. |
1719 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 1685 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
1720 Object** elements, | 1686 Object** elements, |
1721 uint32_t count, | 1687 uint32_t count, |
1722 EnsureElementsMode mode); | 1688 EnsureElementsMode mode); |
1723 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 1689 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
1724 FixedArrayBase* elements, | 1690 FixedArrayBase* elements, |
| 1691 uint32_t length, |
1725 EnsureElementsMode mode); | 1692 EnsureElementsMode mode); |
1726 MUST_USE_RESULT MaybeObject* EnsureCanContainElements( | 1693 MUST_USE_RESULT MaybeObject* EnsureCanContainElements( |
1727 Arguments* arguments, | 1694 Arguments* arguments, |
1728 uint32_t first_arg, | 1695 uint32_t first_arg, |
1729 uint32_t arg_count, | 1696 uint32_t arg_count, |
1730 EnsureElementsMode mode); | 1697 EnsureElementsMode mode); |
1731 | 1698 |
1732 // Do we want to keep the elements in fast case when increasing the | 1699 // Do we want to keep the elements in fast case when increasing the |
1733 // capacity? | 1700 // capacity? |
1734 bool ShouldConvertToSlowElements(int new_capacity); | 1701 bool ShouldConvertToSlowElements(int new_capacity); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1813 PropertyAttributes attributes, | 1780 PropertyAttributes attributes, |
1814 StrictModeFlag strict_mode, | 1781 StrictModeFlag strict_mode, |
1815 bool check_prototype = true, | 1782 bool check_prototype = true, |
1816 SetPropertyMode set_mode = SET_PROPERTY); | 1783 SetPropertyMode set_mode = SET_PROPERTY); |
1817 | 1784 |
1818 // Returns the index'th element. | 1785 // Returns the index'th element. |
1819 // The undefined object if index is out of bounds. | 1786 // The undefined object if index is out of bounds. |
1820 MUST_USE_RESULT MaybeObject* GetElementWithInterceptor(Object* receiver, | 1787 MUST_USE_RESULT MaybeObject* GetElementWithInterceptor(Object* receiver, |
1821 uint32_t index); | 1788 uint32_t index); |
1822 | 1789 |
1823 enum SetFastElementsCapacityMode { | 1790 enum SetFastElementsCapacitySmiMode { |
1824 kAllowSmiOnlyElements, | 1791 kAllowSmiElements, |
1825 kForceSmiOnlyElements, | 1792 kForceSmiElements, |
1826 kDontAllowSmiOnlyElements | 1793 kDontAllowSmiElements |
1827 }; | 1794 }; |
1828 | 1795 |
1829 // Replace the elements' backing store with fast elements of the given | 1796 // Replace the elements' backing store with fast elements of the given |
1830 // capacity. Update the length for JSArrays. Returns the new backing | 1797 // capacity. Update the length for JSArrays. Returns the new backing |
1831 // store. | 1798 // store. |
1832 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength( | 1799 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength( |
1833 int capacity, | 1800 int capacity, |
1834 int length, | 1801 int length, |
1835 SetFastElementsCapacityMode set_capacity_mode); | 1802 SetFastElementsCapacitySmiMode smi_mode); |
1836 MUST_USE_RESULT MaybeObject* SetFastDoubleElementsCapacityAndLength( | 1803 MUST_USE_RESULT MaybeObject* SetFastDoubleElementsCapacityAndLength( |
1837 int capacity, | 1804 int capacity, |
1838 int length); | 1805 int length); |
1839 | 1806 |
1840 // Lookup interceptors are used for handling properties controlled by host | 1807 // Lookup interceptors are used for handling properties controlled by host |
1841 // objects. | 1808 // objects. |
1842 inline bool HasNamedInterceptor(); | 1809 inline bool HasNamedInterceptor(); |
1843 inline bool HasIndexedInterceptor(); | 1810 inline bool HasIndexedInterceptor(); |
1844 | 1811 |
1845 // Support functions for v8 api (needed for correct interceptor behavior). | 1812 // Support functions for v8 api (needed for correct interceptor behavior). |
(...skipping 2785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4631 (elements_kind << kElementsKindShift)); | 4598 (elements_kind << kElementsKindShift)); |
4632 ASSERT(this->elements_kind() == elements_kind); | 4599 ASSERT(this->elements_kind() == elements_kind); |
4633 } | 4600 } |
4634 | 4601 |
4635 inline ElementsKind elements_kind() { | 4602 inline ElementsKind elements_kind() { |
4636 return static_cast<ElementsKind>( | 4603 return static_cast<ElementsKind>( |
4637 (bit_field2() & kElementsKindMask) >> kElementsKindShift); | 4604 (bit_field2() & kElementsKindMask) >> kElementsKindShift); |
4638 } | 4605 } |
4639 | 4606 |
4640 // Tells whether the instance has fast elements that are only Smis. | 4607 // Tells whether the instance has fast elements that are only Smis. |
4641 inline bool has_fast_smi_only_elements() { | 4608 inline bool has_fast_smi_elements() { |
4642 return elements_kind() == FAST_SMI_ONLY_ELEMENTS; | 4609 return IsFastSmiElementsKind(elements_kind()); |
4643 } | 4610 } |
4644 | 4611 |
4645 // Tells whether the instance has fast elements. | 4612 // Tells whether the instance has fast elements. |
4646 inline bool has_fast_elements() { | 4613 inline bool has_fast_object_elements() { |
4647 return elements_kind() == FAST_ELEMENTS; | 4614 return IsFastObjectElementsKind(elements_kind()); |
| 4615 } |
| 4616 |
| 4617 inline bool has_fast_smi_or_object_elements() { |
| 4618 return IsFastSmiOrObjectElementsKind(elements_kind()); |
4648 } | 4619 } |
4649 | 4620 |
4650 inline bool has_fast_double_elements() { | 4621 inline bool has_fast_double_elements() { |
4651 return elements_kind() == FAST_DOUBLE_ELEMENTS; | 4622 return IsFastDoubleElementsKind(elements_kind()); |
4652 } | 4623 } |
4653 | 4624 |
4654 inline bool has_non_strict_arguments_elements() { | 4625 inline bool has_non_strict_arguments_elements() { |
4655 return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS; | 4626 return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS; |
4656 } | 4627 } |
4657 | 4628 |
4658 inline bool has_external_array_elements() { | 4629 inline bool has_external_array_elements() { |
4659 ElementsKind kind(elements_kind()); | 4630 ElementsKind kind(elements_kind()); |
4660 return kind >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && | 4631 return kind >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && |
4661 kind <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND; | 4632 kind <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4937 static const int kHasNonInstancePrototype = 1; | 4908 static const int kHasNonInstancePrototype = 1; |
4938 static const int kIsHiddenPrototype = 2; | 4909 static const int kIsHiddenPrototype = 2; |
4939 static const int kHasNamedInterceptor = 3; | 4910 static const int kHasNamedInterceptor = 3; |
4940 static const int kHasIndexedInterceptor = 4; | 4911 static const int kHasIndexedInterceptor = 4; |
4941 static const int kIsUndetectable = 5; | 4912 static const int kIsUndetectable = 5; |
4942 static const int kHasInstanceCallHandler = 6; | 4913 static const int kHasInstanceCallHandler = 6; |
4943 static const int kIsAccessCheckNeeded = 7; | 4914 static const int kIsAccessCheckNeeded = 7; |
4944 | 4915 |
4945 // Bit positions for bit field 2 | 4916 // Bit positions for bit field 2 |
4946 static const int kIsExtensible = 0; | 4917 static const int kIsExtensible = 0; |
4947 static const int kFunctionWithPrototype = 1; | 4918 static const int kStringWrapperSafeForDefaultValueOf = 1; |
4948 static const int kStringWrapperSafeForDefaultValueOf = 2; | 4919 static const int kAttachedToSharedFunctionInfo = 2; |
4949 static const int kAttachedToSharedFunctionInfo = 3; | |
4950 // No bits can be used after kElementsKindFirstBit, they are all reserved for | 4920 // No bits can be used after kElementsKindFirstBit, they are all reserved for |
4951 // storing ElementKind. | 4921 // storing ElementKind. |
4952 static const int kElementsKindShift = 4; | 4922 static const int kElementsKindShift = 3; |
4953 static const int kElementsKindBitCount = 4; | 4923 static const int kElementsKindBitCount = 5; |
4954 | 4924 |
4955 // Derived values from bit field 2 | 4925 // Derived values from bit field 2 |
4956 static const int kElementsKindMask = (-1 << kElementsKindShift) & | 4926 static const int kElementsKindMask = (-1 << kElementsKindShift) & |
4957 ((1 << (kElementsKindShift + kElementsKindBitCount)) - 1); | 4927 ((1 << (kElementsKindShift + kElementsKindBitCount)) - 1); |
4958 static const int8_t kMaximumBitField2FastElementValue = static_cast<int8_t>( | 4928 static const int8_t kMaximumBitField2FastElementValue = static_cast<int8_t>( |
4959 (FAST_ELEMENTS + 1) << Map::kElementsKindShift) - 1; | 4929 (FAST_ELEMENTS + 1) << Map::kElementsKindShift) - 1; |
4960 static const int8_t kMaximumBitField2FastSmiOnlyElementValue = | 4930 static const int8_t kMaximumBitField2FastSmiElementValue = |
4961 static_cast<int8_t>((FAST_SMI_ONLY_ELEMENTS + 1) << | 4931 static_cast<int8_t>((FAST_SMI_ELEMENTS + 1) << |
| 4932 Map::kElementsKindShift) - 1; |
| 4933 static const int8_t kMaximumBitField2FastHoleyElementValue = |
| 4934 static_cast<int8_t>((FAST_HOLEY_ELEMENTS + 1) << |
| 4935 Map::kElementsKindShift) - 1; |
| 4936 static const int8_t kMaximumBitField2FastHoleySmiElementValue = |
| 4937 static_cast<int8_t>((FAST_HOLEY_SMI_ELEMENTS + 1) << |
4962 Map::kElementsKindShift) - 1; | 4938 Map::kElementsKindShift) - 1; |
4963 | 4939 |
4964 // Bit positions for bit field 3 | 4940 // Bit positions for bit field 3 |
4965 static const int kIsShared = 0; | 4941 static const int kIsShared = 0; |
| 4942 static const int kFunctionWithPrototype = 1; |
4966 | 4943 |
4967 // Layout of the default cache. It holds alternating name and code objects. | 4944 // Layout of the default cache. It holds alternating name and code objects. |
4968 static const int kCodeCacheEntrySize = 2; | 4945 static const int kCodeCacheEntrySize = 2; |
4969 static const int kCodeCacheEntryNameOffset = 0; | 4946 static const int kCodeCacheEntryNameOffset = 0; |
4970 static const int kCodeCacheEntryCodeOffset = 1; | 4947 static const int kCodeCacheEntryCodeOffset = 1; |
4971 | 4948 |
4972 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset, | 4949 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset, |
4973 kPointerFieldsEndOffset, | 4950 kPointerFieldsEndOffset, |
4974 kSize> BodyDescriptor; | 4951 kSize> BodyDescriptor; |
4975 | 4952 |
(...skipping 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8647 } else { | 8624 } else { |
8648 value &= ~(1 << bit_position); | 8625 value &= ~(1 << bit_position); |
8649 } | 8626 } |
8650 return value; | 8627 return value; |
8651 } | 8628 } |
8652 }; | 8629 }; |
8653 | 8630 |
8654 } } // namespace v8::internal | 8631 } } // namespace v8::internal |
8655 | 8632 |
8656 #endif // V8_OBJECTS_H_ | 8633 #endif // V8_OBJECTS_H_ |
OLD | NEW |