1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:38:10 +00:00

LibJS: Move Bytecode::Instruction::execute() to the Op.h header

..and make sure it always gets inlined in the interpreter loop.
This commit is contained in:
Andreas Kling 2021-06-09 09:19:34 +02:00
parent b61f198d22
commit 48a8022cf6
3 changed files with 20 additions and 15 deletions

View file

@ -16,21 +16,6 @@
namespace JS::Bytecode {
void Instruction::execute(Bytecode::Interpreter& interpreter) const
{
#define __BYTECODE_OP(op) \
case Instruction::Type::op: \
return static_cast<Bytecode::Op::op const&>(*this).execute(interpreter);
switch (type()) {
ENUMERATE_BYTECODE_OPS(__BYTECODE_OP)
default:
VERIFY_NOT_REACHED();
}
#undef __BYTECODE_OP
}
String Instruction::to_string() const
{
#define __BYTECODE_OP(op) \