mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibJS: Remove GlobalObject from execute() and related AST functions
This is a continuation of the previous four commits. Passing a global object here is largely redundant, we definitely need the interpreter but can get the VM and (later) current active realm from there - and also the global object while we still need it, although I'd like to remove Interpreter::global_object() in the future. This now matches the bytecode interpreter's execute_impl() functions.
This commit is contained in:
@@ -660,7 +660,7 @@ ThrowCompletionOr<void> SourceTextModule::execute_module(VM& vm, Optional<Promis
|
||||
TRY(vm.push_execution_context(module_context, realm().global_object()));
|
||||
|
||||
// c. Let result be the result of evaluating module.[[ECMAScriptCode]].
|
||||
auto result = m_ecmascript_code->execute(vm.interpreter(), realm().global_object());
|
||||
auto result = m_ecmascript_code->execute(vm.interpreter());
|
||||
|
||||
// d. Suspend moduleContext and remove it from the execution context stack.
|
||||
vm.pop_execution_context();
|
||||
|
||||
Reference in New Issue
Block a user