LibJS+LibWeb: Port remaining callers to Rust pipeline

Port all remaining users of the C++ Parser/Lexer/Generator to
use the Rust pipeline instead:

- Intrinsics: Remove C++ fallback in parse_builtin_file()
- ECMAScriptFunctionObject: Remove C++ compile() fallback
- NativeJavaScriptBackedFunction: Remove C++ compile() fallback
- EventTarget: Port to compile_dynamic_function
- WebDriver/ExecuteScript: Port to compile_dynamic_function
- LibTest/JavaScriptTestRunner.h: Remove Parser/Lexer includes
- FuzzilliJs: Remove unused Parser/Lexer includes

Also remove the dead Statement-based template instantiation of
async_block_start/async_function_start.
This commit is contained in:
Andreas Kling 2026-03-19 12:41:49 -05:00 committed by Andreas Kling
parent 0c7d50b33d
commit 3518efd71c
Notes: github-actions[bot] 2026-03-20 02:57:29 +00:00
9 changed files with 47 additions and 113 deletions

View file

@ -5,8 +5,6 @@
*/
#include <AK/TypeCasts.h>
#include <LibJS/Bytecode/BuiltinAbstractOperationsEnabled.h>
#include <LibJS/Bytecode/Generator.h>
#include <LibJS/Bytecode/Interpreter.h>
#include <LibJS/Runtime/AsyncFunctionDriverWrapper.h>
#include <LibJS/Runtime/AsyncGenerator.h>
@ -100,14 +98,11 @@ Bytecode::Executable& NativeJavaScriptBackedFunction::bytecode_executable()
auto& executable = m_shared_function_instance_data->m_executable;
if (!executable) {
auto rust_executable = RustIntegration::compile_function(vm(), *m_shared_function_instance_data, true);
if (rust_executable) {
executable = rust_executable;
executable->name = m_shared_function_instance_data->m_name;
if (Bytecode::g_dump_bytecode)
executable->dump();
} else {
executable = Bytecode::compile(vm(), m_shared_function_instance_data, Bytecode::BuiltinAbstractOperationsEnabled::Yes);
}
VERIFY(rust_executable);
executable = rust_executable;
executable->name = m_shared_function_instance_data->m_name;
if (Bytecode::g_dump_bytecode)
executable->dump();
m_shared_function_instance_data->clear_compile_inputs();
}