mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibJS: Rip out the AST interpreter :^)
This has been superseded by the bytecode VM, which is both faster and more capable.
This commit is contained in:
parent
fcc72a787b
commit
2eaa528a0e
Notes:
sideshowbarker
2024-07-17 02:14:39 +09:00
Author: https://github.com/awesomekling
Commit: 2eaa528a0e
Pull-request: https://github.com/SerenityOS/serenity/pull/20421
41 changed files with 147 additions and 3734 deletions
|
@ -14,7 +14,6 @@
|
|||
#include <LibJS/Contrib/Test262/GlobalObject.h>
|
||||
#include <LibJS/Contrib/Test262/IsHTMLDDA.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/ArrayBuffer.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
@ -103,12 +102,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::eval_script)
|
|||
}
|
||||
|
||||
// 5. Let status be ScriptEvaluation(s).
|
||||
auto status = [&] {
|
||||
if (auto* bytecode_interpreter = vm.bytecode_interpreter_if_exists())
|
||||
return bytecode_interpreter->run(script_or_error.value());
|
||||
else
|
||||
return vm.interpreter().run(script_or_error.value());
|
||||
}();
|
||||
auto status = vm.bytecode_interpreter().run(script_or_error.value());
|
||||
|
||||
// 6. Return Completion(status).
|
||||
return status;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue