mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
LibWasm: Create AK::StackInfo once per AbstractMachine
This makes test-wasm about 20% faster on my Linux machine :^)
This commit is contained in:
@@ -162,7 +162,7 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
|
||||
auxiliary_instance.globals().append(*ptr);
|
||||
}
|
||||
|
||||
BytecodeInterpreter interpreter;
|
||||
BytecodeInterpreter interpreter(m_stack_info);
|
||||
|
||||
module.for_each_section_of_type<GlobalSection>([&](auto& global_section) {
|
||||
for (auto& entry : global_section.entries()) {
|
||||
@@ -491,7 +491,7 @@ Optional<InstantiationError> AbstractMachine::allocate_all_final_phase(Module co
|
||||
|
||||
Result AbstractMachine::invoke(FunctionAddress address, Vector<Value> arguments)
|
||||
{
|
||||
BytecodeInterpreter interpreter;
|
||||
BytecodeInterpreter interpreter(m_stack_info);
|
||||
return invoke(interpreter, address, move(arguments));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user