1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:57:35 +00:00

AK: Implement FlyString for the new String class

This implements a FlyString that will de-duplicate String instances. The
FlyString will store the raw encoded data of the String instance: If the
String is a short string, FlyString holds the String::ShortString bytes;
otherwise FlyString holds a pointer to the Detail::StringData.

FlyString itself does not know about String's storage or how to refcount
its Detail::StringData. It defers to String to implement these details.
This commit is contained in:
Timothy Flynn 2023-01-11 08:26:49 -05:00 committed by Andreas Kling
parent f49a65cb28
commit 1d4f287582
8 changed files with 445 additions and 1 deletions

View file

@ -21,6 +21,7 @@ class Bitmap;
using ByteBuffer = Detail::ByteBuffer<32>;
class CircularBuffer;
class Error;
class FlyString;
class GenericLexer;
class IPv4Address;
class JsonArray;