mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 09:04:53 +00:00
UserspaceEmulator: Inline some very hot functions
This improves the browser's load time on welcome.html by ~2%.
This commit is contained in:
@@ -39,15 +39,6 @@ SoftMMU::SoftMMU(Emulator& emulator)
|
||||
{
|
||||
}
|
||||
|
||||
Region* SoftMMU::find_region(X86::LogicalAddress address)
|
||||
{
|
||||
if (address.selector() == 0x28)
|
||||
return m_tls_region.ptr();
|
||||
|
||||
size_t page_index = (address.offset() & ~(PAGE_SIZE - 1)) / PAGE_SIZE;
|
||||
return m_page_to_region_map[page_index];
|
||||
}
|
||||
|
||||
void SoftMMU::add_region(NonnullOwnPtr<Region> region)
|
||||
{
|
||||
ASSERT(!find_region({ 0x20, region->base() }));
|
||||
|
||||
Reference in New Issue
Block a user