diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp index 44cb734ce8..a234a0066f 100644 --- a/Userland/Libraries/LibJS/AST.cpp +++ b/Userland/Libraries/LibJS/AST.cpp @@ -4760,9 +4760,8 @@ void ScopeNode::block_declaration_instantiation(Interpreter& interpreter, Enviro } // 16.1.7 GlobalDeclarationInstantiation ( script, env ), https://tc39.es/ecma262/#sec-globaldeclarationinstantiation -ThrowCompletionOr Program::global_declaration_instantiation(Interpreter& interpreter, GlobalEnvironment& global_environment) const +ThrowCompletionOr Program::global_declaration_instantiation(VM& vm, GlobalEnvironment& global_environment) const { - auto& vm = interpreter.vm(); auto& realm = *vm.current_realm(); // 1. Let lexNames be the LexicallyDeclaredNames of script. diff --git a/Userland/Libraries/LibJS/AST.h b/Userland/Libraries/LibJS/AST.h index 3f36831327..b50f1ada1e 100644 --- a/Userland/Libraries/LibJS/AST.h +++ b/Userland/Libraries/LibJS/AST.h @@ -537,7 +537,7 @@ public: bool has_top_level_await() const { return m_has_top_level_await; } void set_has_top_level_await() { m_has_top_level_await = true; } - ThrowCompletionOr global_declaration_instantiation(Interpreter&, GlobalEnvironment&) const; + ThrowCompletionOr global_declaration_instantiation(VM&, GlobalEnvironment&) const; private: virtual bool is_program() const override { return true; } diff --git a/Userland/Libraries/LibJS/Interpreter.cpp b/Userland/Libraries/LibJS/Interpreter.cpp index 2dc3be1e19..166a79a816 100644 --- a/Userland/Libraries/LibJS/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Interpreter.cpp @@ -80,7 +80,7 @@ ThrowCompletionOr Interpreter::run(Script& script_record, JS::GCPtr