| 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 10430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10441 DECLARE_PRINTER(JSArray) | 10441 DECLARE_PRINTER(JSArray) |
| 10442 DECLARE_VERIFIER(JSArray) | 10442 DECLARE_VERIFIER(JSArray) |
| 10443 | 10443 |
| 10444 // Number of element slots to pre-allocate for an empty array. | 10444 // Number of element slots to pre-allocate for an empty array. |
| 10445 static const int kPreallocatedArrayElements = 4; | 10445 static const int kPreallocatedArrayElements = 4; |
| 10446 | 10446 |
| 10447 // Layout description. | 10447 // Layout description. |
| 10448 static const int kLengthOffset = JSObject::kHeaderSize; | 10448 static const int kLengthOffset = JSObject::kHeaderSize; |
| 10449 static const int kSize = kLengthOffset + kPointerSize; | 10449 static const int kSize = kLengthOffset + kPointerSize; |
| 10450 | 10450 |
| 10451 // 600 * KB is the Page::kMaxRegularHeapObjectSize defined in spaces.h which | 10451 // 300 * KB is the Page::kMaxRegularHeapObjectSize defined in spaces.h which |
| 10452 // we do not want to include in objects.h | 10452 // we do not want to include in objects.h |
| 10453 // Note that Page::kMaxRegularHeapObjectSize has to be in sync with | 10453 // Note that Page::kMaxRegularHeapObjectSize has to be in sync with |
| 10454 // kInitialMaxFastElementArray which is checked in a DCHECK in heap.cc. | 10454 // kInitialMaxFastElementArray which is checked in a DCHECK in heap.cc. |
| 10455 static const int kInitialMaxFastElementArray = | 10455 static const int kInitialMaxFastElementArray = |
| 10456 (600 * KB - FixedArray::kHeaderSize - kSize - AllocationMemento::kSize) / | 10456 (300 * KB - FixedArray::kHeaderSize - kSize - AllocationMemento::kSize) / |
| 10457 kPointerSize; | 10457 kPointerSize; |
| 10458 | 10458 |
| 10459 private: | 10459 private: |
| 10460 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); | 10460 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); |
| 10461 }; | 10461 }; |
| 10462 | 10462 |
| 10463 | 10463 |
| 10464 Handle<Object> CacheInitialJSArrayMaps(Handle<Context> native_context, | 10464 Handle<Object> CacheInitialJSArrayMaps(Handle<Context> native_context, |
| 10465 Handle<Map> initial_map); | 10465 Handle<Map> initial_map); |
| 10466 | 10466 |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11067 } | 11067 } |
| 11068 return value; | 11068 return value; |
| 11069 } | 11069 } |
| 11070 }; | 11070 }; |
| 11071 | 11071 |
| 11072 | 11072 |
| 11073 } // NOLINT, false-positive due to second-order macros. | 11073 } // NOLINT, false-positive due to second-order macros. |
| 11074 } // NOLINT, false-positive due to second-order macros. | 11074 } // NOLINT, false-positive due to second-order macros. |
| 11075 | 11075 |
| 11076 #endif // V8_OBJECTS_H_ | 11076 #endif // V8_OBJECTS_H_ |
| OLD | NEW |