mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +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
|
@ -441,13 +441,11 @@ public:
|
|||
// Load and instantiate a module, and link it into this interpreter.
|
||||
InstantiationResult instantiate(const Module&, Vector<ExternValue>);
|
||||
Result invoke(FunctionAddress, Vector<Value>);
|
||||
Result invoke(Interpreter&, FunctionAddress, Vector<Value>);
|
||||
|
||||
auto& store() const { return m_store; }
|
||||
auto& store() { return m_store; }
|
||||
|
||||
Function<bool(Configuration&, InstructionPointer&, const Instruction&)> pre_interpret_hook;
|
||||
Function<bool(Configuration&, InstructionPointer&, const Instruction&, const Interpreter&)> post_interpret_hook;
|
||||
|
||||
private:
|
||||
Optional<InstantiationError> allocate_all(const Module&, ModuleInstance&, Vector<ExternValue>&, Vector<Value>& global_values);
|
||||
Store m_store;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue