mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-18 18:00:31 +00:00
LibJS: Cache JS-to-JS inline call eligibility
Store whether a function can participate in JS-to-JS inline calls on SharedFunctionInstanceData instead of recomputing the function kind, class-constructor bit, and bytecode availability at each fast-path call site.
This commit is contained in:
parent
4ad800b594
commit
df0fdee2a0
Notes:
github-actions[bot]
2026-04-14 06:16:17 +00:00
Author: https://github.com/awesomekling
Commit: df0fdee2a0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8909
8 changed files with 46 additions and 12 deletions
|
|
@ -95,10 +95,11 @@ ThrowCompletionOr<Value> NativeJavaScriptBackedFunction::call()
|
|||
|
||||
Bytecode::Executable& NativeJavaScriptBackedFunction::bytecode_executable()
|
||||
{
|
||||
auto& executable = m_shared_function_instance_data->m_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);
|
||||
VERIFY(rust_executable);
|
||||
m_shared_function_instance_data->set_executable(rust_executable);
|
||||
executable = rust_executable;
|
||||
executable->name = m_shared_function_instance_data->m_name;
|
||||
if (Bytecode::g_dump_bytecode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue