mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibJS: Introduce Builtins
Builtins are functions that can be detected during bytecode generation and enable fast-paths in the JIT.
This commit is contained in:
parent
b9141d85d8
commit
86b85aa68b
Notes:
sideshowbarker
2024-07-17 10:39:39 +09:00
Author: https://github.com/skyrising
Commit: 86b85aa68b
Pull-request: https://github.com/SerenityOS/serenity/pull/21969
13 changed files with 191 additions and 4 deletions
|
@ -1514,6 +1514,8 @@ static StringView call_type_to_string(CallType type)
|
|||
DeprecatedString Call::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto type = call_type_to_string(m_type);
|
||||
if (m_builtin.has_value())
|
||||
return DeprecatedString::formatted("Call{} callee:{}, this:{}, first_arg:{} (builtin {})", type, m_callee, m_this_value, m_first_argument, m_builtin.value());
|
||||
if (m_expression_string.has_value())
|
||||
return DeprecatedString::formatted("Call{} callee:{}, this:{}, first_arg:{} ({})", type, m_callee, m_this_value, m_first_argument, executable.get_string(m_expression_string.value()));
|
||||
return DeprecatedString::formatted("Call{} callee:{}, this:{}, first_arg:{}", type, m_callee, m_first_argument, m_this_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue