diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Heap')
-rw-r--r-- | Userland/Libraries/LibJS/Heap/Handle.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Heap/Heap.cpp | 12 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Heap/Heap.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Heap/HeapBlock.h | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Libraries/LibJS/Heap/Handle.h b/Userland/Libraries/LibJS/Heap/Handle.h index d353279e5d..3fa2a01c29 100644 --- a/Userland/Libraries/LibJS/Heap/Handle.h +++ b/Userland/Libraries/LibJS/Heap/Handle.h @@ -25,7 +25,7 @@ public: ~HandleImpl(); Cell* cell() { return m_cell; } - const Cell* cell() const { return m_cell; } + Cell const* cell() const { return m_cell; } private: template<class T> diff --git a/Userland/Libraries/LibJS/Heap/Heap.cpp b/Userland/Libraries/LibJS/Heap/Heap.cpp index fcc8575af5..ca50bc28d0 100644 --- a/Userland/Libraries/LibJS/Heap/Heap.cpp +++ b/Userland/Libraries/LibJS/Heap/Heap.cpp @@ -156,15 +156,15 @@ __attribute__((no_sanitize("address"))) void Heap::gather_conservative_roots(Has for (auto possible_pointer : possible_pointers) { if (!possible_pointer) continue; - dbgln_if(HEAP_DEBUG, " ? {}", (const void*)possible_pointer); - auto* possible_heap_block = HeapBlock::from_cell(reinterpret_cast<const Cell*>(possible_pointer)); + dbgln_if(HEAP_DEBUG, " ? {}", (void const*)possible_pointer); + auto* possible_heap_block = HeapBlock::from_cell(reinterpret_cast<Cell const*>(possible_pointer)); if (all_live_heap_blocks.contains(possible_heap_block)) { if (auto* cell = possible_heap_block->cell_from_possible_pointer(possible_pointer)) { if (cell->state() == Cell::State::Live) { - dbgln_if(HEAP_DEBUG, " ?-> {}", (const void*)cell); + dbgln_if(HEAP_DEBUG, " ?-> {}", (void const*)cell); roots.set(cell); } else { - dbgln_if(HEAP_DEBUG, " #-> {}", (const void*)cell); + dbgln_if(HEAP_DEBUG, " #-> {}", (void const*)cell); } } } @@ -186,7 +186,7 @@ public: } }; -void Heap::mark_live_cells(const HashTable<Cell*>& roots) +void Heap::mark_live_cells(HashTable<Cell*> const& roots) { dbgln_if(HEAP_DEBUG, "mark_live_cells:"); @@ -200,7 +200,7 @@ void Heap::mark_live_cells(const HashTable<Cell*>& roots) m_uprooted_cells.clear(); } -void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measurement_timer) +void Heap::sweep_dead_cells(bool print_report, Core::ElapsedTimer const& measurement_timer) { dbgln_if(HEAP_DEBUG, "sweep_dead_cells:"); Vector<HeapBlock*, 32> empty_blocks; diff --git a/Userland/Libraries/LibJS/Heap/Heap.h b/Userland/Libraries/LibJS/Heap/Heap.h index 470f11a1af..752a2a97d8 100644 --- a/Userland/Libraries/LibJS/Heap/Heap.h +++ b/Userland/Libraries/LibJS/Heap/Heap.h @@ -84,8 +84,8 @@ private: void gather_roots(HashTable<Cell*>&); void gather_conservative_roots(HashTable<Cell*>&); - void mark_live_cells(const HashTable<Cell*>& live_cells); - void sweep_dead_cells(bool print_report, const Core::ElapsedTimer&); + void mark_live_cells(HashTable<Cell*> const& live_cells); + void sweep_dead_cells(bool print_report, Core::ElapsedTimer const&); CellAllocator& allocator_for_size(size_t); diff --git a/Userland/Libraries/LibJS/Heap/HeapBlock.h b/Userland/Libraries/LibJS/Heap/HeapBlock.h index 750394862c..891cc89fed 100644 --- a/Userland/Libraries/LibJS/Heap/HeapBlock.h +++ b/Userland/Libraries/LibJS/Heap/HeapBlock.h @@ -68,7 +68,7 @@ public: Heap& heap() { return m_heap; } - static HeapBlock* from_cell(const Cell* cell) + static HeapBlock* from_cell(Cell const* cell) { return reinterpret_cast<HeapBlock*>((FlatPtr)cell & ~(block_size - 1)); } @@ -84,7 +84,7 @@ public: return cell(cell_index); } - bool is_valid_cell_pointer(const Cell* cell) + bool is_valid_cell_pointer(Cell const* cell) { return cell_from_possible_pointer((FlatPtr)cell); } |