V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
embedder-data-array-inl.h
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-inl.h" // Needed for write barriers
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 CAST_ACCESSOR2(EmbedderDataArray)
21 
22 SMI_ACCESSORS(EmbedderDataArray, length, kLengthOffset)
23 
24 OBJECT_CONSTRUCTORS_IMPL(EmbedderDataArray, HeapObjectPtr)
25 
26 Address EmbedderDataArray::slots_start() {
27  return FIELD_ADDR(this, OffsetOfElementAt(0));
28 }
29 
30 Address EmbedderDataArray::slots_end() {
31  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_
Definition: libplatform.h:13