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

#include <string-table.h>

Collaboration diagram for v8::internal::StringTable:

Classes

class  Data
 
class  OffHeapStringHashSet
 

Public Member Functions

 StringTable (Isolate *isolate)
 
 ~StringTable ()
 
int Capacity () const
 
int NumberOfElements () const
 
DirectHandle< StringLookupString (Isolate *isolate, DirectHandle< String > key)
 
template<typename StringTableKey , typename IsolateT >
DirectHandle< StringLookupKey (IsolateT *isolate, StringTableKey *key)
 
void InsertForIsolateDeserialization (Isolate *isolate, const base::Vector< DirectHandle< String > > &strings)
 
void InsertEmptyStringForBootstrapping (Isolate *isolate)
 
void Print (PtrComprCageBase cage_base) const
 
size_t GetCurrentMemoryUsage () const
 
void IterateElements (RootVisitor *visitor)
 
void DropOldData ()
 
void NotifyElementsRemoved (int count)
 
void VerifyIfOwnedBy (Isolate *isolate)
 

Static Public Member Functions

static constexpr Tagged< Smiempty_element ()
 
static constexpr Tagged< Smideleted_element ()
 
static Address TryStringToIndexOrLookupExisting (Isolate *isolate, Address raw_string)
 

Private Member Functions

DataEnsureCapacity (PtrComprCageBase cage_base, int additional_elements)
 

Private Attributes

std::atomic< Data * > data_
 
base::Mutex write_mutex_
 
Isolateisolate_
 

Detailed Description

Definition at line 48 of file string-table.h.

Constructor & Destructor Documentation

◆ StringTable()

v8::internal::StringTable::StringTable ( Isolate * isolate)
explicit

Definition at line 161 of file string-table.cc.

Here is the call graph for this function:

◆ ~StringTable()

v8::internal::StringTable::~StringTable ( )

Definition at line 168 of file string-table.cc.

Member Function Documentation

◆ Capacity()

int v8::internal::StringTable::Capacity ( ) const

Definition at line 170 of file string-table.cc.

◆ deleted_element()

static constexpr Tagged< Smi > v8::internal::StringTable::deleted_element ( )
inlinestaticconstexpr

Definition at line 51 of file string-table.h.

Here is the caller graph for this function:

◆ DropOldData()

void v8::internal::StringTable::DropOldData ( )

Definition at line 735 of file string-table.cc.

Here is the call graph for this function:

◆ empty_element()

static constexpr Tagged< Smi > v8::internal::StringTable::empty_element ( )
inlinestaticconstexpr

Definition at line 50 of file string-table.h.

Here is the caller graph for this function:

◆ EnsureCapacity()

StringTable::Data * v8::internal::StringTable::EnsureCapacity ( PtrComprCageBase cage_base,
int additional_elements )
private

Definition at line 500 of file string-table.cc.

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

◆ GetCurrentMemoryUsage()

size_t v8::internal::StringTable::GetCurrentMemoryUsage ( ) const

Definition at line 723 of file string-table.cc.

Here is the caller graph for this function:

◆ InsertEmptyStringForBootstrapping()

void v8::internal::StringTable::InsertEmptyStringForBootstrapping ( Isolate * isolate)

Definition at line 701 of file string-table.cc.

Here is the call graph for this function:

◆ InsertForIsolateDeserialization()

void v8::internal::StringTable::InsertForIsolateDeserialization ( Isolate * isolate,
const base::Vector< DirectHandle< String > > & strings )

Definition at line 676 of file string-table.cc.

Here is the call graph for this function:

◆ IterateElements()

void v8::internal::StringTable::IterateElements ( RootVisitor * visitor)

Definition at line 728 of file string-table.cc.

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

◆ LookupKey()

template<typename StringTableKey , typename IsolateT >
template DirectHandle< String > v8::internal::StringTable::LookupKey ( IsolateT * isolate,
StringTableKey * key )

Definition at line 392 of file string-table.cc.

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

◆ LookupString()

DirectHandle< String > v8::internal::StringTable::LookupString ( Isolate * isolate,
DirectHandle< String > key )

Definition at line 336 of file string-table.cc.

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

◆ NotifyElementsRemoved()

void v8::internal::StringTable::NotifyElementsRemoved ( int count)

Definition at line 743 of file string-table.cc.

Here is the call graph for this function:

◆ NumberOfElements()

int v8::internal::StringTable::NumberOfElements ( ) const

Definition at line 173 of file string-table.cc.

Here is the caller graph for this function:

◆ Print()

void v8::internal::StringTable::Print ( PtrComprCageBase cage_base) const

Definition at line 719 of file string-table.cc.

◆ TryStringToIndexOrLookupExisting()

Address v8::internal::StringTable::TryStringToIndexOrLookupExisting ( Isolate * isolate,
Address raw_string )
static

Definition at line 635 of file string-table.cc.

Here is the call graph for this function:

◆ VerifyIfOwnedBy()

void v8::internal::StringTable::VerifyIfOwnedBy ( Isolate * isolate)

Member Data Documentation

◆ data_

std::atomic<Data*> v8::internal::StringTable::data_
private

Definition at line 99 of file string-table.h.

◆ isolate_

Isolate* v8::internal::StringTable::isolate_
private

Definition at line 103 of file string-table.h.

◆ write_mutex_

base::Mutex v8::internal::StringTable::write_mutex_
mutableprivate

Definition at line 102 of file string-table.h.


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