mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibJS/Bytecode: Make IdentifierTableIndex a 32-bit index
This makes a bunch of instructions smaller.
This commit is contained in:
@@ -11,12 +11,13 @@ namespace JS::Bytecode {
|
||||
IdentifierTableIndex IdentifierTable::insert(DeprecatedFlyString string)
|
||||
{
|
||||
m_identifiers.append(move(string));
|
||||
return m_identifiers.size() - 1;
|
||||
VERIFY(m_identifiers.size() <= NumericLimits<u32>::max());
|
||||
return { static_cast<u32>(m_identifiers.size() - 1) };
|
||||
}
|
||||
|
||||
DeprecatedFlyString const& IdentifierTable::get(IdentifierTableIndex index) const
|
||||
{
|
||||
return m_identifiers[index.value()];
|
||||
return m_identifiers[index.value];
|
||||
}
|
||||
|
||||
void IdentifierTable::dump() const
|
||||
|
||||
Reference in New Issue
Block a user