mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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:
committed by
Andreas Kling
parent
0c7d50b33d
commit
3518efd71c
Notes:
github-actions[bot]
2026-03-20 02:57:29 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/3518efd71ca Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8517
@@ -221,16 +221,11 @@ void ECMAScriptFunctionObject::get_stack_frame_size(size_t& registers_and_locals
|
||||
auto& executable = shared_data().m_executable;
|
||||
if (!executable) {
|
||||
auto rust_executable = RustIntegration::compile_function(vm(), *m_shared_data, false);
|
||||
if (rust_executable) {
|
||||
executable = rust_executable;
|
||||
executable->name = m_shared_data->m_name;
|
||||
if (Bytecode::g_dump_bytecode)
|
||||
executable->dump();
|
||||
} else if (is_module_wrapper()) {
|
||||
executable = Bytecode::compile(vm(), ecmascript_code(), kind(), name());
|
||||
} else {
|
||||
executable = Bytecode::compile(vm(), shared_data(), Bytecode::BuiltinAbstractOperationsEnabled::No);
|
||||
}
|
||||
VERIFY(rust_executable);
|
||||
executable = rust_executable;
|
||||
executable->name = m_shared_data->m_name;
|
||||
if (Bytecode::g_dump_bytecode)
|
||||
executable->dump();
|
||||
m_shared_data->clear_compile_inputs();
|
||||
}
|
||||
registers_and_locals_count = executable->registers_and_locals_count;
|
||||
@@ -599,9 +594,6 @@ void async_block_start(VM& vm, T const& async_body, PromiseCapability const& pro
|
||||
// 8. Return unused.
|
||||
}
|
||||
|
||||
template void async_block_start(VM&, NonnullRefPtr<Statement const> const& async_body, PromiseCapability const&, ExecutionContext&);
|
||||
template void async_function_start(VM&, PromiseCapability const&, NonnullRefPtr<Statement const> const& async_function_body);
|
||||
|
||||
template void async_block_start(VM&, GC::Function<Completion()> const& async_body, PromiseCapability const&, ExecutionContext&);
|
||||
template void async_function_start(VM&, PromiseCapability const&, GC::Function<Completion()> const& async_function_body);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user