mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 09:45:09 +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:
parent
1b9a85e4f1
commit
da413a464a
6 changed files with 33 additions and 34 deletions
|
@ -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() }));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue