From fa2ae0256441f53c3dcee80be430c96589739731 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Thu, 12 Aug 2021 00:57:50 +0430 Subject: [PATCH] LibWasm: Avoid calculating stack bounds on each wasm call We only need to know the initial bounds, which we calculate by default when the interpreter is constructed. This cuts down on syscalls and makes wasm calls a lot cheaper. --- .../Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp index dc0409c004..a98f5bd9d3 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp @@ -31,7 +31,6 @@ namespace Wasm { void BytecodeInterpreter::interpret(Configuration& configuration) { - m_stack_info = {}; m_trap.clear(); auto& instructions = configuration.frame().expression().instructions(); auto max_ip_value = InstructionPointer { instructions.size() };