diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index df4ead07ac..0640176925 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -7,11 +7,13 @@ #include #include #include +#include namespace JS::Bytecode { Interpreter::Interpreter(GlobalObject& global_object) - : m_global_object(global_object) + : m_vm(global_object.vm()) + , m_global_object(global_object) { } diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.h b/Userland/Libraries/LibJS/Bytecode/Interpreter.h index 0a08ea9c69..70b65fdb6a 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.h +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.h @@ -19,12 +19,14 @@ public: ~Interpreter(); GlobalObject& global_object() { return m_global_object; } + VM& vm() { return m_vm; } void run(Bytecode::Block const&); Value& reg(Register const& r) { return m_registers[r.index()]; } private: + VM& m_vm; GlobalObject& m_global_object; Vector m_registers; };