v8  3.11.10(node0.8.26)
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 549 of file utils.h.

Constructor & Destructor Documentation

Collector ( int  initial_capacity = kMinCapacity)
inlineexplicit

Definition at line 551 of file utils.h.

virtual ~Collector ( )
inlinevirtual

Definition at line 556 of file utils.h.

Member Function Documentation

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

Definition at line 578 of file utils.h.

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

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

Definition at line 597 of file utils.h.

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

Definition at line 632 of file utils.h.

Referenced by TEST().

Field Documentation

const int kMinCapacity = 16
staticprotected

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