From 477ab6dc4cc91225b334cc550f8d6b79b997d536 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 24 May 2021 21:24:28 +0430 Subject: [PATCH] LibWasm: Let the interpreter itself manage the call frame --- .../LibWasm/AbstractMachine/Interpreter.cpp | 5 ++++- .../Libraries/LibWasm/AbstractMachine/Interpreter.h | 13 +++++++++++++ Userland/Utilities/wasm.cpp | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp b/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp index 45942f4dc0..5fee8c1aa7 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/Interpreter.cpp @@ -128,7 +128,7 @@ void BytecodeInterpreter::call_address(Configuration& configuration, FunctionAdd Result result { Trap {} }; { - Configuration::CallFrameHandle handle { configuration }; + CallFrameHandle handle { *this, configuration }; result = configuration.call(*this, address, move(args)); } @@ -437,7 +437,10 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi for (size_t i = 0; i < frame.arity(); ++i) results.prepend(configuration.stack().pop()); // drop all locals +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" Optional