[heap] Remove stray const from HeapObject arguments
These are ancient artefacts from when HeapObject was a pointer. Bug: v8:9396 Change-Id: I1782837aa5bd4b8393cd084321b90baa614a7373 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691911 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Maciej Goszczycki <goszczycki@google.com> Cr-Commit-Position: refs/heads/master@{#62647}
This commit is contained in:
parent
80ba1aa982
commit
07797c3073
@ -372,7 +372,7 @@ bool Heap::InToPage(HeapObject heap_object) {
|
|||||||
bool Heap::InOldSpace(Object object) { return old_space_->Contains(object); }
|
bool Heap::InOldSpace(Object object) { return old_space_->Contains(object); }
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Heap* Heap::FromWritableHeapObject(const HeapObject obj) {
|
Heap* Heap::FromWritableHeapObject(HeapObject obj) {
|
||||||
MemoryChunk* chunk = MemoryChunk::FromHeapObject(obj);
|
MemoryChunk* chunk = MemoryChunk::FromHeapObject(obj);
|
||||||
// RO_SPACE can be shared between heaps, so we can't use RO_SPACE objects to
|
// RO_SPACE can be shared between heaps, so we can't use RO_SPACE objects to
|
||||||
// find a heap. The exception is when the ReadOnlySpace is writeable, during
|
// find a heap. The exception is when the ReadOnlySpace is writeable, during
|
||||||
|
@ -993,7 +993,7 @@ class Heap {
|
|||||||
// with off-heap Addresses.
|
// with off-heap Addresses.
|
||||||
bool InSpaceSlow(Address addr, AllocationSpace space);
|
bool InSpaceSlow(Address addr, AllocationSpace space);
|
||||||
|
|
||||||
static inline Heap* FromWritableHeapObject(const HeapObject obj);
|
static inline Heap* FromWritableHeapObject(HeapObject obj);
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
// Object statistics tracking. ===============================================
|
// Object statistics tracking. ===============================================
|
||||||
|
@ -713,7 +713,7 @@ class MemoryChunk {
|
|||||||
return reinterpret_cast<MemoryChunk*>(BaseAddress(a));
|
return reinterpret_cast<MemoryChunk*>(BaseAddress(a));
|
||||||
}
|
}
|
||||||
// Only works if the object is in the first kPageSize of the MemoryChunk.
|
// Only works if the object is in the first kPageSize of the MemoryChunk.
|
||||||
static MemoryChunk* FromHeapObject(const HeapObject o) {
|
static MemoryChunk* FromHeapObject(HeapObject o) {
|
||||||
return reinterpret_cast<MemoryChunk*>(BaseAddress(o.ptr()));
|
return reinterpret_cast<MemoryChunk*>(BaseAddress(o.ptr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1145,7 +1145,7 @@ class Page : public MemoryChunk {
|
|||||||
static Page* FromAddress(Address addr) {
|
static Page* FromAddress(Address addr) {
|
||||||
return reinterpret_cast<Page*>(addr & ~kPageAlignmentMask);
|
return reinterpret_cast<Page*>(addr & ~kPageAlignmentMask);
|
||||||
}
|
}
|
||||||
static Page* FromHeapObject(const HeapObject o) {
|
static Page* FromHeapObject(HeapObject o) {
|
||||||
return reinterpret_cast<Page*>(o.ptr() & ~kAlignmentMask);
|
return reinterpret_cast<Page*>(o.ptr() & ~kAlignmentMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1268,7 +1268,7 @@ class LargePage : public MemoryChunk {
|
|||||||
// x64 and ia32 architectures.
|
// x64 and ia32 architectures.
|
||||||
static const int kMaxCodePageSize = 512 * MB;
|
static const int kMaxCodePageSize = 512 * MB;
|
||||||
|
|
||||||
static LargePage* FromHeapObject(const HeapObject o) {
|
static LargePage* FromHeapObject(HeapObject o) {
|
||||||
return static_cast<LargePage*>(MemoryChunk::FromHeapObject(o));
|
return static_cast<LargePage*>(MemoryChunk::FromHeapObject(o));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user