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:
parent
f91fa79fc5
commit
c5df55a8a2
7 changed files with 86 additions and 66 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue