v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::IncrementalStringBuilder Class Reference

#include <string-builder.h>

Collaboration diagram for v8::internal::IncrementalStringBuilder:

Public Member Functions

 IncrementalStringBuilder (Isolate *isolate)
 
V8_INLINE String::Encoding CurrentEncoding ()
 
template<typename SrcChar , typename DestChar >
V8_INLINE void Append (SrcChar c)
 
V8_INLINE void AppendCharacter (uint8_t c)
 
template<int N>
V8_INLINE void AppendCStringLiteral (const char(&literal)[N])
 
template<typename SrcChar >
V8_INLINE void AppendCString (const SrcChar *s)
 
V8_INLINE void AppendString (std::string_view str)
 
V8_INLINE void AppendInt (int i)
 
V8_INLINE bool CurrentPartCanFit (int length)
 
V8_INLINE int EscapedLengthIfCurrentPartFits (int length)
 
void AppendString (DirectHandle< String > string)
 
MaybeDirectHandle< StringFinish ()
 
V8_INLINE bool HasOverflowed () const
 
int Length () const
 
V8_INLINE void ChangeEncoding ()
 
Isolateisolate ()
 
template<typename SrcChar , typename DestChar >
void Append (SrcChar c)
 

Private Member Functions

V8_INLINE Factoryfactory ()
 
V8_INLINE DirectHandle< Stringaccumulator ()
 
V8_INLINE void set_accumulator (DirectHandle< String > string)
 
V8_INLINE DirectHandle< Stringcurrent_part ()
 
V8_INLINE void set_current_part (DirectHandle< String > string)
 
void Accumulate (DirectHandle< String > new_part)
 
void Extend ()
 
bool HasValidCurrentIndex () const
 
V8_INLINE void ShrinkCurrentPart ()
 
void AppendStringByCopy (DirectHandle< String > string)
 
bool CanAppendByCopy (DirectHandle< String > string)
 

Private Attributes

Isolateisolate_
 
String::Encoding encoding_
 
bool overflowed_
 
int part_length_
 
int current_index_
 
DirectHandle< Stringaccumulator_
 
DirectHandle< Stringcurrent_part_
 

Static Private Attributes

static const int kInitialPartLength = 32
 
static const int kMaxPartLength = 16 * 1024
 
static const int kPartLengthGrowthFactor = 2
 
static const int kIntToStringViewBufferSize = sizeof("-2147483648") - 1
 

Detailed Description

Definition at line 79 of file string-builder.h.

Constructor & Destructor Documentation

◆ IncrementalStringBuilder()

v8::internal::IncrementalStringBuilder::IncrementalStringBuilder ( Isolate * isolate)
explicit

Definition at line 244 of file string-builder.cc.

Here is the call graph for this function:

Member Function Documentation

◆ Accumulate()

void v8::internal::IncrementalStringBuilder::Accumulate ( DirectHandle< String > new_part)
private

Definition at line 265 of file string-builder.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ accumulator()

V8_INLINE DirectHandle< String > v8::internal::IncrementalStringBuilder::accumulator ( )
inlineprivate

Definition at line 123 of file string-builder.h.

Here is the caller graph for this function:

◆ Append() [1/2]

template<typename SrcChar , typename DestChar >
void v8::internal::IncrementalStringBuilder::Append ( SrcChar c)

Definition at line 63 of file string-builder-inl.h.

Here is the call graph for this function:

◆ Append() [2/2]

template<typename SrcChar , typename DestChar >
V8_INLINE void v8::internal::IncrementalStringBuilder::Append ( SrcChar c)
Here is the caller graph for this function:

◆ AppendCharacter()

V8_INLINE void v8::internal::IncrementalStringBuilder::AppendCharacter ( uint8_t c)

Definition at line 78 of file string-builder-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AppendCString()

template<typename SrcChar >
V8_INLINE void v8::internal::IncrementalStringBuilder::AppendCString ( const SrcChar * s)

Definition at line 106 of file string-builder-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AppendCStringLiteral()

template<int N>
V8_INLINE void v8::internal::IncrementalStringBuilder::AppendCStringLiteral ( const char(&) literal[N])

Definition at line 87 of file string-builder-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AppendInt()

V8_INLINE void v8::internal::IncrementalStringBuilder::AppendInt ( int i)

Definition at line 131 of file string-builder-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AppendString() [1/2]

void v8::internal::IncrementalStringBuilder::AppendString ( DirectHandle< String > string)

Definition at line 347 of file string-builder.cc.

Here is the call graph for this function:

◆ AppendString() [2/2]

V8_INLINE void v8::internal::IncrementalStringBuilder::AppendString ( std::string_view str)

Definition at line 114 of file string-builder-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AppendStringByCopy()

void v8::internal::IncrementalStringBuilder::AppendStringByCopy ( DirectHandle< String > string)
private

Definition at line 323 of file string-builder.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CanAppendByCopy()

bool v8::internal::IncrementalStringBuilder::CanAppendByCopy ( DirectHandle< String > string)
private

Definition at line 315 of file string-builder.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ChangeEncoding()

void v8::internal::IncrementalStringBuilder::ChangeEncoding ( )

Definition at line 151 of file string-builder-inl.h.

Here is the call graph for this function:

◆ current_part()

V8_INLINE DirectHandle< String > v8::internal::IncrementalStringBuilder::current_part ( )
inlineprivate

Definition at line 129 of file string-builder.h.

Here is the caller graph for this function:

◆ CurrentEncoding()

V8_INLINE String::Encoding v8::internal::IncrementalStringBuilder::CurrentEncoding ( )
inline

Definition at line 83 of file string-builder.h.

◆ CurrentPartCanFit()

V8_INLINE bool v8::internal::IncrementalStringBuilder::CurrentPartCanFit ( int length)
inline

Definition at line 99 of file string-builder.h.

Here is the caller graph for this function:

◆ EscapedLengthIfCurrentPartFits()

V8_INLINE int v8::internal::IncrementalStringBuilder::EscapedLengthIfCurrentPartFits ( int length)

Definition at line 137 of file string-builder-inl.h.

Here is the call graph for this function:

◆ Extend()

void v8::internal::IncrementalStringBuilder::Extend ( )
private

Definition at line 281 of file string-builder.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory()

V8_INLINE Factory * v8::internal::IncrementalStringBuilder::factory ( )
private

Definition at line 158 of file string-builder-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Finish()

MaybeDirectHandle< String > v8::internal::IncrementalStringBuilder::Finish ( )

Definition at line 298 of file string-builder.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasOverflowed()

V8_INLINE bool v8::internal::IncrementalStringBuilder::HasOverflowed ( ) const
inline

Definition at line 111 of file string-builder.h.

◆ HasValidCurrentIndex()

bool v8::internal::IncrementalStringBuilder::HasValidCurrentIndex ( ) const
private

Definition at line 261 of file string-builder.cc.

Here is the caller graph for this function:

◆ isolate()

Isolate * v8::internal::IncrementalStringBuilder::isolate ( )
inline

Definition at line 118 of file string-builder.h.

Here is the caller graph for this function:

◆ Length()

int v8::internal::IncrementalStringBuilder::Length ( ) const

Definition at line 257 of file string-builder.cc.

◆ set_accumulator()

V8_INLINE void v8::internal::IncrementalStringBuilder::set_accumulator ( DirectHandle< String > string)
inlineprivate

Definition at line 125 of file string-builder.h.

Here is the caller graph for this function:

◆ set_current_part()

V8_INLINE void v8::internal::IncrementalStringBuilder::set_current_part ( DirectHandle< String > string)
inlineprivate

Definition at line 131 of file string-builder.h.

Here is the caller graph for this function:

◆ ShrinkCurrentPart()

V8_INLINE void v8::internal::IncrementalStringBuilder::ShrinkCurrentPart ( )
private

Definition at line 162 of file string-builder-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ accumulator_

DirectHandle<String> v8::internal::IncrementalStringBuilder::accumulator_
private

Definition at line 160 of file string-builder.h.

◆ current_index_

int v8::internal::IncrementalStringBuilder::current_index_
private

Definition at line 159 of file string-builder.h.

◆ current_part_

DirectHandle<String> v8::internal::IncrementalStringBuilder::current_part_
private

Definition at line 161 of file string-builder.h.

◆ encoding_

String::Encoding v8::internal::IncrementalStringBuilder::encoding_
private

Definition at line 156 of file string-builder.h.

◆ isolate_

Isolate* v8::internal::IncrementalStringBuilder::isolate_
private

Definition at line 155 of file string-builder.h.

◆ kInitialPartLength

const int v8::internal::IncrementalStringBuilder::kInitialPartLength = 32
staticprivate

Definition at line 149 of file string-builder.h.

◆ kIntToStringViewBufferSize

const int v8::internal::IncrementalStringBuilder::kIntToStringViewBufferSize = sizeof("-2147483648") - 1
staticprivate

Definition at line 153 of file string-builder.h.

◆ kMaxPartLength

const int v8::internal::IncrementalStringBuilder::kMaxPartLength = 16 * 1024
staticprivate

Definition at line 150 of file string-builder.h.

◆ kPartLengthGrowthFactor

const int v8::internal::IncrementalStringBuilder::kPartLengthGrowthFactor = 2
staticprivate

Definition at line 151 of file string-builder.h.

◆ overflowed_

bool v8::internal::IncrementalStringBuilder::overflowed_
private

Definition at line 157 of file string-builder.h.

◆ part_length_

int v8::internal::IncrementalStringBuilder::part_length_
private

Definition at line 158 of file string-builder.h.


The documentation for this class was generated from the following files: