5#ifndef V8_STRINGS_STRING_BUILDER_H_
6#define V8_STRINGS_STRING_BUILDER_H_
47 int estimated_part_count);
85 template <
typename SrcChar,
typename DestChar>
93 template <
typename SrcChar>
void Add(Tagged< Object > value)
void EnsureCapacity(Isolate *isolate, int elements)
FixedArrayBuilder(Isolate *isolate, int initial_capacity)
DirectHandle< FixedArray > array()
DirectHandle< FixedArray > array_
static FixedArrayBuilder Lazy(Isolate *isolate)
bool HasCapacity(int elements)
bool has_non_smi_elements_
bool HasValidCurrentIndex() const
V8_INLINE void ChangeEncoding()
void Accumulate(DirectHandle< String > new_part)
String::Encoding encoding_
V8_INLINE void Append(SrcChar c)
DirectHandle< String > current_part_
bool CanAppendByCopy(DirectHandle< String > string)
V8_INLINE DirectHandle< String > accumulator()
DirectHandle< String > accumulator_
V8_INLINE void AppendInt(int i)
V8_INLINE Factory * factory()
static const int kIntToStringViewBufferSize
static const int kMaxPartLength
V8_INLINE DirectHandle< String > current_part()
static const int kPartLengthGrowthFactor
V8_INLINE int EscapedLengthIfCurrentPartFits(int length)
V8_INLINE void set_current_part(DirectHandle< String > string)
V8_INLINE void AppendCString(const SrcChar *s)
V8_INLINE bool HasOverflowed() const
static const int kInitialPartLength
void AppendStringByCopy(DirectHandle< String > string)
MaybeDirectHandle< String > Finish()
V8_INLINE void ShrinkCurrentPart()
V8_INLINE void AppendCharacter(uint8_t c)
V8_INLINE void AppendString(std::string_view str)
IncrementalStringBuilder(Isolate *isolate)
V8_INLINE void set_accumulator(DirectHandle< String > string)
V8_INLINE String::Encoding CurrentEncoding()
V8_INLINE void AppendCStringLiteral(const char(&literal)[N])
V8_INLINE bool CurrentPartCanFit(int length)
ReplacementStringBuilder(Heap *heap, DirectHandle< String > subject, int estimated_part_count)
static void AddSubjectSlice(FixedArrayBuilder *builder, int from, int to)
void EnsureCapacity(int elements)
MaybeDirectHandle< String > ToString()
uint32_t character_count_
void AddString(DirectHandle< String > string)
void AddElement(DirectHandle< Object > element)
FixedArrayBuilder array_builder_
DirectHandle< String > subject_
void IncrementCharacterCount(uint32_t by)
static const uint32_t kMaxLength
FunctionLiteral * literal