1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

LibJS: Replace Vector<u16> usage in PrimitiveString wth Utf16String

This commit does not go out of its way to reduce copying of the string
data yet, but is a minimum set of changes to compile LibJS after making
PrimitiveString hold a Utf16String.
This commit is contained in:
Timothy Flynn 2021-08-09 09:06:45 -04:00 committed by Andreas Kling
parent 02e7dceb96
commit c1e99fca1a
11 changed files with 80 additions and 87 deletions

View file

@ -10,12 +10,12 @@
namespace JS {
// 22.2.7.1 CreateRegExpStringIterator ( R, S, global, fullUnicode ), https://tc39.es/ecma262/#sec-createregexpstringiterator
RegExpStringIterator* RegExpStringIterator::create(GlobalObject& global_object, Object& regexp_object, Vector<u16> string, bool global, bool unicode)
RegExpStringIterator* RegExpStringIterator::create(GlobalObject& global_object, Object& regexp_object, Utf16String string, bool global, bool unicode)
{
return global_object.heap().allocate<RegExpStringIterator>(global_object, *global_object.regexp_string_iterator_prototype(), regexp_object, move(string), global, unicode);
}
RegExpStringIterator::RegExpStringIterator(Object& prototype, Object& regexp_object, Vector<u16> string, bool global, bool unicode)
RegExpStringIterator::RegExpStringIterator(Object& prototype, Object& regexp_object, Utf16String string, bool global, bool unicode)
: Object(prototype)
, m_regexp_object(regexp_object)
, m_string(move(string))