Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QV4::Heap::InternalClass Struct Reference

#include <qv4internalclass_p.h>

Inheritance diagram for QV4::Heap::InternalClass:
Collaboration diagram for QV4::Heap::InternalClass:

Classes

struct  IndexAndAttribute

Public Types

enum  Flag {
  NotExtensible = 1 << 0 , Sealed = 1 << 1 , Frozen = 1 << 2 , UsedAsProto = 1 << 3 ,
  Locked = 1 << 4
}
enum  { MaxRedundantTransitions = 255 }
typedef InternalClassTransition Transition

Public Member Functions

InternalClassTransitionlookupOrInsertTransition (const InternalClassTransition &t)
bool isExtensible () const
bool isSealed () const
bool isFrozen () const
bool isUsedAsProto () const
bool isLocked () const
void init (ExecutionEngine *engine)
void init (InternalClass *other)
void destroy ()
Q_QML_EXPORT ReturnedValue keyAt (uint index) const
Q_REQUIRED_RESULT InternalClassnonExtensible ()
Q_REQUIRED_RESULT InternalClasslocked ()
Q_REQUIRED_RESULT InternalClassaddMember (PropertyKey identifier, PropertyAttributes data, InternalClassEntry *entry=nullptr)
Q_REQUIRED_RESULT InternalClasschangeMember (PropertyKey identifier, PropertyAttributes data, InternalClassEntry *entry=nullptr)
PropertyHash::EntryfindEntry (const PropertyKey id)
InternalClassEntry find (const PropertyKey id)
IndexAndAttribute findValueOrGetter (const PropertyKey id)
IndexAndAttribute findValueOrSetter (const PropertyKey id)
uint indexOfValueOrGetter (const PropertyKey id)
bool verifyIndex (const PropertyKey id, uint index)
Q_REQUIRED_RESULT InternalClasssealed ()
Q_REQUIRED_RESULT InternalClassfrozen ()
Q_REQUIRED_RESULT InternalClasscanned ()
Q_REQUIRED_RESULT InternalClasscryopreserved ()
bool isImplicitlyFrozen () const
Q_REQUIRED_RESULT InternalClassasProtoClass ()
Q_REQUIRED_RESULT InternalClasschangeVTable (const VTable *vt)
Q_REQUIRED_RESULT InternalClasschangePrototype (Heap::Object *proto)
void updateProtoUsage (Heap::Object *o)
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 addMember (QV4::Object *object, PropertyKey id, PropertyAttributes data, InternalClassEntry *entry)
static void changeMember (QV4::Object *object, PropertyKey id, PropertyAttributes data, InternalClassEntry *entry=nullptr)
static void removeMember (QV4::Object *object, PropertyKey identifier)
static void markObjects (Heap::Base *ic, MarkStack *stack)
Static Public Member Functions inherited from QV4::Heap::Base
static void markObjects (Base *, MarkStack *)

Public Attributes

ExecutionEngineengine
const VTablevtable
quintptr protoId
Heap::Object * prototype
InternalClassparent
PropertyHash propertyTable
SharedInternalClassData< PropertyKeynameMap
SharedInternalClassData< PropertyAttributespropertyData
QVarLengthArray< Transition, 1 > transitions
uint size
quint8 numRedundantTransitions
quint8 flags
Public Attributes inherited from QV4::Heap::Base
Pointer< InternalClass *, 0 > internalClass

Friends

struct ::QV4::ExecutionEngine

Detailed Description

Definition at line 317 of file qv4internalclass_p.h.

Member Typedef Documentation

◆ Transition

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxRedundantTransitions 

Definition at line 325 of file qv4internalclass_p.h.

◆ Flag

Enumerator
NotExtensible 
Sealed 
Frozen 
UsedAsProto 
Locked 

Definition at line 318 of file qv4internalclass_p.h.

Member Function Documentation

◆ addMember() [1/2]

Heap::InternalClass * QV4::Heap::InternalClass::addMember ( PropertyKey identifier,
PropertyAttributes data,
InternalClassEntry * entry = nullptr )

Definition at line 575 of file qv4internalclass.cpp.

References findEntry(), and QV4::PropertyKey::isStringOrSymbol().

Here is the call graph for this function:

◆ addMember() [2/2]

void QV4::Heap::InternalClass::addMember ( QV4::Object * object,
PropertyKey id,
PropertyAttributes data,
InternalClassEntry * entry )
static

Definition at line 567 of file qv4internalclass.cpp.

◆ asProtoClass()

Heap::InternalClass * QV4::Heap::InternalClass::asProtoClass ( )

Definition at line 746 of file qv4internalclass.cpp.

References QV4::Scope::Scope(), engine, QV4::PropertyKey::invalid(), isUsedAsProto(), QV4::InternalClassTransition::lookup, lookupOrInsertTransition(), QV4::InternalClassTransition::ProtoClass, and UsedAsProto.

Here is the call graph for this function:

◆ canned()

InternalClass * QV4::Heap::InternalClass::canned ( )

Definition at line 714 of file qv4internalclass.cpp.

References QV4::Scope::Scope(), and engine.

Here is the call graph for this function:

◆ changeMember() [1/2]

Heap::InternalClass * QV4::Heap::InternalClass::changeMember ( PropertyKey identifier,
PropertyAttributes data,
InternalClassEntry * entry = nullptr )

Definition at line 427 of file qv4internalclass.cpp.

References QV4::Scope::Scope(), engine, findEntry(), QV4::InternalClassTransition::lookup, and lookupOrInsertTransition().

Here is the call graph for this function:

◆ changeMember() [2/2]

void QV4::Heap::InternalClass::changeMember ( QV4::Object * object,
PropertyKey id,
PropertyAttributes data,
InternalClassEntry * entry = nullptr )
static

Definition at line 304 of file qv4internalclass.cpp.

References QV4::PropertyKey::isStringOrSymbol().

Here is the call graph for this function:

◆ changePrototype()

Q_REQUIRED_RESULT InternalClass * QV4::Heap::InternalClass::changePrototype ( Heap::Object * proto)
inline

Definition at line 467 of file qv4internalclass_p.h.

◆ changeVTable()

Q_REQUIRED_RESULT InternalClass * QV4::Heap::InternalClass::changeVTable ( const VTable * vt)
inline

Definition at line 462 of file qv4internalclass_p.h.

◆ cryopreserved()

InternalClass * QV4::Heap::InternalClass::cryopreserved ( )

Definition at line 722 of file qv4internalclass.cpp.

References QV4::Scope::Scope(), and engine.

Here is the call graph for this function:

◆ destroy()

void QV4::Heap::InternalClass::destroy ( )

Definition at line 271 of file qv4internalclass.cpp.

References QV4::PropertyHash::~PropertyHash(), engine, parent, and propertyTable.

Here is the call graph for this function:

◆ find()

InternalClassEntry QV4::Heap::InternalClass::find ( const PropertyKey id)
inline

Definition at line 375 of file qv4internalclass_p.h.

References QV4::PropertyHash::Entry::index, QV4::PropertyKey::isStringOrSymbol(), QV4::PropertyHash::lookup(), propertyTable, QV4::PropertyHash::Entry::setterIndex, and size.

Here is the call graph for this function:

◆ findEntry()

PropertyHash::Entry * QV4::Heap::InternalClass::findEntry ( const PropertyKey id)
inline

Definition at line 364 of file qv4internalclass_p.h.

References QV4::PropertyHash::Entry::index, QV4::PropertyKey::isStringOrSymbol(), QV4::PropertyHash::lookup(), propertyTable, and size.

Referenced by addMember(), changeMember(), and removeMember().

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

◆ findValueOrGetter()

IndexAndAttribute QV4::Heap::InternalClass::findValueOrGetter ( const PropertyKey id)
inline

Definition at line 395 of file qv4internalclass_p.h.

References QV4::PropertyHash::Entry::index, QV4::PropertyKey::isStringOrSymbol(), QV4::PropertyHash::lookup(), propertyTable, and size.

Here is the call graph for this function:

◆ findValueOrSetter()

IndexAndAttribute QV4::Heap::InternalClass::findValueOrSetter ( const PropertyKey id)
inline

Definition at line 409 of file qv4internalclass_p.h.

References QV4::PropertyHash::Entry::index, QV4::PropertyKey::isStringOrSymbol(), QV4::PropertyHash::lookup(), propertyTable, QV4::PropertyHash::Entry::setterIndex, and size.

Here is the call graph for this function:

◆ frozen()

Heap::InternalClass * QV4::Heap::InternalClass::frozen ( )

Definition at line 682 of file qv4internalclass.cpp.

References QV4::Scope::Scope(), engine, Frozen, QV4::InternalClassTransition::Frozen, QV4::PropertyKey::invalid(), isFrozen(), QV4::InternalClassTransition::lookup, and lookupOrInsertTransition().

Here is the call graph for this function:

◆ indexOfValueOrGetter()

uint QV4::Heap::InternalClass::indexOfValueOrGetter ( const PropertyKey id)
inline

Definition at line 428 of file qv4internalclass_p.h.

References QV4::PropertyHash::Entry::index, QV4::PropertyKey::isStringOrSymbol(), QV4::PropertyHash::lookup(), propertyTable, and size.

Here is the call graph for this function:

◆ init() [1/2]

void QV4::Heap::InternalClass::init ( ExecutionEngine * engine)

Definition at line 222 of file qv4internalclass.cpp.

References QV4::PropertyHash::PropertyHash(), engine, propertyTable, and vtable.

Here is the call graph for this function:

◆ init() [2/2]

void QV4::Heap::InternalClass::init ( Heap::InternalClass * other)

Definition at line 246 of file qv4internalclass.cpp.

References QV4::PropertyHash::PropertyHash(), engine, parent, propertyTable, prototype, and vtable.

Here is the call graph for this function:

◆ isExtensible()

bool QV4::Heap::InternalClass::isExtensible ( ) const
inline

Definition at line 345 of file qv4internalclass_p.h.

Referenced by nonExtensible().

Here is the caller graph for this function:

◆ isFrozen()

bool QV4::Heap::InternalClass::isFrozen ( ) const
inline

Definition at line 347 of file qv4internalclass_p.h.

Referenced by frozen(), isImplicitlyFrozen(), and sealed().

Here is the caller graph for this function:

◆ isImplicitlyFrozen()

bool QV4::Heap::InternalClass::isImplicitlyFrozen ( ) const

Definition at line 730 of file qv4internalclass.cpp.

References isFrozen().

Here is the call graph for this function:

◆ isLocked()

bool QV4::Heap::InternalClass::isLocked ( ) const
inline

Definition at line 349 of file qv4internalclass_p.h.

Referenced by locked().

Here is the caller graph for this function:

◆ isSealed()

bool QV4::Heap::InternalClass::isSealed ( ) const
inline

Definition at line 346 of file qv4internalclass_p.h.

Referenced by sealed().

Here is the caller graph for this function:

◆ isUsedAsProto()

bool QV4::Heap::InternalClass::isUsedAsProto ( ) const
inline

Definition at line 348 of file qv4internalclass_p.h.

Referenced by asProtoClass(), and updateProtoUsage().

Here is the caller graph for this function:

◆ keyAt()

ReturnedValue QV4::Heap::InternalClass::keyAt ( uint index) const

Definition at line 293 of file qv4internalclass.cpp.

References QV4::PropertyKey::asArrayIndex(), QV4::PropertyKey::isArrayIndex(), and QV4::PropertyKey::isStringOrSymbol().

Here is the call graph for this function:

◆ locked()

InternalClass * QV4::Heap::InternalClass::locked ( )

Definition at line 547 of file qv4internalclass.cpp.

References QV4::Scope::Scope(), engine, QV4::PropertyKey::invalid(), isLocked(), Locked, QV4::InternalClassTransition::Locked, QV4::InternalClassTransition::lookup, and lookupOrInsertTransition().

Here is the call graph for this function:

◆ lookupOrInsertTransition()

InternalClassTransition & QV4::Heap::InternalClass::lookupOrInsertTransition ( const InternalClassTransition & t)

Definition at line 313 of file qv4internalclass.cpp.

Referenced by asProtoClass(), changeMember(), frozen(), locked(), nonExtensible(), and sealed().

Here is the caller graph for this function:

◆ markObjects()

void QV4::Heap::InternalClass::markObjects ( Heap::Base * ic,
MarkStack * stack )
static

Definition at line 786 of file qv4internalclass.cpp.

References parent, and prototype.

◆ nonExtensible()

Heap::InternalClass * QV4::Heap::InternalClass::nonExtensible ( )

Definition at line 527 of file qv4internalclass.cpp.

References QV4::Scope::Scope(), engine, QV4::PropertyKey::invalid(), isExtensible(), QV4::InternalClassTransition::lookup, lookupOrInsertTransition(), NotExtensible, and QV4::InternalClassTransition::NotExtensible.

Here is the call graph for this function:

◆ removeMember()

void QV4::Heap::InternalClass::removeMember ( QV4::Object * object,
PropertyKey identifier )
static

Definition at line 633 of file qv4internalclass.cpp.

References findEntry().

Here is the call graph for this function:

◆ sealed()

Heap::InternalClass * QV4::Heap::InternalClass::sealed ( )

Definition at line 650 of file qv4internalclass.cpp.

References QV4::Scope::Scope(), engine, QV4::PropertyKey::invalid(), isFrozen(), isSealed(), QV4::InternalClassTransition::lookup, lookupOrInsertTransition(), Sealed, and QV4::InternalClassTransition::Sealed.

Here is the call graph for this function:

◆ updateProtoUsage()

void QV4::Heap::InternalClass::updateProtoUsage ( Heap::Object * o)

Definition at line 777 of file qv4internalclass.cpp.

References isUsedAsProto(), prototype, and QV4::Heap::updateProtoUsage().

Here is the call graph for this function:

◆ verifyIndex()

bool QV4::Heap::InternalClass::verifyIndex ( const PropertyKey id,
uint index )
inline

Definition at line 441 of file qv4internalclass_p.h.

References QV4::PropertyHash::Entry::index, QV4::PropertyKey::isStringOrSymbol(), QV4::PropertyHash::lookup(), propertyTable, and size.

Here is the call graph for this function:

◆ ::QV4::ExecutionEngine

friend struct ::QV4::ExecutionEngine
friend

Definition at line 483 of file qv4internalclass_p.h.

Member Data Documentation

◆ engine

◆ flags

quint8 QV4::Heap::InternalClass::flags

Definition at line 343 of file qv4internalclass_p.h.

◆ nameMap

SharedInternalClassData<PropertyKey> QV4::Heap::InternalClass::nameMap

Definition at line 334 of file qv4internalclass_p.h.

◆ numRedundantTransitions

quint8 QV4::Heap::InternalClass::numRedundantTransitions

Definition at line 342 of file qv4internalclass_p.h.

◆ parent

InternalClass* QV4::Heap::InternalClass::parent

Definition at line 331 of file qv4internalclass_p.h.

Referenced by destroy(), init(), and markObjects().

◆ propertyData

SharedInternalClassData<PropertyAttributes> QV4::Heap::InternalClass::propertyData

Definition at line 335 of file qv4internalclass_p.h.

◆ propertyTable

◆ protoId

quintptr QV4::Heap::InternalClass::protoId

Definition at line 329 of file qv4internalclass_p.h.

◆ prototype

Heap::Object* QV4::Heap::InternalClass::prototype

◆ size

uint QV4::Heap::InternalClass::size

◆ transitions

QVarLengthArray<Transition, 1> QV4::Heap::InternalClass::transitions

Definition at line 338 of file qv4internalclass_p.h.

◆ vtable

const VTable* QV4::Heap::InternalClass::vtable

Definition at line 328 of file qv4internalclass_p.h.

Referenced by QV4::MemoryManager::allocManaged(), init(), and init().


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