diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index 1b528c004a..42f0fae921 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include namespace JS::Bytecode { diff --git a/Userland/Libraries/LibJS/Bytecode/Op.cpp b/Userland/Libraries/LibJS/Bytecode/Op.cpp index ce4903c8e2..da41a5b279 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Op.cpp @@ -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(*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) \ diff --git a/Userland/Libraries/LibJS/Bytecode/Op.h b/Userland/Libraries/LibJS/Bytecode/Op.h index 769999e302..bd7e82e5c6 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.h +++ b/Userland/Libraries/LibJS/Bytecode/Op.h @@ -374,3 +374,22 @@ public: }; } + +namespace JS::Bytecode { + +ALWAYS_INLINE void Instruction::execute(Bytecode::Interpreter& interpreter) const +{ +#define __BYTECODE_OP(op) \ + case Instruction::Type::op: \ + return static_cast(*this).execute(interpreter); + + switch (type()) { + ENUMERATE_BYTECODE_OPS(__BYTECODE_OP) + default: + VERIFY_NOT_REACHED(); + } + +#undef __BYTECODE_OP +} + +}