LibJS: Remove ByteString internals from PrimitiveString

PrimitiveString is now internally either UTF-8, UTF-16, or both.
We no longer convert them to/from ByteString anywhere, nor does VM have
a ByteString cache.
This commit is contained in:
Andreas Kling 2025-03-28 13:55:39 +00:00 committed by Tim Flynn
commit c71772126f
Notes: github-actions[bot] 2025-03-28 16:32:54 +00:00
14 changed files with 49 additions and 118 deletions

View file

@ -77,11 +77,6 @@ public:
return m_string_cache;
}
HashMap<ByteString, GC::Ptr<PrimitiveString>>& byte_string_cache()
{
return m_byte_string_cache;
}
HashMap<Utf16String, GC::Ptr<PrimitiveString>>& utf16_string_cache()
{
return m_utf16_string_cache;
@ -310,7 +305,6 @@ private:
void set_well_known_symbols(WellKnownSymbols well_known_symbols) { m_well_known_symbols = move(well_known_symbols); }
HashMap<String, GC::Ptr<PrimitiveString>> m_string_cache;
HashMap<ByteString, GC::Ptr<PrimitiveString>> m_byte_string_cache;
HashMap<Utf16String, GC::Ptr<PrimitiveString>> m_utf16_string_cache;
GC::Heap m_heap;