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:
Andreas Kling
2026-04-13 13:43:55 +02:00
committed by Andreas Kling
parent 4ad800b594
commit df0fdee2a0
Notes: github-actions[bot] 2026-04-14 06:16:17 +00:00
8 changed files with 46 additions and 12 deletions

View File

@@ -139,10 +139,11 @@ void ECMAScriptFunctionObject::initialize(Realm& realm)
void ECMAScriptFunctionObject::get_stack_frame_info(size_t& registers_and_locals_count, ReadonlySpan<Value>& constants, size_t& argument_count)
{
auto& executable = shared_data().m_executable;
auto executable = shared_data().m_executable;
if (!executable) {
auto rust_executable = RustIntegration::compile_function(vm(), *m_shared_data, false);
VERIFY(rust_executable);
m_shared_data->set_executable(rust_executable);
executable = rust_executable;
executable->name = m_shared_data->m_name;
if (Bytecode::g_dump_bytecode)