| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2820 inline Object** RawFieldOfElementAt(int index); | 2820 inline Object** RawFieldOfElementAt(int index); |
| 2821 | 2821 |
| 2822 DECLARE_CAST(FixedArray) | 2822 DECLARE_CAST(FixedArray) |
| 2823 | 2823 |
| 2824 // Maximal allowed size, in bytes, of a single FixedArray. | 2824 // Maximal allowed size, in bytes, of a single FixedArray. |
| 2825 // Prevents overflowing size computations, as well as extreme memory | 2825 // Prevents overflowing size computations, as well as extreme memory |
| 2826 // consumption. | 2826 // consumption. |
| 2827 static const int kMaxSize = 128 * MB * kPointerSize; | 2827 static const int kMaxSize = 128 * MB * kPointerSize; |
| 2828 // Maximally allowed length of a FixedArray. | 2828 // Maximally allowed length of a FixedArray. |
| 2829 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; | 2829 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; |
| 2830 // Maximally allowed length for regular (non large object space) object. |
| 2831 STATIC_ASSERT(kMaxRegularHeapObjectSize < kMaxSize); |
| 2832 static const int kMaxRegularLength = |
| 2833 (kMaxRegularHeapObjectSize - kHeaderSize) / kPointerSize; |
| 2830 | 2834 |
| 2831 // Dispatched behavior. | 2835 // Dispatched behavior. |
| 2832 DECLARE_PRINTER(FixedArray) | 2836 DECLARE_PRINTER(FixedArray) |
| 2833 DECLARE_VERIFIER(FixedArray) | 2837 DECLARE_VERIFIER(FixedArray) |
| 2834 #ifdef DEBUG | 2838 #ifdef DEBUG |
| 2835 // Checks if two FixedArrays have identical contents. | 2839 // Checks if two FixedArrays have identical contents. |
| 2836 bool IsEqualTo(FixedArray* other); | 2840 bool IsEqualTo(FixedArray* other); |
| 2837 #endif | 2841 #endif |
| 2838 | 2842 |
| 2839 typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor; | 2843 typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor; |
| (...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4822 | 4826 |
| 4823 // Returns a non-deprecated version of the input. This method may deprecate | 4827 // Returns a non-deprecated version of the input. This method may deprecate |
| 4824 // existing maps along the way if encodings conflict. Not for use while | 4828 // existing maps along the way if encodings conflict. Not for use while |
| 4825 // gathering type feedback. Use TryUpdate in those cases instead. | 4829 // gathering type feedback. Use TryUpdate in those cases instead. |
| 4826 static Handle<Map> Update(Handle<Map> map); | 4830 static Handle<Map> Update(Handle<Map> map); |
| 4827 | 4831 |
| 4828 static inline Handle<Map> CopyInitialMap(Handle<Map> map); | 4832 static inline Handle<Map> CopyInitialMap(Handle<Map> map); |
| 4829 static Handle<Map> CopyInitialMap(Handle<Map> map, int instance_size, | 4833 static Handle<Map> CopyInitialMap(Handle<Map> map, int instance_size, |
| 4830 int in_object_properties, | 4834 int in_object_properties, |
| 4831 int unused_property_fields); | 4835 int unused_property_fields); |
| 4836 static Handle<Map> CopyInitialMapNormalized( |
| 4837 Handle<Map> map, |
| 4838 PropertyNormalizationMode mode = CLEAR_INOBJECT_PROPERTIES); |
| 4832 static Handle<Map> CopyDropDescriptors(Handle<Map> map); | 4839 static Handle<Map> CopyDropDescriptors(Handle<Map> map); |
| 4833 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, | 4840 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, |
| 4834 Descriptor* descriptor, | 4841 Descriptor* descriptor, |
| 4835 TransitionFlag flag); | 4842 TransitionFlag flag); |
| 4836 | 4843 |
| 4837 static Handle<Object> WrapFieldType(Handle<FieldType> type); | 4844 static Handle<Object> WrapFieldType(Handle<FieldType> type); |
| 4838 static FieldType* UnwrapFieldType(Object* wrapped_type); | 4845 static FieldType* UnwrapFieldType(Object* wrapped_type); |
| 4839 | 4846 |
| 4840 MUST_USE_RESULT static MaybeHandle<Map> CopyWithField( | 4847 MUST_USE_RESULT static MaybeHandle<Map> CopyWithField( |
| 4841 Handle<Map> map, Handle<Name> name, Handle<FieldType> type, | 4848 Handle<Map> map, Handle<Name> name, Handle<FieldType> type, |
| (...skipping 5429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10271 } | 10278 } |
| 10272 }; | 10279 }; |
| 10273 | 10280 |
| 10274 | 10281 |
| 10275 } // NOLINT, false-positive due to second-order macros. | 10282 } // NOLINT, false-positive due to second-order macros. |
| 10276 } // NOLINT, false-positive due to second-order macros. | 10283 } // NOLINT, false-positive due to second-order macros. |
| 10277 | 10284 |
| 10278 #include "src/objects/object-macros-undef.h" | 10285 #include "src/objects/object-macros-undef.h" |
| 10279 | 10286 |
| 10280 #endif // V8_OBJECTS_H_ | 10287 #endif // V8_OBJECTS_H_ |
| OLD | NEW |