mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02: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:
committed by
Andreas Kling
parent
4ad800b594
commit
df0fdee2a0
Notes:
github-actions[bot]
2026-04-14 06:16:17 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/df0fdee2a0a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8909
@@ -62,9 +62,15 @@ public:
|
||||
Utf16FlyString const& name() const { return shared_data().m_name; }
|
||||
void set_name(Utf16FlyString const& name);
|
||||
|
||||
void set_is_class_constructor() { const_cast<SharedFunctionInstanceData&>(shared_data()).m_is_class_constructor = true; }
|
||||
void set_is_class_constructor() { const_cast<SharedFunctionInstanceData&>(shared_data()).set_is_class_constructor(); }
|
||||
|
||||
auto& bytecode_executable() const { return shared_data().m_executable; }
|
||||
[[nodiscard]] bool can_inline_call() const { return shared_data().can_inline_call(); }
|
||||
[[nodiscard]] Bytecode::Executable& inline_call_executable() const
|
||||
{
|
||||
VERIFY(can_inline_call());
|
||||
return *shared_data().m_executable;
|
||||
}
|
||||
|
||||
Environment* environment() { return m_environment; }
|
||||
virtual Realm* realm() const override { return &shape().realm(); }
|
||||
|
||||
Reference in New Issue
Block a user