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

#include <string.h>

Collaboration diagram for v8::internal::String::FlatContent:

Public Member Functions

 ~FlatContent ()
 
bool IsFlat () const
 
bool IsOneByte () const
 
bool IsTwoByte () const
 
base::Vector< const uint8_t > ToOneByteVector () const
 
base::Vector< const base::uc16ToUC16Vector () const
 
base::uc16 Get (uint32_t i) const
 
bool UsesSameString (const FlatContent &other) const
 
void UnsafeDisableChecksumVerification ()
 
uint32_t length () const
 

Private Types

enum  State { NON_FLAT , ONE_BYTE , TWO_BYTE }
 

Private Member Functions

 FlatContent (const uint8_t *start, uint32_t length, const DisallowGarbageCollection &no_gc)
 
 FlatContent (const base::uc16 *start, uint32_t length, const DisallowGarbageCollection &no_gc)
 
 FlatContent (const DisallowGarbageCollection &no_gc)
 

Private Attributes

union { 
 
   const uint8_t *   onebyte_start 
 
   const base::uc16 *   twobyte_start 
 
};  
 
uint32_t length_
 
State state_
 
const DisallowGarbageCollectionno_gc_
 

Static Private Attributes

static constexpr uint32_t kChecksumVerificationDisabled = 0
 

Friends

class String
 
class IterableSubString
 

Detailed Description

Definition at line 126 of file string.h.

Member Enumeration Documentation

◆ State

Enumerator
NON_FLAT 
ONE_BYTE 
TWO_BYTE 

Definition at line 175 of file string.h.

Constructor & Destructor Documentation

◆ ~FlatContent()

v8::internal::String::FlatContent::~FlatContent ( )
inline

Definition at line 906 of file string-inl.h.

◆ FlatContent() [1/3]

v8::internal::String::FlatContent::FlatContent ( const uint8_t * start,
uint32_t length,
const DisallowGarbageCollection & no_gc )
inlineprivate

Definition at line 890 of file string-inl.h.

◆ FlatContent() [2/3]

v8::internal::String::FlatContent::FlatContent ( const base::uc16 * start,
uint32_t length,
const DisallowGarbageCollection & no_gc )
inlineprivate

Definition at line 898 of file string-inl.h.

◆ FlatContent() [3/3]

v8::internal::String::FlatContent::FlatContent ( const DisallowGarbageCollection & no_gc)
inlineexplicitprivate

Definition at line 182 of file string.h.

Member Function Documentation

◆ Get()

base::uc16 v8::internal::String::FlatContent::Get ( uint32_t i) const
inline

Definition at line 150 of file string.h.

Here is the caller graph for this function:

◆ IsFlat()

bool v8::internal::String::FlatContent::IsFlat ( ) const
inline

Definition at line 131 of file string.h.

Here is the caller graph for this function:

◆ IsOneByte()

bool v8::internal::String::FlatContent::IsOneByte ( ) const
inline

Definition at line 133 of file string.h.

Here is the caller graph for this function:

◆ IsTwoByte()

bool v8::internal::String::FlatContent::IsTwoByte ( ) const
inline

Definition at line 135 of file string.h.

Here is the caller graph for this function:

◆ length()

uint32_t v8::internal::String::FlatContent::length ( ) const
inline

Definition at line 172 of file string.h.

Here is the caller graph for this function:

◆ ToOneByteVector()

base::Vector< const uint8_t > v8::internal::String::FlatContent::ToOneByteVector ( ) const
inline

Definition at line 139 of file string.h.

Here is the caller graph for this function:

◆ ToUC16Vector()

base::Vector< const base::uc16 > v8::internal::String::FlatContent::ToUC16Vector ( ) const
inline

Definition at line 145 of file string.h.

Here is the caller graph for this function:

◆ UnsafeDisableChecksumVerification()

void v8::internal::String::FlatContent::UnsafeDisableChecksumVerification ( )
inline

Definition at line 166 of file string.h.

Here is the caller graph for this function:

◆ UsesSameString()

bool v8::internal::String::FlatContent::UsesSameString ( const FlatContent & other) const
inline

Definition at line 157 of file string.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ IterableSubString

friend class IterableSubString
friend

Definition at line 202 of file string.h.

◆ String

friend class String
friend

Definition at line 201 of file string.h.

Member Data Documentation

◆ [union]

◆ kChecksumVerificationDisabled

uint32_t v8::internal::String::FlatContent::kChecksumVerificationDisabled = 0
staticconstexprprivate

Definition at line 193 of file string.h.

◆ length_

uint32_t v8::internal::String::FlatContent::length_
private

Definition at line 189 of file string.h.

◆ no_gc_

const DisallowGarbageCollection& v8::internal::String::FlatContent::no_gc_
private

Definition at line 191 of file string.h.

◆ onebyte_start

const uint8_t* v8::internal::String::FlatContent::onebyte_start

Definition at line 186 of file string.h.

◆ state_

State v8::internal::String::FlatContent::state_
private

Definition at line 190 of file string.h.

◆ twobyte_start

const base::uc16* v8::internal::String::FlatContent::twobyte_start

Definition at line 187 of file string.h.


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