1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibWasm: Make Interpreter a virtual interface

This allows multiply different kinds of interpreters to be used by the
runtime; currently a BytecodeInterpreter and a
DebuggerBytecodeInterpreter is provided.
This commit is contained in:
Ali Mohammad Pur 2021-05-24 02:04:58 +04:30 committed by Ali Mohammad Pur
parent f91fa79fc5
commit c5df55a8a2
7 changed files with 86 additions and 66 deletions

View file

@ -58,14 +58,11 @@ public:
};
void unwind(Badge<CallFrameHandle>, const CallFrameHandle&);
Result call(FunctionAddress, Vector<Value> arguments);
Result execute();
Result call(Interpreter&, FunctionAddress, Vector<Value> arguments);
Result execute(Interpreter&);
void dump_stack();
Function<bool(Configuration&, InstructionPointer&, const Instruction&)>* pre_interpret_hook { nullptr };
Function<bool(Configuration&, InstructionPointer&, const Instruction&, const Interpreter&)>* post_interpret_hook { nullptr };
private:
Store& m_store;
size_t m_current_frame_index { 0 };