v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Collector< T, growth_factor, max_growth > Class Template Reference

#include <utils.h>

Inheritance diagram for Collector< T, growth_factor, max_growth >:
Collaboration diagram for Collector< T, growth_factor, max_growth >:

Public Member Functions

 Collector (int initial_capacity=kMinCapacity)
 
virtual ~Collector ()
 
void Add (T value)
 
Vector< TAddBlock (int size, T initial_value)
 
Vector< TAddBlock (Vector< const T > source)
 
void WriteTo (Vector< T > destination)
 
Vector< TToVector ()
 
virtual void Reset ()
 
int size ()
 

Protected Member Functions

void Grow (int min_capacity)
 
virtual void NewChunk (int new_capacity)
 

Protected Attributes

List< Vector< T > > chunks_
 
Vector< Tcurrent_chunk_
 
int index_
 
int size_
 

Static Protected Attributes

static const int kMinCapacity = 16
 

Detailed Description

template<typename T, int growth_factor = 2, int max_growth = 1 * MB>
class v8::internal::Collector< T, growth_factor, max_growth >

Definition at line 606 of file utils.h.

Constructor & Destructor Documentation

Collector ( int  initial_capacity = kMinCapacity)
inlineexplicit

Definition at line 608 of file utils.h.

virtual ~Collector ( )
inlinevirtual

Definition at line 613 of file utils.h.

Member Function Documentation

void Add ( T  value)
inline
Vector<T> AddBlock ( int  size,
T  initial_value 
)
inline

Definition at line 635 of file utils.h.

Referenced by CompleteParserRecorder::ExtractData(), and TEST().

Vector<T> AddBlock ( Vector< const T source)
inline

Definition at line 654 of file utils.h.

void Grow ( int  min_capacity)
inlineprotected
virtual void NewChunk ( int  new_capacity)
inlineprotectedvirtual
Vector<T> ToVector ( )
inline

Definition at line 689 of file utils.h.

Referenced by TEST().

void WriteTo ( Vector< T destination)
inline

Field Documentation

const int kMinCapacity = 16
staticprotected

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