1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 14:05:09 +00:00

LibJS: Use a Vector<u8> for BasicBlock instruction storage

This reduces the minimum size of a basic block from 4 KiB to 0 bytes.
With this change, memory usage at the end of Speedometer is 1.2 GiB,
down from 1.8 GiB.
This commit is contained in:
Andreas Kling 2023-09-28 09:29:42 +02:00
parent 89a86798a2
commit d24e07579f
4 changed files with 20 additions and 67 deletions

View file

@ -82,12 +82,6 @@ void Generator::grow(size_t additional_size)
m_current_basic_block->grow(additional_size);
}
void* Generator::next_slot()
{
VERIFY(m_current_basic_block);
return m_current_basic_block->next_slot();
}
Register Generator::allocate_register()
{
VERIFY(m_next_register != NumericLimits<u32>::max());