diff --git a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp index 8e5ee208ae5..a6941c21baf 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp @@ -48,7 +48,7 @@ void BytecodeInterpreter::interpret(Configuration& configuration) } auto& instruction = instructions[current_ip_value.value()]; auto old_ip = current_ip_value; - interpret(configuration, current_ip_value, instruction); + interpret_instruction(configuration, current_ip_value, instruction); if (did_trap()) return; if (current_ip_value == old_ip) // If no jump occurred @@ -420,7 +420,7 @@ Vector BytecodeInterpreter::pop_values(Configuration& configuration, size return results; } -void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPointer& ip, Instruction const& instruction) +ALWAYS_INLINE void BytecodeInterpreter::interpret_instruction(Configuration& configuration, InstructionPointer& ip, Instruction const& instruction) { dbgln_if(WASM_TRACE_DEBUG, "Executing instruction {} at ip {}", instruction_name(instruction.opcode()), ip.value()); @@ -1671,7 +1671,7 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi } } -void DebuggerBytecodeInterpreter::interpret(Configuration& configuration, InstructionPointer& ip, Instruction const& instruction) +void DebuggerBytecodeInterpreter::interpret_instruction(Configuration& configuration, InstructionPointer& ip, Instruction const& instruction) { if (pre_interpret_hook) { auto result = pre_interpret_hook(configuration, ip, instruction); @@ -1681,7 +1681,7 @@ void DebuggerBytecodeInterpreter::interpret(Configuration& configuration, Instru } } - BytecodeInterpreter::interpret(configuration, ip, instruction); + BytecodeInterpreter::interpret_instruction(configuration, ip, instruction); if (post_interpret_hook) { auto result = post_interpret_hook(configuration, ip, instruction, *this); diff --git a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.h b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.h index 48aa8774e15..8c39238483d 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.h +++ b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.h @@ -19,6 +19,7 @@ struct BytecodeInterpreter : public Interpreter { } virtual void interpret(Configuration&) override; + virtual ~BytecodeInterpreter() override = default; virtual bool did_trap() const override { return !m_trap.has(); } virtual ByteString trap_reason() const override @@ -44,7 +45,7 @@ struct BytecodeInterpreter : public Interpreter { }; protected: - virtual void interpret(Configuration&, InstructionPointer&, Instruction const&); + void interpret_instruction(Configuration&, InstructionPointer&, Instruction const&); void branch_to_label(Configuration&, LabelIndex); template void load_and_push(Configuration&, Instruction const&); @@ -101,7 +102,7 @@ struct DebuggerBytecodeInterpreter : public BytecodeInterpreter { Function post_interpret_hook; private: - virtual void interpret(Configuration&, InstructionPointer&, Instruction const&) override; + void interpret_instruction(Configuration&, InstructionPointer&, Instruction const&); }; }