mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 07:52:50 +00:00
UserspaceEmulator: Keep Emulator& closer to the action in some places
This avoids the cost of calling Emulator::the() in some very hot paths.
This commit is contained in:
parent
d14695f823
commit
1965fc5b98
Notes:
sideshowbarker
2024-07-19 01:22:06 +09:00
Author: https://github.com/awesomekling
Commit: 1965fc5b98
9 changed files with 127 additions and 70 deletions
|
@ -72,9 +72,10 @@ Emulator& Emulator::the()
|
|||
|
||||
Emulator::Emulator(const Vector<String>& arguments, const Vector<String>& environment, NonnullRefPtr<ELF::Loader> elf)
|
||||
: m_elf(move(elf))
|
||||
, m_mmu(*this)
|
||||
, m_cpu(*this)
|
||||
{
|
||||
m_malloc_tracer = make<MallocTracer>();
|
||||
m_malloc_tracer = make<MallocTracer>(*this);
|
||||
ASSERT(!s_the);
|
||||
s_the = this;
|
||||
setup_stack(arguments, environment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue