3#ifndef QV4INTERNALCLASS_H
4#define QV4INTERNALCLASS_H
20#include <QVarLengthArray>
22#include <private/qv4propertykey_p.h>
23#include <private/qv4heap_p.h>
39struct PropertyHashData;
155 NumAttributesInPointer = SizeOfAttributesPointer / SizeOfAttributes,
158 static_assert(NumAttributesInPointer > 0);
161 return m_alloc > NumAttributesInPointer ?
m_data[
i] : m_inlineData[
i];
165 if (m_alloc > NumAttributesInPointer)
185 template<
typename StringOrSymbol = Heap::StringOrSymbol>
191 void setSize(
uint s);
204template<
typename StringOrSymbol>
217 using Private = SharedInternalClassDataPrivate<T>;
242 d->markIfNecessary(
value);
243 if (pos < d->
size()) {
252 if (
pos ==
d->alloc())
254 if (
pos >=
d->alloc()) {
257 d->setSize(
d->size() + 1);
264 d->markIfNecessary(
value);
265 if (
d->refcount > 1) {
416 if (
a.isAccessor()) {
464 return changeVTableImpl(vt);
469 return changePrototypeImpl(proto);
478 Q_QML_EXPORT
InternalClass *changePrototypeImpl(Heap::Object *proto);
482 friend struct ::QV4::ExecutionEngine;
488 b->internalClass->mark(stack);
Combined button and popup list for selecting options.
#define Q_REQUIRED_RESULT
static int grow(QLayoutStruct &ls, int delta)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QFuture< QSet< QChar > > set
[10]
mimeData setData("text/csv", csvData)
static void markObjects(Base *, MarkStack *)
Q_REQUIRED_RESULT InternalClass * locked()
Q_REQUIRED_RESULT InternalClass * cryopreserved()
IndexAndAttribute findValueOrSetter(const PropertyKey id)
static void addMember(QV4::Object *object, PropertyKey id, PropertyAttributes data, InternalClassEntry *entry)
Q_REQUIRED_RESULT InternalClass * sealed()
InternalClassEntry find(const PropertyKey id)
bool verifyIndex(const PropertyKey id, uint index)
PropertyHash propertyTable
QVarLengthArray< Transition, 1 > transitions
SharedInternalClassData< PropertyKey > nameMap
Q_REQUIRED_RESULT InternalClass * nonExtensible()
bool isUsedAsProto() const
IndexAndAttribute findValueOrGetter(const PropertyKey id)
Q_REQUIRED_RESULT InternalClass * changePrototype(Heap::Object *proto)
@ MaxRedundantTransitions
Q_REQUIRED_RESULT InternalClass * frozen()
Q_REQUIRED_RESULT InternalClass * canned()
Q_REQUIRED_RESULT InternalClass * changeVTable(const VTable *vt)
Q_QML_EXPORT ReturnedValue keyAt(uint index) const
bool isImplicitlyFrozen() const
quint8 numRedundantTransitions
InternalClassTransition Transition
Q_REQUIRED_RESULT InternalClass * asProtoClass()
bool isExtensible() const
Q_REQUIRED_RESULT InternalClass * changeMember(PropertyKey identifier, PropertyAttributes data, InternalClassEntry *entry=nullptr)
uint indexOfValueOrGetter(const PropertyKey id)
InternalClassTransition & lookupOrInsertTransition(const InternalClassTransition &t)
static void markObjects(Heap::Base *ic, MarkStack *stack)
static void removeMember(QV4::Object *object, PropertyKey identifier)
void updateProtoUsage(Heap::Object *o)
PropertyHash::Entry * findEntry(const PropertyKey id)
SharedInternalClassData< PropertyAttributes > propertyData
PropertyAttributes attributes
Heap::InternalClass * lookup
bool operator<(const InternalClassTransition &other) const
bool operator==(const InternalClassTransition &other) const
PropertyHashData(int numBits)
PropertyHash::Entry * entries
void addEntry(const Entry &entry, int classSize)
PropertyHash & operator=(const PropertyHash &other)
void detach(bool grow, int classSize)
Entry * lookup(PropertyKey identifier) const
PropertyAttributes at(uint i) const
void markIfNecessary(const PropertyAttributes &)
PropertyAttributes * m_data
void set(uint i, PropertyAttributes t)
SharedInternalClassDataPrivate(ExecutionEngine *engine)
SharedInternalClassDataPrivate(const SharedInternalClassDataPrivate &other, uint pos, PropertyKey value)
~SharedInternalClassDataPrivate()
SharedInternalClassDataPrivate(ExecutionEngine *e)
SharedInternalClassDataPrivate(const SharedInternalClassDataPrivate &other)
void set(uint pos, T value)
SharedInternalClassData(ExecutionEngine *e)
void add(uint pos, T value)
SharedInternalClassData & operator=(const SharedInternalClassData &other)
SharedInternalClassDataPrivate< T > Private
~SharedInternalClassData()
SharedInternalClassData(const SharedInternalClassData &other)
static void markCustom(Engine *engine, F &&markFunction)
static constexpr bool isInsertionBarrier