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