mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-18 18:00:31 +00:00
LibJS: Move bytecode interpreter state to VM
The bytecode interpreter only needed the running execution context, but still threaded a separate Interpreter object through both the C++ and asm entry points. Move that state and the bytecode execution helpers onto VM instead, and teach the asm generator and slow paths to use VM directly.
This commit is contained in:
parent
ff5273084d
commit
2ca7dfa649
Notes:
github-actions[bot]
2026-04-13 16:31:24 +00:00
Author: https://github.com/awesomekling
Commit: 2ca7dfa649
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8891
Reviewed-by: https://github.com/shannonbooth
37 changed files with 1170 additions and 1266 deletions
|
|
@ -8,13 +8,13 @@
|
|||
#include <AK/Debug.h>
|
||||
#include <AK/QuickSort.h>
|
||||
#include <LibJS/Bytecode/Executable.h>
|
||||
#include <LibJS/Bytecode/Interpreter.h>
|
||||
#include <LibJS/Runtime/AsyncFunctionDriverWrapper.h>
|
||||
#include <LibJS/Runtime/ECMAScriptFunctionObject.h>
|
||||
#include <LibJS/Runtime/GlobalEnvironment.h>
|
||||
#include <LibJS/Runtime/ModuleEnvironment.h>
|
||||
#include <LibJS/Runtime/PromiseCapability.h>
|
||||
#include <LibJS/Runtime/SharedFunctionInstanceData.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
#include <LibJS/RustIntegration.h>
|
||||
#include <LibJS/Script.h>
|
||||
#include <LibJS/SourceCode.h>
|
||||
|
|
@ -551,7 +551,7 @@ ThrowCompletionOr<void> SourceTextModule::execute_module(VM& vm, GC::Ptr<Promise
|
|||
// c. Let result be the result of evaluating module.[[ECMAScriptCode]].
|
||||
Completion result;
|
||||
|
||||
auto result_or_error = vm.bytecode_interpreter().run_executable(*module_context, *m_executable, {});
|
||||
auto result_or_error = vm.run_executable(*module_context, *m_executable, {});
|
||||
if (result_or_error.is_error()) {
|
||||
result = result_or_error.release_error();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue