mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +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
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