v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::OutBuffer< Char > Class Template Reference
Collaboration diagram for v8::internal::OutBuffer< Char >:

Public Member Functions

 OutBuffer (AccountingAllocator *allocator)
 
template<typename SrcChar >
requires (sizeof(Char) >= sizeof(SrcChar))
V8_INLINE void AppendCharacter (SrcChar c)
 
template<typename SrcChar >
requires (sizeof(Char) >= sizeof(SrcChar))
void Append (const SrcChar *chars, size_t length)
 
void EnsureCapacity (size_t size)
 
size_t length () const
 
template<typename Dst >
void CopyTo (Dst *dst)
 

Private Member Functions

V8_NOINLINE V8_PRESERVE_MOST void Extend (size_t min_size)
 
V8_INLINE size_t SegmentFreeChars () const
 
V8_INLINE size_t StackBufferLength () const
 
V8_INLINE size_t CurSegmentLength () const
 
V8_INLINE size_t SegmentCapacity (size_t segment)
 
V8_INLINE size_t CurSegmentCapacity ()
 
V8_INLINE void ReduceCurrentCapacity (size_t size)
 
V8_INLINE bool ZoneUsed () const
 

Private Attributes

AccountingAllocatorallocator_
 
Char stack_buffer_ [kStackBufferSize]
 
size_t stack_buffer_size_
 
Char * cur_
 
Char * segment_end_
 
std::optional< Zonezone_
 
std::optional< ZoneList< base::Vector< Char > > > segments_
 

Static Private Attributes

static constexpr uint32_t kInitialSegmentSize = 2 * KB
 
static constexpr uint32_t kMaxSegmentSize = 32 * KB
 
static constexpr uint8_t kInitialSegmentSizeHighestBit
 
static constexpr uint8_t kMaxSegmentSizeHighestBit
 
static constexpr uint8_t kNumVariableSegments
 
static constexpr size_t kStackBufferSize = 256
 

Detailed Description

template<typename Char>
class v8::internal::OutBuffer< Char >

Definition at line 1769 of file json-stringifier.cc.

Constructor & Destructor Documentation

◆ OutBuffer()

template<typename Char >
v8::internal::OutBuffer< Char >::OutBuffer ( AccountingAllocator * allocator)
inlineexplicit

Definition at line 1771 of file json-stringifier.cc.

Member Function Documentation

◆ Append()

template<typename Char >
template<typename SrcChar >
requires (sizeof(Char) >= sizeof(SrcChar))
void v8::internal::OutBuffer< Char >::Append ( const SrcChar * chars,
size_t length )
inline

Definition at line 1784 of file json-stringifier.cc.

Here is the call graph for this function:

◆ AppendCharacter()

template<typename Char >
template<typename SrcChar >
requires (sizeof(Char) >= sizeof(SrcChar))
V8_INLINE void v8::internal::OutBuffer< Char >::AppendCharacter ( SrcChar c)
inline

Definition at line 1777 of file json-stringifier.cc.

Here is the call graph for this function:

◆ CopyTo()

template<typename Char >
template<typename Dst >
void v8::internal::OutBuffer< Char >::CopyTo ( Dst * dst)
inline

Definition at line 1812 of file json-stringifier.cc.

Here is the call graph for this function:

◆ CurSegmentCapacity()

template<typename Char >
V8_INLINE size_t v8::internal::OutBuffer< Char >::CurSegmentCapacity ( )
inlineprivate

Definition at line 1875 of file json-stringifier.cc.

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

◆ CurSegmentLength()

template<typename Char >
V8_INLINE size_t v8::internal::OutBuffer< Char >::CurSegmentLength ( ) const
inlineprivate

Definition at line 1867 of file json-stringifier.cc.

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

◆ EnsureCapacity()

template<typename Char >
void v8::internal::OutBuffer< Char >::EnsureCapacity ( size_t size)
inline

Definition at line 1790 of file json-stringifier.cc.

Here is the call graph for this function:

◆ Extend()

template<typename Char >
V8_NOINLINE V8_PRESERVE_MOST void v8::internal::OutBuffer< Char >::Extend ( size_t min_size)
inlineprivate

Definition at line 1847 of file json-stringifier.cc.

Here is the call graph for this function:

◆ length()

template<typename Char >
size_t v8::internal::OutBuffer< Char >::length ( ) const
inline

Definition at line 1798 of file json-stringifier.cc.

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

◆ ReduceCurrentCapacity()

template<typename Char >
V8_INLINE void v8::internal::OutBuffer< Char >::ReduceCurrentCapacity ( size_t size)
inlineprivate

Definition at line 1880 of file json-stringifier.cc.

Here is the caller graph for this function:

◆ SegmentCapacity()

template<typename Char >
V8_INLINE size_t v8::internal::OutBuffer< Char >::SegmentCapacity ( size_t segment)
inlineprivate

Definition at line 1871 of file json-stringifier.cc.

Here is the caller graph for this function:

◆ SegmentFreeChars()

template<typename Char >
V8_INLINE size_t v8::internal::OutBuffer< Char >::SegmentFreeChars ( ) const
inlineprivate

Definition at line 1862 of file json-stringifier.cc.

Here is the caller graph for this function:

◆ StackBufferLength()

template<typename Char >
V8_INLINE size_t v8::internal::OutBuffer< Char >::StackBufferLength ( ) const
inlineprivate

Definition at line 1863 of file json-stringifier.cc.

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

◆ ZoneUsed()

template<typename Char >
V8_INLINE bool v8::internal::OutBuffer< Char >::ZoneUsed ( ) const
inlineprivate

Definition at line 1886 of file json-stringifier.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ allocator_

template<typename Char >
AccountingAllocator* v8::internal::OutBuffer< Char >::allocator_
private

Definition at line 1888 of file json-stringifier.cc.

◆ cur_

template<typename Char >
Char* v8::internal::OutBuffer< Char >::cur_
private

Definition at line 1891 of file json-stringifier.cc.

◆ kInitialSegmentSize

template<typename Char >
uint32_t v8::internal::OutBuffer< Char >::kInitialSegmentSize = 2 * KB
staticconstexprprivate

Definition at line 1835 of file json-stringifier.cc.

◆ kInitialSegmentSizeHighestBit

template<typename Char >
uint8_t v8::internal::OutBuffer< Char >::kInitialSegmentSizeHighestBit
staticconstexprprivate
Initial value:
=
static constexpr uint32_t kInitialSegmentSize
constexpr unsigned CountLeadingZeros32(uint32_t value)
Definition bits.h:122
constexpr int kBitsPerInt
Definition globals.h:687

Definition at line 1839 of file json-stringifier.cc.

◆ kMaxSegmentSize

template<typename Char >
uint32_t v8::internal::OutBuffer< Char >::kMaxSegmentSize = 32 * KB
staticconstexprprivate

Definition at line 1836 of file json-stringifier.cc.

◆ kMaxSegmentSizeHighestBit

template<typename Char >
uint8_t v8::internal::OutBuffer< Char >::kMaxSegmentSizeHighestBit
staticconstexprprivate
Initial value:

Definition at line 1841 of file json-stringifier.cc.

◆ kNumVariableSegments

template<typename Char >
uint8_t v8::internal::OutBuffer< Char >::kNumVariableSegments
staticconstexprprivate
Initial value:

Definition at line 1843 of file json-stringifier.cc.

◆ kStackBufferSize

template<typename Char >
size_t v8::internal::OutBuffer< Char >::kStackBufferSize = 256
staticconstexprprivate

Definition at line 1845 of file json-stringifier.cc.

◆ segment_end_

template<typename Char >
Char* v8::internal::OutBuffer< Char >::segment_end_
private

Definition at line 1892 of file json-stringifier.cc.

◆ segments_

template<typename Char >
std::optional<ZoneList<base::Vector<Char> > > v8::internal::OutBuffer< Char >::segments_
private

Definition at line 1894 of file json-stringifier.cc.

◆ stack_buffer_

template<typename Char >
Char v8::internal::OutBuffer< Char >::stack_buffer_[kStackBufferSize]
private

Definition at line 1889 of file json-stringifier.cc.

◆ stack_buffer_size_

template<typename Char >
size_t v8::internal::OutBuffer< Char >::stack_buffer_size_
private

Definition at line 1890 of file json-stringifier.cc.

◆ zone_

template<typename Char >
std::optional<Zone> v8::internal::OutBuffer< Char >::zone_
private

Definition at line 1893 of file json-stringifier.cc.


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