mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
LibWasm: Let the interpreter itself manage the call frame
This commit is contained in:
parent
85794f8244
commit
477ab6dc4c
3 changed files with 18 additions and 2 deletions
|
@ -23,6 +23,19 @@ struct BytecodeInterpreter : public Interpreter {
|
|||
virtual bool did_trap() const override { return m_do_trap; }
|
||||
virtual void clear_trap() override { m_do_trap = false; }
|
||||
|
||||
struct CallFrameHandle {
|
||||
explicit CallFrameHandle(BytecodeInterpreter& interpreter, Configuration& configuration)
|
||||
: m_configuration_handle(configuration)
|
||||
, m_interpreter(interpreter)
|
||||
{
|
||||
}
|
||||
|
||||
~CallFrameHandle() = default;
|
||||
|
||||
Configuration::CallFrameHandle m_configuration_handle;
|
||||
BytecodeInterpreter& m_interpreter;
|
||||
};
|
||||
|
||||
protected:
|
||||
virtual void interpret(Configuration&, InstructionPointer&, const Instruction&);
|
||||
void branch_to_label(Configuration&, LabelIndex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue