mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
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:
parent
f05b0bfd5f
commit
c71772126f
Notes:
github-actions[bot]
2025-03-28 16:32:54 +00:00
Author: https://github.com/awesomekling
Commit: c71772126f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4142
Reviewed-by: https://github.com/trflynn89
14 changed files with 49 additions and 118 deletions
|
@ -75,14 +75,14 @@ VM::VM(OwnPtr<CustomData> custom_data, ErrorMessages error_messages)
|
|||
m_empty_string = m_heap.allocate<PrimitiveString>(String {});
|
||||
|
||||
typeof_strings = {
|
||||
.number = m_heap.allocate<PrimitiveString>("number"),
|
||||
.undefined = m_heap.allocate<PrimitiveString>("undefined"),
|
||||
.object = m_heap.allocate<PrimitiveString>("object"),
|
||||
.string = m_heap.allocate<PrimitiveString>("string"),
|
||||
.symbol = m_heap.allocate<PrimitiveString>("symbol"),
|
||||
.boolean = m_heap.allocate<PrimitiveString>("boolean"),
|
||||
.bigint = m_heap.allocate<PrimitiveString>("bigint"),
|
||||
.function = m_heap.allocate<PrimitiveString>("function"),
|
||||
.number = m_heap.allocate<PrimitiveString>("number"_string),
|
||||
.undefined = m_heap.allocate<PrimitiveString>("undefined"_string),
|
||||
.object = m_heap.allocate<PrimitiveString>("object"_string),
|
||||
.string = m_heap.allocate<PrimitiveString>("string"_string),
|
||||
.symbol = m_heap.allocate<PrimitiveString>("symbol"_string),
|
||||
.boolean = m_heap.allocate<PrimitiveString>("boolean"_string),
|
||||
.bigint = m_heap.allocate<PrimitiveString>("bigint"_string),
|
||||
.function = m_heap.allocate<PrimitiveString>("function"_string),
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < single_ascii_character_strings.size(); ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue