| 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 #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 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 10182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10193 // Same as above but will also queue splice records if |array| is observed. | 10193 // Same as above but will also queue splice records if |array| is observed. |
| 10194 static MaybeHandle<Object> ObservableSetLength(Handle<JSArray> array, | 10194 static MaybeHandle<Object> ObservableSetLength(Handle<JSArray> array, |
| 10195 uint32_t length); | 10195 uint32_t length); |
| 10196 | 10196 |
| 10197 // Set the content of the array to the content of storage. | 10197 // Set the content of the array to the content of storage. |
| 10198 static inline void SetContent(Handle<JSArray> array, | 10198 static inline void SetContent(Handle<JSArray> array, |
| 10199 Handle<FixedArrayBase> storage); | 10199 Handle<FixedArrayBase> storage); |
| 10200 | 10200 |
| 10201 DECLARE_CAST(JSArray) | 10201 DECLARE_CAST(JSArray) |
| 10202 | 10202 |
| 10203 // Ensures that the fixed array backing the JSArray has at | |
| 10204 // least the stated size. | |
| 10205 static inline void EnsureSize(Handle<JSArray> array, | |
| 10206 int minimum_size_of_backing_fixed_array); | |
| 10207 | |
| 10208 // Expand the fixed array backing of a fast-case JSArray to at least | |
| 10209 // the requested size. | |
| 10210 static void Expand(Handle<JSArray> array, | |
| 10211 int minimum_size_of_backing_fixed_array); | |
| 10212 | |
| 10213 // Dispatched behavior. | 10203 // Dispatched behavior. |
| 10214 DECLARE_PRINTER(JSArray) | 10204 DECLARE_PRINTER(JSArray) |
| 10215 DECLARE_VERIFIER(JSArray) | 10205 DECLARE_VERIFIER(JSArray) |
| 10216 | 10206 |
| 10217 // Number of element slots to pre-allocate for an empty array. | 10207 // Number of element slots to pre-allocate for an empty array. |
| 10218 static const int kPreallocatedArrayElements = 4; | 10208 static const int kPreallocatedArrayElements = 4; |
| 10219 | 10209 |
| 10220 // Layout description. | 10210 // Layout description. |
| 10221 static const int kLengthOffset = JSObject::kHeaderSize; | 10211 static const int kLengthOffset = JSObject::kHeaderSize; |
| 10222 static const int kSize = kLengthOffset + kPointerSize; | 10212 static const int kSize = kLengthOffset + kPointerSize; |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10861 } else { | 10851 } else { |
| 10862 value &= ~(1 << bit_position); | 10852 value &= ~(1 << bit_position); |
| 10863 } | 10853 } |
| 10864 return value; | 10854 return value; |
| 10865 } | 10855 } |
| 10866 }; | 10856 }; |
| 10867 | 10857 |
| 10868 } } // namespace v8::internal | 10858 } } // namespace v8::internal |
| 10869 | 10859 |
| 10870 #endif // V8_OBJECTS_H_ | 10860 #endif // V8_OBJECTS_H_ |
| OLD | NEW |