mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibJS/Bytecode: Make IdentifierTableIndex a 32-bit index
This makes a bunch of instructions smaller.
This commit is contained in:
parent
95759dcc6d
commit
37d722f4a6
Notes:
sideshowbarker
2024-07-17 05:02:35 +09:00
Author: https://github.com/awesomekling
Commit: 37d722f4a6
Pull-request: https://github.com/SerenityOS/serenity/pull/24240
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 10 additions and 6 deletions
|
@ -1758,7 +1758,7 @@ ByteString GetGlobal::to_byte_string_impl(Bytecode::Executable const& executable
|
|||
|
||||
ByteString DeleteVariable::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return ByteString::formatted("DeleteVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
return ByteString::formatted("DeleteVariable {}", executable.identifier_table->get(m_identifier));
|
||||
}
|
||||
|
||||
ByteString CreateLexicalEnvironment::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
|
@ -1769,7 +1769,7 @@ ByteString CreateLexicalEnvironment::to_byte_string_impl(Bytecode::Executable co
|
|||
ByteString CreateVariable::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto mode_string = m_mode == EnvironmentMode::Lexical ? "Lexical" : "Variable";
|
||||
return ByteString::formatted("CreateVariable env:{} immutable:{} global:{} {} ({})", mode_string, m_is_immutable, m_is_global, m_identifier, executable.identifier_table->get(m_identifier));
|
||||
return ByteString::formatted("CreateVariable env:{} immutable:{} global:{} {}", mode_string, m_is_immutable, m_is_global, executable.identifier_table->get(m_identifier));
|
||||
}
|
||||
|
||||
ByteString EnterObjectEnvironment::to_byte_string_impl(Executable const& executable) const
|
||||
|
@ -2010,7 +2010,7 @@ ByteString NewClass::to_byte_string_impl(Bytecode::Executable const& executable)
|
|||
if (!name.is_empty())
|
||||
builder.appendff(", {}", name);
|
||||
if (m_lhs_name.has_value())
|
||||
builder.appendff(", lhs_name:{}"sv, m_lhs_name.value());
|
||||
builder.appendff(", lhs_name:{}"sv, executable.get_identifier(m_lhs_name.value()));
|
||||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue