Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QV4::Heap::StringOrSymbol Struct Reference

#include <qv4string_p.h>

+ Inheritance diagram for QV4::Heap::StringOrSymbol:
+ Collaboration diagram for QV4::Heap::StringOrSymbol:

Public Types

enum  StringType {
  StringType_Symbol , StringType_Regular , StringType_ArrayIndex , StringType_Unknown ,
  StringType_AddedString , StringType_SubString , StringType_Complex = StringType_AddedString
}
 

Public Member Functions

void init ()
 
void init (QStringPrivate text)
 
void destroy ()
 
QStringPrivatetext () const
 
QString toQString () const
 
void createHashValue () const
 
unsigned hashValue () const
 
- Public Member Functions inherited from QV4::Heap::Base
voidoperator new (size_t)=delete
 
ReturnedValue asReturnedValue () const
 
void mark (QV4::MarkStack *markStack)
 
bool isMarked () const
 
void setMarkBit ()
 
bool inUse () const
 
voidoperator new (size_t, Managed *m)
 
voidoperator new (size_t, Base *m)
 
void operator delete (void *, Base *)
 
void init ()
 
void destroy ()
 
Q_ALWAYS_INLINE void _checkIsInitialized ()
 
Q_ALWAYS_INLINE void _checkIsDestroyed ()
 
Q_ALWAYS_INLINE void _setInitialized ()
 
Q_ALWAYS_INLINE void _setDestroyed ()
 

Static Public Member Functions

static void markObjects (Heap::Base *that, MarkStack *markStack)
 
- Static Public Member Functions inherited from QV4::Heap::Base
static void markObjects (Base *, MarkStack *)
 

Public Attributes

struct { 
 
   unsigned char   data [sizeof(QStringPrivate)] 
 
textStorage 
 
PropertyKey identifier
 
uint subtype
 
uint stringHash
 
- Public Attributes inherited from QV4::Heap::Base
Pointer< InternalClass *, 0 > internalClass
 

Detailed Description

Definition at line 32 of file qv4string_p.h.

Member Enumeration Documentation

◆ StringType

Enumerator
StringType_Symbol 
StringType_Regular 
StringType_ArrayIndex 
StringType_Unknown 
StringType_AddedString 
StringType_SubString 
StringType_Complex 

Definition at line 34 of file qv4string_p.h.

Member Function Documentation

◆ createHashValue()

void Heap::StringOrSymbol::createHashValue ( ) const

Definition at line 211 of file qv4string.cpp.

References QV4::String::calculateHashValue(), ch, QString::data(), Q_ASSERT, QString::size(), and text.

+ Here is the call graph for this function:

◆ destroy()

void Heap::StringOrSymbol::destroy ( )

Definition at line 96 of file qv4string.cpp.

References QV4::Heap::Base::destroy(), StringType_AddedString, and text.

+ Here is the call graph for this function:

◆ hashValue()

unsigned QV4::Heap::StringOrSymbol::hashValue ( ) const
inline

Definition at line 70 of file qv4string_p.h.

References Q_ASSERT.

Referenced by QV4::IdentifierTable::sweep().

+ Here is the caller graph for this function:

◆ init() [1/2]

void QV4::Heap::StringOrSymbol::init ( )
inline

Definition at line 44 of file qv4string_p.h.

Referenced by QV4::Heap::Symbol::init(), QV4::Heap::String::init(), QV4::Heap::ComplexString::init(), and QV4::Heap::ComplexString::init().

+ Here is the caller graph for this function:

◆ init() [2/2]

void QV4::Heap::StringOrSymbol::init ( QStringPrivate text)
inline

Definition at line 49 of file qv4string_p.h.

References text.

◆ markObjects()

void Heap::StringOrSymbol::markObjects ( Heap::Base * that,
MarkStack * markStack )
static

Definition at line 14 of file qv4string.cpp.

References QV4::PropertyKey::asStringOrSymbol(), identifier, and QV4::Managed::mark().

Referenced by QV4::Heap::String::markObjects(), and QV4::IdentifierTable::markObjects().

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

◆ text()

QStringPrivate & QV4::Heap::StringOrSymbol::text ( ) const
inline

Definition at line 63 of file qv4string_p.h.

Referenced by QV4::Heap::String::length().

+ Here is the caller graph for this function:

◆ toQString()

QString QV4::Heap::StringOrSymbol::toQString ( ) const
inline

Definition at line 65 of file qv4string_p.h.

References text.

Referenced by QV4::Symbol::descriptiveString().

+ Here is the caller graph for this function:

Member Data Documentation

◆ data

unsigned char QV4::Heap::StringOrSymbol::data[sizeof(QStringPrivate)]

Definition at line 55 of file qv4string_p.h.

◆ identifier

◆ stringHash

uint QV4::Heap::StringOrSymbol::stringHash
mutable

Definition at line 58 of file qv4string_p.h.

Referenced by QV4::IdentifierTable::addEntry().

◆ subtype

◆ [struct]

struct { ... } QV4::Heap::StringOrSymbol::textStorage

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