mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +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:
parent
4cc1de1b03
commit
f5bf53bc99
4 changed files with 17 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue