mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWasm: Inline bytecode interpreter instruction interpretation
Gets fib(30) from 480ms to 380ms.
This commit is contained in:
parent
a3b077c641
commit
b73b17aab4
Notes:
github-actions[bot]
2024-08-06 23:11:23 +00:00
Author: https://github.com/dzfrias
Commit: b73b17aab4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/960
Reviewed-by: https://github.com/alimpfard
2 changed files with 7 additions and 6 deletions
|
@ -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<Empty>(); }
|
||||
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<typename ReadT, typename PushT>
|
||||
void load_and_push(Configuration&, Instruction const&);
|
||||
|
@ -101,7 +102,7 @@ struct DebuggerBytecodeInterpreter : public BytecodeInterpreter {
|
|||
Function<bool(Configuration&, InstructionPointer&, Instruction const&, Interpreter const&)> post_interpret_hook;
|
||||
|
||||
private:
|
||||
virtual void interpret(Configuration&, InstructionPointer&, Instruction const&) override;
|
||||
void interpret_instruction(Configuration&, InstructionPointer&, Instruction const&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue