5 #ifndef V8_OBJECTS_PROPERTY_ARRAY_H_ 6 #define V8_OBJECTS_PROPERTY_ARRAY_H_ 8 #include "src/objects/heap-object.h" 11 #include "src/objects/object-macros.h" 19 inline int length()
const;
22 inline int synchronized_length()
const;
26 inline void initialize_length(
int length);
28 inline void SetHash(
int hash);
29 inline int Hash()
const;
31 inline Object*
get(
int index)
const;
33 inline void set(
int index,
Object* value);
35 inline void set(
int index,
Object* value, WriteBarrierMode mode);
41 static constexpr
int SizeFor(
int length) {
42 return kHeaderSize + length * kPointerSize;
50 static const int kLengthAndHashOffset = HeapObject::kHeaderSize;
51 static const int kHeaderSize = kLengthAndHashOffset + kPointerSize;
56 static const int kLengthFieldSize = 10;
58 static const int kMaxLength = LengthField::kMax;
60 kSmiValueSize - kLengthFieldSize - 1> {};
62 static const int kNoHashSentinel = 0;
70 #include "src/objects/object-macros-undef.h" 72 #endif // V8_OBJECTS_PROPERTY_ARRAY_H_