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_CELL_H_
6 #define V8_OBJECTS_CELL_H_
7 
8 #include "src/objects/heap-object.h"
9 
10 // Has to be the last include (doesn't have include guards):
11 #include "src/objects/object-macros.h"
12 
13 namespace v8 {
14 namespace internal {
15 
16 #include "torque-generated/src/objects/cell-tq.inc"
17 
18 class Cell : public TorqueGeneratedCell<Cell, HeapObject> {
19  public:
20   static inline Cell FromValueAddress(Address value);
21 
ValueAddress()22   inline Address ValueAddress() { return address() + kValueOffset; }
23 
24   using BodyDescriptor = FixedBodyDescriptor<kValueOffset, kSize, kSize>;
25 
26   TQ_OBJECT_CONSTRUCTORS(Cell)
27 };
28 
29 }  // namespace internal
30 }  // namespace v8
31 
32 #include "src/objects/object-macros-undef.h"
33 
34 #endif  // V8_OBJECTS_CELL_H_
35