Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QV4::IdentifierTable Struct Reference

#include <qv4identifiertable_p.h>

+ Collaboration diagram for QV4::IdentifierTable:

Public Member Functions

void addEntry (Heap::StringOrSymbol *str)
 
 IdentifierTable (ExecutionEngine *engine, int numBits=8)
 
 ~IdentifierTable ()
 
Heap::StringinsertString (const QString &s)
 
Heap::SymbolinsertSymbol (const QString &s)
 
PropertyKey asPropertyKey (const Heap::String *str)
 
PropertyKey asPropertyKey (const QV4::String *str)
 
PropertyKey asPropertyKey (const QString &s)
 
PropertyKey asPropertyKey (const char *s, int len)
 
PropertyKey asPropertyKeyImpl (const Heap::String *str)
 
Heap::StringOrSymbolresolveId (PropertyKey i) const
 
Heap::StringstringForId (PropertyKey i) const
 
Heap::SymbolsymbolForId (PropertyKey i) const
 
void markObjects (MarkStack *markStack)
 
void sweep ()
 
void addIdentifierHash (IdentifierHashData *h)
 
void removeIdentifierHash (IdentifierHashData *h)
 

Public Attributes

ExecutionEngineengine
 
uint alloc
 
uint size
 
int numBits
 
Heap::StringOrSymbol ** entriesByHash
 
Heap::StringOrSymbol ** entriesById
 
QSet< IdentifierHashData * > idHashes
 

Detailed Description

Definition at line 27 of file qv4identifiertable_p.h.

Constructor & Destructor Documentation

◆ IdentifierTable()

QV4::IdentifierTable::IdentifierTable ( ExecutionEngine engine,
int  numBits = 8 
)

Definition at line 12 of file qv4identifiertable.cpp.

References alloc, entriesByHash, entriesById, numBits, and qPrimeForNumBits().

+ Here is the call graph for this function:

◆ ~IdentifierTable()

QV4::IdentifierTable::~IdentifierTable ( )

Definition at line 24 of file qv4identifiertable.cpp.

References entriesByHash, entriesById, and idHashes.

Member Function Documentation

◆ addEntry()

void QV4::IdentifierTable::addEntry ( Heap::StringOrSymbol str)

Definition at line 32 of file qv4identifiertable.cpp.

References alloc, e, entriesByHash, entriesById, QV4::PropertyKey::fromStringOrSymbol(), grow(), hash, i, numBits, qPrimeForNumBits(), size, str, and QV4::Heap::StringOrSymbol::StringType_ArrayIndex.

Referenced by asPropertyKeyImpl(), and insertSymbol().

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

◆ addIdentifierHash()

void QV4::IdentifierTable::addIdentifierHash ( IdentifierHashData h)
inline

Definition at line 70 of file qv4identifiertable_p.h.

References QSet< T >::insert().

Referenced by QV4::IdentifierHashData::IdentifierHashData(), and QV4::IdentifierHashData::IdentifierHashData().

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

◆ asPropertyKey() [1/4]

PropertyKey QV4::IdentifierTable::asPropertyKey ( const char *  s,
int  len 
)

Definition at line 261 of file qv4identifiertable.cpp.

References QV4::String::createHashValue(), QV4::PropertyKey::fromArrayIndex(), QString::fromLatin1(), hash, QV4::Heap::StringOrSymbol::identifier, and QV4::Heap::StringOrSymbol::StringType_ArrayIndex.

+ Here is the call graph for this function:

◆ asPropertyKey() [2/4]

◆ asPropertyKey() [3/4]

PropertyKey QV4::IdentifierTable::asPropertyKey ( const QString s)

Definition at line 252 of file qv4identifiertable.cpp.

References QV4::String::createHashValue(), QV4::PropertyKey::fromArrayIndex(), hash, QV4::Heap::StringOrSymbol::identifier, and QV4::Heap::StringOrSymbol::StringType_ArrayIndex.

+ Here is the call graph for this function:

◆ asPropertyKey() [4/4]

PropertyKey QV4::IdentifierTable::asPropertyKey ( const QV4::String str)
inline

Definition at line 54 of file qv4identifiertable_p.h.

References str.

◆ asPropertyKeyImpl()

PropertyKey QV4::IdentifierTable::asPropertyKeyImpl ( const Heap::String str)

Definition at line 154 of file qv4identifiertable.cpp.

References addEntry(), alloc, e, entriesByHash, QV4::PropertyKey::fromArrayIndex(), hash, str, and QV4::Heap::StringOrSymbol::StringType_ArrayIndex.

+ Here is the call graph for this function:

◆ insertString()

Heap::String * QV4::IdentifierTable::insertString ( const QString s)

Definition at line 100 of file qv4identifiertable.cpp.

References QV4::String::createHashValue(), engine, QV4::PropertyKey::fromArrayIndex(), hash, QV4::ExecutionEngine::newString(), str, and QV4::Heap::StringOrSymbol::StringType_ArrayIndex.

+ Here is the call graph for this function:

◆ insertSymbol()

Heap::Symbol * QV4::IdentifierTable::insertSymbol ( const QString s)

Definition at line 131 of file qv4identifiertable.cpp.

References addEntry(), alloc, QV4::Symbol::create(), QV4::String::createHashValue(), e, engine, entriesByHash, hash, Q_ASSERT, and str.

+ Here is the call graph for this function:

◆ markObjects()

void QV4::IdentifierTable::markObjects ( MarkStack markStack)

Definition at line 209 of file qv4identifiertable.cpp.

References idHashes.

Referenced by QV4::ExecutionEngine::markObjects().

+ Here is the caller graph for this function:

◆ removeIdentifierHash()

void QV4::IdentifierTable::removeIdentifierHash ( IdentifierHashData h)
inline

Definition at line 73 of file qv4identifiertable_p.h.

References QSet< T >::remove().

Referenced by QV4::IdentifierHashData::~IdentifierHashData().

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

◆ resolveId()

Heap::StringOrSymbol * QV4::IdentifierTable::resolveId ( PropertyKey  i) const

Definition at line 178 of file qv4identifiertable.cpp.

References alloc, e, engine, entriesById, i, QV4::ExecutionEngine::newString(), and QString::number().

Referenced by stringForId(), and symbolForId().

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

◆ stringForId()

Heap::String * QV4::IdentifierTable::stringForId ( PropertyKey  i) const

Definition at line 195 of file qv4identifiertable.cpp.

References i, Q_ASSERT, and resolveId().

+ Here is the call graph for this function:

◆ sweep()

void QV4::IdentifierTable::sweep ( )

Definition at line 215 of file qv4identifiertable.cpp.

References alloc, e, entriesByHash, entriesById, and i.

◆ symbolForId()

Heap::Symbol * QV4::IdentifierTable::symbolForId ( PropertyKey  i) const

Definition at line 202 of file qv4identifiertable.cpp.

References i, Q_ASSERT, and resolveId().

+ Here is the call graph for this function:

Member Data Documentation

◆ alloc

uint QV4::IdentifierTable::alloc

◆ engine

ExecutionEngine* QV4::IdentifierTable::engine

Definition at line 29 of file qv4identifiertable_p.h.

Referenced by insertString(), insertSymbol(), and resolveId().

◆ entriesByHash

Heap::StringOrSymbol** QV4::IdentifierTable::entriesByHash

◆ entriesById

Heap::StringOrSymbol** QV4::IdentifierTable::entriesById

Definition at line 35 of file qv4identifiertable_p.h.

Referenced by IdentifierTable(), ~IdentifierTable(), addEntry(), resolveId(), and sweep().

◆ idHashes

QSet<IdentifierHashData *> QV4::IdentifierTable::idHashes

Definition at line 37 of file qv4identifiertable_p.h.

Referenced by ~IdentifierTable(), and markObjects().

◆ numBits

int QV4::IdentifierTable::numBits

Definition at line 33 of file qv4identifiertable_p.h.

Referenced by IdentifierTable(), and addEntry().

◆ size

uint QV4::IdentifierTable::size

Definition at line 32 of file qv4identifiertable_p.h.

Referenced by addEntry().


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