Commit ac3919d9 authored by mlippautz's avatar mlippautz Committed by Commit bot

Cleanup FreeSpace: Remove getter for address of next pointer

BUG=

Review URL: https://codereview.chromium.org/1416003003

Cr-Commit-Position: refs/heads/master@{#31463}
parent 71bde166
......@@ -340,7 +340,7 @@ class StaticNewSpaceVisitor : public StaticVisitorBase {
}
INLINE(static int VisitFreeSpace(Map* map, HeapObject* object)) {
return FreeSpace::cast(object)->Size();
return FreeSpace::cast(object)->size();
}
INLINE(static int VisitJSArrayBuffer(Map* map, HeapObject* object));
......
......@@ -2235,7 +2235,7 @@ FreeSpace* FreeListCategory::PickNodeFromList(int* node_size) {
Page* page = Page::FromAddress(node->address());
while ((node != nullptr) && page->IsEvacuationCandidate()) {
available_ -= node->Size();
available_ -= node->size();
page->add_available_in_free_list(type_, -(node->Size()));
node = node->next();
}
......
......@@ -3667,14 +3667,6 @@ FreeSpace* FreeSpace::next() {
}
FreeSpace** FreeSpace::next_address() {
DCHECK(map() == GetHeap()->root(Heap::kFreeSpaceMapRootIndex) ||
(!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()->root(Heap::kFreeSpaceMapRootIndex) ||
(!GetHeap()->deserialization_complete() && map() == NULL));
......
......@@ -1809,7 +1809,7 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT
os << "<BytecodeArray[" << BytecodeArray::cast(this)->length() << "]>";
break;
case FREE_SPACE_TYPE:
os << "<FreeSpace[" << FreeSpace::cast(this)->Size() << "]>";
os << "<FreeSpace[" << FreeSpace::cast(this)->size() << "]>";
break;
#define TYPED_ARRAY_SHORT_PRINT(Type, type, TYPE, ctype, size) \
case FIXED_##TYPE##_ARRAY_TYPE: \
......
......@@ -4400,7 +4400,6 @@ class FreeSpace: public HeapObject {
// Accessors for the next field.
inline FreeSpace* next();
inline FreeSpace** next_address();
inline void set_next(FreeSpace* next);
inline static FreeSpace* cast(HeapObject* obj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment