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

#include <literal-buffer.h>

Collaboration diagram for v8::internal::LiteralBuffer:

Public Member Functions

 LiteralBuffer ()=default
 
 ~LiteralBuffer ()
 
 LiteralBuffer (const LiteralBuffer &)=delete
 
LiteralBufferoperator= (const LiteralBuffer &)=delete
 
V8_INLINE void AddChar (char code_unit)
 
V8_INLINE void AddChar (base::uc32 code_unit)
 
bool is_one_byte () const
 
bool Equals (base::Vector< const char > keyword) const
 
base::Vector< const uint16_t > two_byte_literal () const
 
base::Vector< const uint8_t > one_byte_literal () const
 
template<typename Char >
base::Vector< const Char > literal () const
 
int length () const
 
void Start ()
 
template<typename IsolateT >
DirectHandle< StringInternalize (IsolateT *isolate) const
 

Private Member Functions

bool IsValidAscii (char code_unit)
 
V8_INLINE void AddOneByteChar (uint8_t one_byte_char)
 
void AddTwoByteChar (base::uc32 code_unit)
 
int NewCapacity (int min_capacity)
 
V8_NOINLINE V8_PRESERVE_MOST void ExpandBuffer ()
 
void ConvertToTwoByte ()
 

Private Attributes

base::Vector< uint8_t > backing_store_
 
int position_ = 0
 
bool is_one_byte_ = true
 

Static Private Attributes

static constexpr int kInitialCapacity = 256
 
static constexpr int kGrowthFactor = 4
 
static constexpr int kMaxGrowth = 1 * MB
 

Detailed Description

Definition at line 17 of file literal-buffer.h.

Constructor & Destructor Documentation

◆ LiteralBuffer() [1/2]

v8::internal::LiteralBuffer::LiteralBuffer ( )
default

◆ ~LiteralBuffer()

v8::internal::LiteralBuffer::~LiteralBuffer ( )
inline

Definition at line 20 of file literal-buffer.h.

Here is the call graph for this function:

◆ LiteralBuffer() [2/2]

v8::internal::LiteralBuffer::LiteralBuffer ( const LiteralBuffer & )
delete

Member Function Documentation

◆ AddChar() [1/2]

V8_INLINE void v8::internal::LiteralBuffer::AddChar ( base::uc32 code_unit)
inline

Definition at line 30 of file literal-buffer.h.

Here is the call graph for this function:

◆ AddChar() [2/2]

V8_INLINE void v8::internal::LiteralBuffer::AddChar ( char code_unit)
inline

Definition at line 25 of file literal-buffer.h.

Here is the call graph for this function:

◆ AddOneByteChar()

V8_INLINE void v8::internal::LiteralBuffer::AddOneByteChar ( uint8_t one_byte_char)
inlineprivate

Definition at line 88 of file literal-buffer.h.

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

◆ AddTwoByteChar()

void v8::internal::LiteralBuffer::AddTwoByteChar ( base::uc32 code_unit)
private

Definition at line 70 of file literal-buffer.cc.

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

◆ ConvertToTwoByte()

void v8::internal::LiteralBuffer::ConvertToTwoByte ( )
private

Definition at line 46 of file literal-buffer.cc.

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

◆ Equals()

bool v8::internal::LiteralBuffer::Equals ( base::Vector< const char > keyword) const
inline

Definition at line 43 of file literal-buffer.h.

Here is the call graph for this function:

◆ ExpandBuffer()

void v8::internal::LiteralBuffer::ExpandBuffer ( )
private

Definition at line 35 of file literal-buffer.cc.

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

◆ Internalize()

template<typename IsolateT >
template DirectHandle< String > v8::internal::LiteralBuffer::Internalize ( IsolateT * isolate) const

Definition at line 17 of file literal-buffer.cc.

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

◆ is_one_byte()

bool v8::internal::LiteralBuffer::is_one_byte ( ) const
inline

Definition at line 41 of file literal-buffer.h.

Here is the caller graph for this function:

◆ IsValidAscii()

bool v8::internal::LiteralBuffer::IsValidAscii ( char code_unit)
inlineprivate

Definition at line 80 of file literal-buffer.h.

Here is the caller graph for this function:

◆ length()

int v8::internal::LiteralBuffer::length ( ) const
inline

Definition at line 65 of file literal-buffer.h.

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

◆ literal()

template<typename Char >
base::Vector< const Char > v8::internal::LiteralBuffer::literal ( ) const
inline

Definition at line 57 of file literal-buffer.h.

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

◆ NewCapacity()

int v8::internal::LiteralBuffer::NewCapacity ( int min_capacity)
private

Definition at line 29 of file literal-buffer.cc.

Here is the caller graph for this function:

◆ one_byte_literal()

base::Vector< const uint8_t > v8::internal::LiteralBuffer::one_byte_literal ( ) const
inline

Definition at line 52 of file literal-buffer.h.

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

◆ operator=()

LiteralBuffer & v8::internal::LiteralBuffer::operator= ( const LiteralBuffer & )
delete

◆ Start()

void v8::internal::LiteralBuffer::Start ( )
inline

Definition at line 67 of file literal-buffer.h.

Here is the caller graph for this function:

◆ two_byte_literal()

base::Vector< const uint16_t > v8::internal::LiteralBuffer::two_byte_literal ( ) const
inline

Definition at line 48 of file literal-buffer.h.

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

Member Data Documentation

◆ backing_store_

base::Vector<uint8_t> v8::internal::LiteralBuffer::backing_store_
private

Definition at line 100 of file literal-buffer.h.

◆ is_one_byte_

bool v8::internal::LiteralBuffer::is_one_byte_ = true
private

Definition at line 102 of file literal-buffer.h.

◆ kGrowthFactor

int v8::internal::LiteralBuffer::kGrowthFactor = 4
staticconstexprprivate

Definition at line 77 of file literal-buffer.h.

◆ kInitialCapacity

int v8::internal::LiteralBuffer::kInitialCapacity = 256
staticconstexprprivate

Definition at line 76 of file literal-buffer.h.

◆ kMaxGrowth

int v8::internal::LiteralBuffer::kMaxGrowth = 1 * MB
staticconstexprprivate

Definition at line 78 of file literal-buffer.h.

◆ position_

int v8::internal::LiteralBuffer::position_ = 0
private

Definition at line 101 of file literal-buffer.h.


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