Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 5ee91913251c81f4833f9230afc419b59f7db384..402010e91a7d8058eb9d45971cdcc2e27f60dbb3 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3334,7 +3334,6 @@ CAST_ACCESSOR(FixedArrayBase) |
CAST_ACCESSOR(FixedDoubleArray) |
CAST_ACCESSOR(FixedTypedArrayBase) |
CAST_ACCESSOR(Foreign) |
-CAST_ACCESSOR(FreeSpace) |
CAST_ACCESSOR(GlobalObject) |
CAST_ACCESSOR(HeapObject) |
CAST_ACCESSOR(JSArray) |
@@ -3443,6 +3442,39 @@ SMI_ACCESSORS(String, length, kLengthOffset) |
SYNCHRONIZED_SMI_ACCESSORS(String, length, kLengthOffset) |
+FreeSpace* FreeSpace::next() { |
+ DCHECK(map() == GetHeap()->raw_unchecked_free_space_map() || |
+ (!GetHeap()->deserialization_complete() && map() == NULL)); |
+ DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); |
+ return reinterpret_cast<FreeSpace*>( |
+ Memory::Address_at(address() + kNextOffset)); |
+} |
+ |
+ |
+FreeSpace** FreeSpace::next_address() { |
+ DCHECK(map() == GetHeap()->raw_unchecked_free_space_map() || |
+ (!GetHeap()->deserialization_complete() && map() == NULL)); |
+ DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); |
+ return reinterpret_cast<FreeSpace**>(address() + kNextOffset); |
+} |
+ |
+ |
+void FreeSpace::set_next(FreeSpace* next) { |
+ DCHECK(map() == GetHeap()->raw_unchecked_free_space_map() || |
+ (!GetHeap()->deserialization_complete() && map() == NULL)); |
+ DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); |
+ base::NoBarrier_Store( |
+ reinterpret_cast<base::AtomicWord*>(address() + kNextOffset), |
+ reinterpret_cast<base::AtomicWord>(next)); |
+} |
+ |
+ |
+FreeSpace* FreeSpace::cast(HeapObject* o) { |
+ SLOW_DCHECK(!o->GetHeap()->deserialization_complete() || o->IsFreeSpace()); |
+ return reinterpret_cast<FreeSpace*>(o); |
+} |
+ |
+ |
uint32_t Name::hash_field() { |
return READ_UINT32_FIELD(this, kHashFieldOffset); |
} |