Age | Commit message (Collapse) | Author |
|
|
|
|
|
A subsequent commit will add to_utf8 back to create an AK::String.
|
|
This makes construction of Utf16String fallible in OOM conditions. The
immediate impact is that PrimitiveString must then be fallible as well,
as it may either transcode UTF-8 to UTF-16, or create a UTF-16 string
from ropes.
There are a couple of places where it is very non-trivial to propagate
the error further. A FIXME has been added to those locations.
|
|
This could fail to allocate the underlying storage needed to store the
UTF-8 data. Propagate this error.
|
|
These could fail to allocate the underlying storage needed to store the
UTF-16 data. Propagate these errors.
|
|
Instead of writing out "Vector<u16, 1>" everywhere, let's have a name
for it.
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
|
|
|
|
It's very common to encounter single-character strings in JavaScript on
the web. We can make such strings significantly lighter by having a
1-character inline capacity on the Vectors.
|
|
To help alleviate memory usage when creating and copying large strings,
create a simple wrapper around a Vector<u16> to reference count UTF-16
strings.
|