Commit 618e8bef authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Remove unused PagedSpace::FindObject().

Review-Url: https://codereview.chromium.org/2531073002
Cr-Commit-Position: refs/heads/master@{#41287}
parent 552b4803
......@@ -1287,25 +1287,6 @@ bool PagedSpace::ContainsSlow(Address addr) {
return false;
}
Object* PagedSpace::FindObject(Address addr) {
// Note: this function can only be called on iterable spaces.
DCHECK(!heap()->mark_compact_collector()->in_use());
if (!Contains(addr)) return Smi::kZero; // Signaling not found.
Page* p = Page::FromAddress(addr);
HeapObjectIterator it(p);
for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) {
Address cur = obj->address();
Address next = cur + obj->Size();
if ((cur <= addr) && (addr < next)) return obj;
}
UNREACHABLE();
return Smi::kZero;
}
void PagedSpace::ShrinkImmortalImmovablePages() {
DCHECK(!heap()->deserialization_complete());
MemoryChunk::UpdateHighWaterMark(allocation_info_.top());
......
......@@ -1914,12 +1914,6 @@ class PagedSpace : public Space {
inline bool Contains(Object* o);
bool ContainsSlow(Address addr);
// Given an address occupied by a live object, return that object if it is
// in this space, or a Smi if it is not. The implementation iterates over
// objects in the page containing the address, the cost is linear in the
// number of objects in the page. It may be slow.
Object* FindObject(Address addr);
// During boot the free_space_map is created, and afterwards we may need
// to write it into the free list nodes that were already created.
void RepairFreeListsAfterDeserialization();
......
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