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

#include <constant-array-builder.h>

Collaboration diagram for v8::internal::interpreter::ConstantArrayBuilder:

Classes

struct  ConstantArraySlice
 
class  Entry
 

Public Member Functions

 ConstantArrayBuilder (Zone *zone)
 
template<typename IsolateT >
Handle< TrustedFixedArrayToFixedArray (IsolateT *isolate)
 
template<typename IsolateT >
MaybeHandle< ObjectAt (size_t index, IsolateT *isolate) const
 
size_t size () const
 
size_t Insert (Tagged< Smi > smi)
 
size_t Insert (double number)
 
size_t Insert (const AstRawString *raw_string)
 
size_t Insert (const AstConsString *cons_string)
 
size_t Insert (AstBigInt bigint)
 
size_t Insert (const Scope *scope)
 
size_t InsertDeferred ()
 
size_t InsertJumpTable (size_t size)
 
void SetDeferredAt (size_t index, Handle< Object > object)
 
void SetJumpTableSmi (size_t index, Tagged< Smi > smi)
 
OperandSize CreateReservedEntry (OperandSize minimum_operand_size=OperandSize::kNone)
 
size_t CommitReservedEntry (OperandSize operand_size, Tagged< Smi > value)
 
void DiscardReservedEntry (OperandSize operand_size)
 

Static Public Attributes

static const size_t k8BitCapacity = 1u << kBitsPerByte
 
static const size_t k16BitCapacity = (1u << 2 * kBitsPerByte) - k8BitCapacity
 
static const size_t k32BitCapacity
 

Private Types

using index_t = uint32_t
 

Private Member Functions

index_t AllocateIndex (Entry constant_entry)
 
index_t AllocateIndexArray (Entry constant_entry, size_t size)
 
index_t AllocateReservedEntry (Tagged< Smi > value)
 
ConstantArraySliceIndexToSlice (size_t index) const
 
ConstantArraySliceOperandSizeToSlice (OperandSize operand_size) const
 

Private Attributes

ConstantArraySliceidx_slice_ [3]
 
base::TemplateHashMapImpl< intptr_t, index_t, base::KeyEqualityMatcher< intptr_t >, ZoneAllocationPolicyconstants_map_
 
ZoneMap< Tagged< Smi >, index_tsmi_map_
 
ZoneVector< std::pair< Tagged< Smi >, index_t > > smi_pairs_
 
ZoneMap< double, index_theap_number_map_
 

Detailed Description

Definition at line 39 of file constant-array-builder.h.

Member Typedef Documentation

◆ index_t

Definition at line 111 of file constant-array-builder.h.

Constructor & Destructor Documentation

◆ ConstantArrayBuilder()

v8::internal::interpreter::ConstantArrayBuilder::ConstantArrayBuilder ( Zone * zone)
explicit

Definition at line 137 of file constant-array-builder.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AllocateIndex()

ConstantArrayBuilder::index_t v8::internal::interpreter::ConstantArrayBuilder::AllocateIndex ( ConstantArrayBuilder::Entry entry)
private

Definition at line 294 of file constant-array-builder.cc.

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

◆ AllocateIndexArray()

ConstantArrayBuilder::index_t v8::internal::interpreter::ConstantArrayBuilder::AllocateIndexArray ( ConstantArrayBuilder::Entry entry,
size_t size )
private

Definition at line 299 of file constant-array-builder.cc.

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

◆ AllocateReservedEntry()

ConstantArrayBuilder::index_t v8::internal::interpreter::ConstantArrayBuilder::AllocateReservedEntry ( Tagged< Smi > value)
private

Definition at line 363 of file constant-array-builder.cc.

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

◆ At()

template<typename IsolateT >
MaybeHandle< Object > v8::internal::interpreter::ConstantArrayBuilder::At ( size_t index,
IsolateT * isolate ) const

Definition at line 173 of file constant-array-builder.cc.

Here is the call graph for this function:

◆ CommitReservedEntry()

size_t v8::internal::interpreter::ConstantArrayBuilder::CommitReservedEntry ( OperandSize operand_size,
Tagged< Smi > value )

Definition at line 370 of file constant-array-builder.cc.

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

◆ CreateReservedEntry()

OperandSize v8::internal::interpreter::ConstantArrayBuilder::CreateReservedEntry ( OperandSize minimum_operand_size = OperandSize::kNone)

Definition at line 351 of file constant-array-builder.cc.

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

◆ DiscardReservedEntry()

void v8::internal::interpreter::ConstantArrayBuilder::DiscardReservedEntry ( OperandSize operand_size)

Definition at line 391 of file constant-array-builder.cc.

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

◆ IndexToSlice()

ConstantArrayBuilder::ConstantArraySlice * v8::internal::interpreter::ConstantArrayBuilder::IndexToSlice ( size_t index) const
private

Definition at line 162 of file constant-array-builder.cc.

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

◆ Insert() [1/6]

size_t v8::internal::interpreter::ConstantArrayBuilder::Insert ( AstBigInt bigint)

Definition at line 268 of file constant-array-builder.cc.

Here is the call graph for this function:

◆ Insert() [2/6]

size_t v8::internal::interpreter::ConstantArrayBuilder::Insert ( const AstConsString * cons_string)

Definition at line 259 of file constant-array-builder.cc.

Here is the call graph for this function:

◆ Insert() [3/6]

size_t v8::internal::interpreter::ConstantArrayBuilder::Insert ( const AstRawString * raw_string)

Definition at line 251 of file constant-array-builder.cc.

Here is the call graph for this function:

◆ Insert() [4/6]

size_t v8::internal::interpreter::ConstantArrayBuilder::Insert ( const Scope * scope)

Definition at line 276 of file constant-array-builder.cc.

Here is the call graph for this function:

◆ Insert() [5/6]

size_t v8::internal::interpreter::ConstantArrayBuilder::Insert ( double number)

Definition at line 240 of file constant-array-builder.cc.

Here is the call graph for this function:

◆ Insert() [6/6]

size_t v8::internal::interpreter::ConstantArrayBuilder::Insert ( Tagged< Smi > smi)
Here is the caller graph for this function:

◆ InsertDeferred()

size_t v8::internal::interpreter::ConstantArrayBuilder::InsertDeferred ( )

Definition at line 329 of file constant-array-builder.cc.

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

◆ InsertJumpTable()

size_t v8::internal::interpreter::ConstantArrayBuilder::InsertJumpTable ( size_t size)

Definition at line 333 of file constant-array-builder.cc.

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

◆ OperandSizeToSlice()

ConstantArrayBuilder::ConstantArraySlice * v8::internal::interpreter::ConstantArrayBuilder::OperandSizeToSlice ( OperandSize operand_size) const
private

Definition at line 310 of file constant-array-builder.cc.

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

◆ SetDeferredAt()

void v8::internal::interpreter::ConstantArrayBuilder::SetDeferredAt ( size_t index,
Handle< Object > object )

Definition at line 337 of file constant-array-builder.cc.

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

◆ SetJumpTableSmi()

void v8::internal::interpreter::ConstantArrayBuilder::SetJumpTableSmi ( size_t index,
Tagged< Smi > smi )

Definition at line 342 of file constant-array-builder.cc.

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

◆ size()

size_t v8::internal::interpreter::ConstantArrayBuilder::size ( ) const

Definition at line 151 of file constant-array-builder.cc.

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

◆ ToFixedArray()

template<typename IsolateT >
Handle< TrustedFixedArray > v8::internal::interpreter::ConstantArrayBuilder::ToFixedArray ( IsolateT * isolate)
Here is the caller graph for this function:

Member Data Documentation

◆ constants_map_

base::TemplateHashMapImpl<intptr_t, index_t, base::KeyEqualityMatcher<intptr_t>, ZoneAllocationPolicy> v8::internal::interpreter::ConstantArrayBuilder::constants_map_
private

Definition at line 242 of file constant-array-builder.h.

◆ heap_number_map_

ZoneMap<double, index_t> v8::internal::interpreter::ConstantArrayBuilder::heap_number_map_
private

Definition at line 245 of file constant-array-builder.h.

◆ idx_slice_

ConstantArraySlice* v8::internal::interpreter::ConstantArrayBuilder::idx_slice_[3]
private

Definition at line 238 of file constant-array-builder.h.

◆ k16BitCapacity

STATIC_CONST_MEMBER_DEFINITION const size_t v8::internal::interpreter::ConstantArrayBuilder::k16BitCapacity = (1u << 2 * kBitsPerByte) - k8BitCapacity
static

Definition at line 45 of file constant-array-builder.h.

◆ k32BitCapacity

STATIC_CONST_MEMBER_DEFINITION const size_t v8::internal::interpreter::ConstantArrayBuilder::k32BitCapacity
static
Initial value:

Definition at line 48 of file constant-array-builder.h.

◆ k8BitCapacity

STATIC_CONST_MEMBER_DEFINITION const size_t v8::internal::interpreter::ConstantArrayBuilder::k8BitCapacity = 1u << kBitsPerByte
static

Definition at line 42 of file constant-array-builder.h.

◆ smi_map_

ZoneMap<Tagged<Smi>, index_t> v8::internal::interpreter::ConstantArrayBuilder::smi_map_
private

Definition at line 243 of file constant-array-builder.h.

◆ smi_pairs_

ZoneVector<std::pair<Tagged<Smi>, index_t> > v8::internal::interpreter::ConstantArrayBuilder::smi_pairs_
private

Definition at line 244 of file constant-array-builder.h.


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