mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
LibJS: Use String and move semantics in Bytecode::StringTable
Avoid creating new AK::String objects when we already have one.
This commit is contained in:
parent
3117182c2e
commit
13f04e37e5
3 changed files with 5 additions and 5 deletions
|
@ -97,9 +97,9 @@ public:
|
|||
return m_current_basic_block->is_terminated();
|
||||
}
|
||||
|
||||
StringTableIndex intern_string(StringView const& string)
|
||||
StringTableIndex intern_string(String string)
|
||||
{
|
||||
return m_string_table->insert(string);
|
||||
return m_string_table->insert(move(string));
|
||||
}
|
||||
|
||||
bool is_in_generator_function() const { return m_is_in_generator_function; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue