Line data Source code
1 : // Copyright 2018 the V8 project authors. All rights reserved.
2 : // Use of this source code is governed by a BSD-style license that can be
3 : // found in the LICENSE file.
4 :
5 : #ifndef V8_OBJECTS_EMBEDDER_DATA_ARRAY_INL_H_
6 : #define V8_OBJECTS_EMBEDDER_DATA_ARRAY_INL_H_
7 :
8 : #include "src/objects/embedder-data-array.h"
9 :
10 : #include "src/objects/instance-type-inl.h"
11 : #include "src/objects/maybe-object-inl.h"
12 : #include "src/objects/slots.h"
13 :
14 : // Has to be the last include (doesn't have include guards):
15 : #include "src/objects/object-macros.h"
16 :
17 : namespace v8 {
18 : namespace internal {
19 :
20 279825 : CAST_ACCESSOR(EmbedderDataArray)
21 :
22 709138 : SMI_ACCESSORS(EmbedderDataArray, length, kLengthOffset)
23 :
24 559650 : OBJECT_CONSTRUCTORS_IMPL(EmbedderDataArray, HeapObject)
25 :
26 : Address EmbedderDataArray::slots_start() {
27 179787 : return FIELD_ADDR(*this, OffsetOfElementAt(0));
28 : }
29 :
30 : Address EmbedderDataArray::slots_end() {
31 119858 : return FIELD_ADDR(*this, OffsetOfElementAt(length()));
32 : }
33 :
34 : } // namespace internal
35 : } // namespace v8
36 :
37 : #include "src/objects/object-macros-undef.h"
38 :
39 : #endif // V8_OBJECTS_EMBEDDER_DATA_ARRAY_INL_H_
|