summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWasm
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-08-12 00:57:50 +0430
committerAndreas Kling <kling@serenityos.org>2021-08-12 21:03:53 +0200
commitfa2ae0256441f53c3dcee80be430c96589739731 (patch)
treecef506bc9e997492ae48419411980c86ca71294d /Userland/Libraries/LibWasm
parent2b35e9f9becd63a90e2772614d0b111fa896a275 (diff)
downloadserenity-fa2ae0256441f53c3dcee80be430c96589739731.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWasm')
-rw-r--r--Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp1
1 files changed, 0 insertions, 1 deletions
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() };