mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibJS: Always inline HeapBlock::allocate()
This thing is so simple and sits on the hot path so just inline it.
This commit is contained in:
@@ -73,13 +73,6 @@ HeapBlock::HeapBlock(Heap& heap, size_t cell_size)
|
||||
m_freelist = next;
|
||||
}
|
||||
|
||||
Cell* HeapBlock::allocate()
|
||||
{
|
||||
if (!m_freelist)
|
||||
return nullptr;
|
||||
return exchange(m_freelist, m_freelist->next);
|
||||
}
|
||||
|
||||
void HeapBlock::deallocate(Cell* cell)
|
||||
{
|
||||
ASSERT(cell->is_live());
|
||||
|
||||
Reference in New Issue
Block a user