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

#include <qv4object_p.h>

Inherits QV4::Managed.

Inherited by QQmlDelegateModelGroupChange, QQmlDelegateModelGroupChangeArray, QQmlDelegateModelItemObject, QQuickContext2DStyle, QQuickJSContext2D, QQuickJSContext2DImageData, QQuickJSContext2DPixelData, QQuickJSContext2DPrototype, QV4::ArgumentsObject, QV4::ArrayIteratorObject, QV4::ArrayIteratorPrototype, QV4::ArrayObject, QV4::Atomics, QV4::BooleanObject, QV4::ConsoleObject, QV4::DataView, QV4::DataViewPrototype, QV4::DatePrototype, QV4::ErrorObject, QV4::ErrorPrototype, QV4::EvalErrorPrototype, QV4::ForInIteratorObject, QV4::ForInIteratorPrototype, QV4::FunctionObject, QV4::GeneratorObject, QV4::GeneratorPrototype, QV4::Heap::ArrayObject, QV4::Heap::Atomics, QV4::Heap::BooleanObject, QV4::Heap::ConsoleObject, QV4::Heap::IntrinsicTypedArrayPrototype, QV4::Heap::JsonObject, QV4::Heap::MapObject, QV4::Heap::MathObject, QV4::Heap::NamedNodeMap, QV4::Heap::Node, QV4::Heap::NodeList, QV4::Heap::NodePrototype, QV4::Heap::NumberObject, QV4::Heap::QObjectWrapper, QV4::Heap::QQmlDelegateModelGroupChange, QV4::Heap::QQmlDelegateModelGroupChangeArray, QV4::Heap::QQmlDelegateModelItemObject, QV4::Heap::QQmlLocaleData, QV4::Heap::QQmlScopedEnumWrapper, QV4::Heap::QQmlSqlDatabaseWrapper, QV4::Heap::QQmlTypeWrapper, QV4::Heap::QQmlXMLHttpRequestWrapper, QV4::Heap::QQuickContext2DStyle, QV4::Heap::QQuickJSContext2D, QV4::Heap::QQuickJSContext2DImageData, QV4::Heap::QQuickJSContext2DPixelData, QV4::Heap::QQuickJSContext2DPrototype, QV4::Heap::QmlListWrapper, QV4::Heap::QmlSignalHandler, QV4::Heap::Reflect, QV4::Heap::SetObject, QV4::Heap::SharedArrayBuffer, QV4::Heap::TypedArrayPrototype, QV4::Heap::VariantObject, QV4::IntrinsicTypedArrayPrototype, QV4::IteratorPrototype, QV4::JsonObject, QV4::MapIteratorObject, QV4::MapIteratorPrototype, QV4::MapObject, QV4::MathObject, QV4::Module, QV4::NamedNodeMap, QV4::Node, QV4::NodeList, QV4::NodePrototype, QV4::NumberObject, QV4::ObjectPrototype, QV4::PromiseCapability, QV4::PromiseExecutionState, QV4::PromiseObject, QV4::PromisePrototype, QV4::PromiseReaction, QV4::PropertyListPrototype, QV4::QObjectWrapper, QV4::QQmlContextWrapper, QV4::QQmlLocaleData, QV4::QQmlScopedEnumWrapper, QV4::QQmlSqlDatabaseWrapper, QV4::QQmlTypeWrapper, QV4::QQmlXMLHttpRequestWrapper, QV4::QmlIncubatorObject, QV4::QmlListWrapper, QV4::QmlSignalHandler, QV4::RangeErrorPrototype, QV4::ReferenceErrorPrototype, QV4::ReferenceObject, QV4::Reflect, QV4::RegExpObject, QV4::RegExpPrototype, QV4::SequencePrototype, QV4::SetIteratorObject, QV4::SetIteratorPrototype, QV4::SetObject, QV4::SharedArrayBuffer, QV4::SharedArrayBufferPrototype, QV4::StrictArgumentsObject, QV4::StringIteratorObject, QV4::StringIteratorPrototype, QV4::StringObject, QV4::SymbolObject, QV4::SymbolPrototype, QV4::SyntaxErrorPrototype, QV4::TypeErrorPrototype, QV4::TypedArray, QV4::TypedArrayPrototype, QV4::URIErrorPrototype, QV4::UrlObject, QV4::UrlPrototype, QV4::UrlSearchParamsObject, QV4::UrlSearchParamsPrototype, QV4::VariantObject, QV4::WeakMapPrototype, QV4::WeakSetPrototype, and QV4ParticleData.

+ Collaboration diagram for QV4::Object:

Public Types

enum  { NInlineProperties = 2 }
 
enum  { IsObject = true , GetterOffset = 0 , SetterOffset = 1 }
 
enum  ThrowOnFailure { DoThrowOnRejection , DoNotThrow }
 
- Public Types inherited from QV4::Managed
enum  {
  IsExecutionContext = false , IsString = false , IsStringOrSymbol = false , IsObject = false ,
  IsFunctionObject = false , IsErrorObject = false , IsArrayData = false
}
 
enum  { NInlineProperties = 0 }
 
enum  Type {
  Type_Invalid , Type_String , Type_Object , Type_Symbol ,
  Type_ArrayObject , Type_FunctionObject , Type_GeneratorObject , Type_BooleanObject ,
  Type_NumberObject , Type_StringObject , Type_SymbolObject , Type_DateObject ,
  Type_RegExpObject , Type_ErrorObject , Type_ArgumentsObject , Type_JsonObject ,
  Type_MathObject , Type_ProxyObject , Type_UrlObject , Type_UrlSearchParamsObject ,
  Type_ExecutionContext , Type_InternalClass , Type_SetIteratorObject , Type_MapIteratorObject ,
  Type_ArrayIteratorObject , Type_StringIteratorObject , Type_ForInIterator , Type_RegExp ,
  Type_V4Sequence , Type_QmlListProperty
}
 
- Public Types inherited from QV4::Value
using ManagedPtr = Managed *
 
- Public Types inherited from QV4::StaticValue
enum class  TagBit {
  SpecialNegative = 0b10000000000000000000 << 12 , SpecialQNaN = 0b00000000000010000000 << 12 , Special = 0b00000000000001000000 << 12 , IntCompat = 0b00000000000000100000 << 12 ,
  Unmanaged = 0b00000000000000010000 << 12 , IntOrBool = 0b00000000000000001000 << 12 , Number = 0b00000000000000000100 << 12
}
 
enum  Type {
  Managed_Type = 0 , Double_Type = 1 , Undefined_Type = 2 , Empty_Type = quint32(TagBit::Unmanaged) ,
  Null_Type = Empty_Type | quint32(TagBit::IntCompat) , Boolean_Type = Null_Type | quint32(TagBit::IntOrBool) , Integer_Type = Boolean_Type | quint32(TagBit::Number)
}
 
enum  {
  Tag_Shift = 32 , IsIntegerConvertible_Shift = 48 , IsIntegerConvertible_Value = 3 , IsIntegerOrBool_Shift = 47 ,
  IsIntegerOrBool_Value = 7
}
 
enum class  QuickType : quint32 {
  Managed = Managed_Type , Empty = Empty_Type , Null = Null_Type , Boolean = Boolean_Type ,
  Integer = Integer_Type , PlusInf = quint32(TagBit::Number) | quint32(TagBit::Special) | quint32(TagBit::Unmanaged) , MinusInf = PlusInf | quint32(TagBit::SpecialNegative) , NaN = PlusInf | quint32(TagBit::SpecialQNaN) ,
  MinusNaN = NaN | quint32(TagBit::SpecialNegative)
}
 
enum  {
  QT_Empty = Empty_Type , QT_Null = Null_Type , QT_Bool = Boolean_Type , QT_Int = Integer_Type ,
  QuickType_Shift = Tag_Shift
}
 
using HeapBasePtr = Heap::Base *
 
using ValueTypeInternal = QuickType
 

Public Member Functions

void setInternalClass (Heap::InternalClass *ic)
 
const ValuepropertyData (uint index) const
 
Heap::ArrayData * arrayData () const
 
void setArrayData (ArrayData *a)
 
void getProperty (const InternalClassEntry &entry, Property *p) const
 
void setProperty (const InternalClassEntry &entry, const Property *p)
 
void setProperty (uint index, Value v) const
 
void setProperty (uint index, Heap::Base *b) const
 
void setProperty (ExecutionEngine *engine, uint index, Value v) const
 
void setProperty (ExecutionEngine *engine, uint index, Heap::Base *b) const
 
const VTablevtable () const
 
PropertyAttributes getOwnProperty (PropertyKey id, Property *p=nullptr) const
 
PropertyIndex getValueOrSetter (PropertyKey id, PropertyAttributes *attrs)
 
bool hasProperty (PropertyKey id) const
 
bool defineOwnProperty (PropertyKey id, const Property *p, PropertyAttributes attrs)
 
ReturnedValue getValue (const Value &v, PropertyAttributes attrs) const
 
ReturnedValue getValueByIndex (uint propertyIndex) const
 
bool putValue (uint memberIndex, PropertyAttributes attrs, const Value &value)
 
void defineDefaultProperty (StringOrSymbol *name, const Value &value, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
 
void defineDefaultProperty (const QString &name, const Value &value, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
 
void defineDefaultProperty (const QString &name, VTable::Call code, int argumentCount=0, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
 
void defineDefaultProperty (StringOrSymbol *name, VTable::Call code, int argumentCount=0, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
 
void defineAccessorProperty (const QString &name, VTable::Call getter, VTable::Call setter)
 
void defineAccessorProperty (StringOrSymbol *name, VTable::Call getter, VTable::Call setter)
 
void defineReadonlyProperty (const QString &name, const Value &value)
 
void defineReadonlyProperty (String *name, const Value &value)
 
void defineReadonlyConfigurableProperty (const QString &name, const Value &value)
 
void defineReadonlyConfigurableProperty (StringOrSymbol *name, const Value &value)
 
void addSymbolSpecies ()
 
void insertMember (StringOrSymbol *s, const Value &v, PropertyAttributes attributes=Attr_Data)
 
void insertMember (StringOrSymbol *s, const Property *p, PropertyAttributes attributes)
 
bool isExtensible () const
 
bool preventExtensions ()
 
Heap::Object * getPrototypeOf () const
 
bool setPrototypeOf (const Object *p)
 
void setPrototypeUnchecked (const Object *p)
 
void copyArrayData (Object *other)
 
bool setArrayLength (uint newLen)
 
void setArrayLengthUnchecked (uint l)
 
void arraySet (uint index, const Property *p, PropertyAttributes attributes=Attr_Data)
 
void arraySet (uint index, const Value &value)
 
bool arrayPut (uint index, const Value &value)
 
bool arrayPut (uint index, const Value *values, uint n)
 
void setArrayAttributes (uint i, PropertyAttributes a)
 
void push_back (const Value &v)
 
ArrayData::Type arrayType () const
 
void setArrayType (ArrayData::Type t)
 
void arrayReserve (uint n)
 
void arrayCreate ()
 
void initSparseArray ()
 
SparseArrayNodesparseBegin () const
 
SparseArrayNodesparseEnd () const
 
bool protoHasArray ()
 
ReturnedValue get (StringOrSymbol *name, bool *hasProperty=nullptr, const Value *receiver=nullptr) const
 
ReturnedValue get (uint idx, bool *hasProperty=nullptr, const Value *receiver=nullptr) const
 
QT_DEPRECATED ReturnedValue getIndexed (uint idx, bool *hasProperty=nullptr) const
 
ReturnedValue get (PropertyKey id, const Value *receiver=nullptr, bool *hasProperty=nullptr) const
 
bool put (StringOrSymbol *name, const Value &v, Value *receiver=nullptr)
 
bool put (uint idx, const Value &v, Value *receiver=nullptr)
 
QT_DEPRECATED bool putIndexed (uint idx, const Value &v)
 
bool put (PropertyKey id, const Value &v, Value *receiver=nullptr)
 
bool setIndexed (uint idx, const Value &v, ThrowOnFailure shouldThrow)
 
bool set (StringOrSymbol *name, const Value &v, ThrowOnFailure shouldThrow)
 
bool deleteProperty (PropertyKey id)
 
OwnPropertyKeyIteratorownPropertyKeys (Value *target) const
 
qint64 getLength () const
 
ReturnedValue instanceOf (const Value &var) const
 
bool isConcatSpreadable () const
 
bool isArray () const
 
const FunctionObjectspeciesConstructor (Scope &scope, const FunctionObject *defaultConstructor) const
 
bool setProtoFromNewTarget (const Value *newTarget)
 
ReturnedValue resolveLookupGetter (ExecutionEngine *engine, Lookup *lookup) const
 
ReturnedValue resolveLookupSetter (ExecutionEngine *engine, Lookup *lookup, const Value &value)
 
int metacall (QMetaObject::Call call, int index, void **a)
 
- Public Member Functions inherited from QV4::Managed
Heap::InternalClassinternalClass () const
 
const VTablevtable () const
 
ExecutionEngineengine () const
 
bool isV4SequenceType () const
 
bool isQmlListPropertyType () const
 
bool isArrayLike () const
 
bool isArrayObject () const
 
bool isStringObject () const
 
bool isSymbolObject () const
 
QString className () const
 
bool isEqualTo (const Managed *other) const
 
bool inUse () const
 
bool markBit () const
 
void mark (MarkStack *markStack)
 
Q_ALWAYS_INLINE Heap::BaseheapObject () const
 
template<typename T >
T * cast ()
 
template<typename T >
const T * cast () const
 
- Public Member Functions inherited from QV4::Value
 Value ()=default
 
constexpr Value (quint64 val)
 
bool isString () const
 
bool isStringOrSymbol () const
 
bool isSymbol () const
 
bool isObject () const
 
bool isFunctionObject () const
 
QML_NEARLY_ALWAYS_INLINE StringstringValue () const
 
QML_NEARLY_ALWAYS_INLINE StringOrSymbolstringOrSymbolValue () const
 
QML_NEARLY_ALWAYS_INLINE SymbolsymbolValue () const
 
QML_NEARLY_ALWAYS_INLINE ObjectobjectValue () const
 
QML_NEARLY_ALWAYS_INLINE ManagedPtr managed () const
 
QML_NEARLY_ALWAYS_INLINE Value::HeapBasePtr heapObject () const
 
int toUInt16 () const
 
int toInt32 () const
 
unsigned int toUInt32 () const
 
qint64 toLength () const
 
qint64 toIndex () const
 
bool toBoolean () const
 
double toInteger () const
 
ReturnedValue convertedToNumber () const
 
double toNumber () const
 
double toNumberImpl () const
 
QString toQStringNoThrow () const
 
QString toQString () const
 
QString toQString (bool *ok) const
 
Heap::StringtoString (ExecutionEngine *e) const
 
QV4::PropertyKey toPropertyKey (ExecutionEngine *e) const
 
Heap::Object * toObject (ExecutionEngine *e) const
 
bool isPrimitive () const
 
template<typename T >
const T * as () const
 
template<typename T >
T * as ()
 
template<typename T >
T * cast ()
 
template<typename T >
const T * cast () const
 
uint asArrayLength (bool *ok) const
 
bool sameValue (Value other) const
 
bool sameValueZero (Value other) const
 
void mark (MarkStack *markStack)
 
Valueoperator= (const ScopedValue &v)
 
Valueoperator= (ReturnedValue v)
 
Valueoperator= (ManagedPtr m)
 
Valueoperator= (HeapBasePtr o)
 
template<typename T >
Valueoperator= (const Scoped< T > &t)
 
template<>
const DateObjectas () const
 
- Public Member Functions inherited from QV4::StaticValue
 StaticValue ()=default
 
constexpr StaticValue (quint64 val)
 
StaticValueoperator= (ReturnedValue v)
 
template<typename Value >
StaticValueoperator= (const Value &)
 
template<typename Value >
const ValueasValue () const
 
template<typename Value >
ValueasValue ()
 
QV4_NEARLY_ALWAYS_INLINE constexpr quint64rawValueRef ()
 
QV4_NEARLY_ALWAYS_INLINE constexpr quint64 rawValue () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setRawValue (quint64 raw)
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setTagValue (quint32 tag, quint32 value)
 
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 value () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 tag () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setTag (quint32 tag)
 
QV4_NEARLY_ALWAYS_INLINE constexpr int int_32 () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setInt_32 (int i)
 
QV4_NEARLY_ALWAYS_INLINE uint uint_32 () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setEmpty ()
 
Type type () const
 
quint64 quickType () const
 
bool isEmpty () const
 
bool isNull () const
 
bool isBoolean () const
 
bool isInteger () const
 
bool isNullOrUndefined () const
 
bool isUndefined () const
 
bool isDouble () const
 
bool isNumber () const
 
bool isManagedOrUndefined () const
 
bool isManaged () const
 
bool isIntOrBool () const
 
bool integerCompatible () const
 
bool isNaN () const
 
bool isPositiveInt () const
 
QV4_NEARLY_ALWAYS_INLINE double doubleValue () const
 
QV4_NEARLY_ALWAYS_INLINE void setDouble (double d)
 
bool isInt32 ()
 
double asDouble () const
 
bool booleanValue () const
 
int integerValue () const
 
bool tryIntegerConversion ()
 
bool toBoolean () const
 
int toInt32 () const
 
ReturnedValuedata_ptr ()
 
constexpr ReturnedValue asReturnedValue () const
 
template<>
StaticValueoperator= (const Value &value)
 
template<typename Managed >
StaticValueoperator= (const Managed &m)
 
template<>
ValueasValue ()
 
template<>
const ValueasValue () const
 

Static Public Member Functions

static ReturnedValue getValue (const Value *thisObject, const Value &v, PropertyAttributes attrs)
 
static ReturnedValue getValueAccessor (const Value *thisObject, const Value &v, PropertyAttributes attrs)
 
static ReturnedValue checkedInstanceOf (ExecutionEngine *engine, const FunctionObject *typeObject, const Value &var)
 
- Static Public Member Functions inherited from QV4::Value
static constexpr Value fromStaticValue (StaticValue staticValue)
 
static Value fromHeapObject (HeapBasePtr m)
 
static bool toBooleanImpl (Value val)
 
static double toNumberImpl (Value v)
 
static Heap::StringtoString (ExecutionEngine *e, Value val)
 
static Heap::Object * toObject (ExecutionEngine *e, Value val)
 
static constexpr Value fromReturnedValue (ReturnedValue val)
 
static double toInteger (double d)
 
static int toInt32 (double d)
 
static unsigned int toUInt32 (double d)
 
static constexpr Value emptyValue ()
 
static constexpr Value fromBoolean (bool b)
 
static constexpr Value fromInt32 (int i)
 
static constexpr Value undefinedValue ()
 
static constexpr Value nullValue ()
 
static Value fromDouble (double d)
 
static Value fromUInt32 (uint i)
 
- Static Public Member Functions inherited from QV4::StaticValue
static int valueOffset ()
 
static int tagOffset ()
 
static constexpr quint64 tagValue (quint32 tag, quint32 value)
 
static constexpr quint64 tagBitMask (TagBit bit)
 
static bool integerCompatible (StaticValue a, StaticValue b)
 
static bool bothDouble (StaticValue a, StaticValue b)
 
static QV4_NEARLY_ALWAYS_INLINE bool isInt32 (double d)
 
static constexpr StaticValue fromReturnedValue (ReturnedValue val)
 
static constexpr StaticValue emptyValue ()
 
static constexpr StaticValue fromBoolean (bool b)
 
static constexpr StaticValue fromInt32 (int i)
 
static constexpr StaticValue undefinedValue ()
 
static constexpr StaticValue nullValue ()
 
static StaticValue fromDouble (double d)
 
static StaticValue fromUInt32 (uint i)
 
static double toInteger (double d)
 
static int toInt32 (double d)
 
static unsigned int toUInt32 (double d)
 

Static Protected Member Functions

static ReturnedValue virtualGet (const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)
 
static bool virtualPut (Managed *m, PropertyKey id, const Value &value, Value *receiver)
 
static bool virtualDeleteProperty (Managed *m, PropertyKey id)
 
static bool virtualHasProperty (const Managed *m, PropertyKey id)
 
static PropertyAttributes virtualGetOwnProperty (const Managed *m, PropertyKey id, Property *p)
 
static bool virtualDefineOwnProperty (Managed *m, PropertyKey id, const Property *p, PropertyAttributes attrs)
 
static bool virtualIsExtensible (const Managed *m)
 
static bool virtualPreventExtensions (Managed *)
 
static Heap::Object * virtualGetPrototypeOf (const Managed *)
 
static bool virtualSetPrototypeOf (Managed *, const Object *)
 
static OwnPropertyKeyIteratorvirtualOwnPropertyKeys (const Object *m, Value *target)
 
static qint64 virtualGetLength (const Managed *m)
 
static ReturnedValue virtualInstanceOf (const Object *typeObject, const Value &var)
 
static ReturnedValue virtualResolveLookupGetter (const Object *object, ExecutionEngine *engine, Lookup *lookup)
 
static bool virtualResolveLookupSetter (Object *object, ExecutionEngine *engine, Lookup *lookup, const Value &value)
 
static int virtualMetacall (Object *object, QMetaObject::Call call, int index, void **a)
 
- Static Protected Member Functions inherited from QV4::Managed
static bool virtualIsEqualTo (Managed *m, Managed *other)
 

Friends

struct ObjectIterator
 
struct ObjectPrototype
 

Additional Inherited Members

- Public Attributes inherited from QV4::StaticValue
quint64 _val
 
- Static Public Attributes inherited from QV4::StaticValue
static constexpr quint64 ExponentMask = 0b0111111111110000ull << 48
 
static constexpr quint64 Top1Mask = 0b1000000000000000ull << 48
 
static constexpr quint64 Upper3Mask = 0b0000000000001110ull << 48
 
static constexpr quint64 Lower5Mask = 0b0000000000011111ull
 
static constexpr quint64 ManagedMask = ExponentMask | quint64(TagBit::Unmanaged) << Tag_Shift
 
static constexpr quint64 DoubleMask = ManagedMask | quint64(TagBit::Special) << Tag_Shift
 
static constexpr quint64 NumberMask = ManagedMask | quint64(TagBit::Number) << Tag_Shift
 
static constexpr quint64 IntOrBoolMask = ManagedMask | quint64(TagBit::IntOrBool) << Tag_Shift
 
static constexpr quint64 IntCompatMask = ManagedMask | quint64(TagBit::IntCompat) << Tag_Shift
 
static constexpr quint64 EncodeMask = DoubleMask | NumberMask
 
static constexpr quint64 DoubleDiscriminator = ((quint64(TagBit::Unmanaged) | quint64(TagBit::Special)) << Tag_Shift)
 
static constexpr quint64 NumberDiscriminator = ((quint64(TagBit::Unmanaged) | quint64(TagBit::Number)) << Tag_Shift)
 
- Static Protected Attributes inherited from QV4::VTableBase
static constexpr VTable::Destroy virtualDestroy = nullptr
 
static constexpr VTable::IsEqualTo virtualIsEqualTo = nullptr
 
static constexpr VTable::Get virtualGet = nullptr
 
static constexpr VTable::Put virtualPut = nullptr
 
static constexpr VTable::DeleteProperty virtualDeleteProperty = nullptr
 
static constexpr VTable::HasProperty virtualHasProperty = nullptr
 
static constexpr VTable::GetOwnProperty virtualGetOwnProperty = nullptr
 
static constexpr VTable::DefineOwnProperty virtualDefineOwnProperty = nullptr
 
static constexpr VTable::IsExtensible virtualIsExtensible = nullptr
 
static constexpr VTable::PreventExtensions virtualPreventExtensions = nullptr
 
static constexpr VTable::GetPrototypeOf virtualGetPrototypeOf = nullptr
 
static constexpr VTable::SetPrototypeOf virtualSetPrototypeOf = nullptr
 
static constexpr VTable::GetLength virtualGetLength = nullptr
 
static constexpr VTable::OwnPropertyKeys virtualOwnPropertyKeys = nullptr
 
static constexpr VTable::InstanceOf virtualInstanceOf = nullptr
 
static constexpr VTable::Call virtualCall = nullptr
 
static constexpr VTable::CallAsConstructor virtualCallAsConstructor = nullptr
 
static constexpr VTable::CallWithMetaTypes virtualCallWithMetaTypes = nullptr
 
static constexpr VTable::ResolveLookupGetter virtualResolveLookupGetter = nullptr
 
static constexpr VTable::ResolveLookupSetter virtualResolveLookupSetter = nullptr
 
static constexpr VTable::Metacall virtualMetacall = nullptr
 

Detailed Description

Definition at line 104 of file qv4object_p.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NInlineProperties 

Definition at line 110 of file qv4object_p.h.

◆ anonymous enum

anonymous enum
Enumerator
IsObject 
GetterOffset 
SetterOffset 

Definition at line 112 of file qv4object_p.h.

◆ ThrowOnFailure

Enumerator
DoThrowOnRejection 
DoNotThrow 

Definition at line 289 of file qv4object_p.h.

Member Function Documentation

◆ addSymbolSpecies()

void Object::addSymbolSpecies ( )

Definition at line 227 of file qv4object.cpp.

References QV4::Attr_Accessor, QV4::Attr_NotEnumerable, QV4::Attr_NotWritable, engine, QV4::Scope::engine, QV4::ExecutionEngine::getSymbolSpecies(), and QV4::ExecutionEngine::symbol_species().

Referenced by QV4::IntrinsicTypedArrayPrototype::init(), QV4::SharedArrayBufferPrototype::init(), QV4::ArrayBufferPrototype::init(), QV4::ArrayPrototype::init(), QV4::MapPrototype::init(), QV4::PromisePrototype::init(), and QV4::SetPrototype::init().

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

◆ arrayCreate()

void QV4::Object::arrayCreate ( )
inline

Definition at line 247 of file qv4object_p.h.

Referenced by arraySet(), arraySet(), and push_back().

+ Here is the caller graph for this function:

◆ arrayData()

Heap::ArrayData * QV4::Object::arrayData ( ) const
inline

Definition at line 122 of file qv4object_p.h.

References d.

Referenced by QV4::ArrayData::append(), arraySet(), arraySet(), copyArrayData(), QV4::FunctionPrototype::method_apply(), setArrayLength(), and QV4::ArrayData::sort().

+ Here is the caller graph for this function:

◆ arrayPut() [1/2]

bool QV4::Object::arrayPut ( uint  index,
const Value value 
)
inline

Definition at line 216 of file qv4object_p.h.

Referenced by QV4::ArgumentsObject::fullyCreate(), QV4::ModelObjectOwnPropertyKeyIterator::next(), and push_back().

+ Here is the caller graph for this function:

◆ arrayPut() [2/2]

bool QV4::Object::arrayPut ( uint  index,
const Value values,
uint  n 
)
inline

Definition at line 219 of file qv4object_p.h.

◆ arrayReserve()

void QV4::Object::arrayReserve ( uint  n)
inline

Definition at line 243 of file qv4object_p.h.

Referenced by QV4::ArgumentsObject::fullyCreate(), and push_back().

+ Here is the caller graph for this function:

◆ arraySet() [1/2]

void Object::arraySet ( uint  index,
const Property p,
PropertyAttributes  attributes = Attr_Data 
)
inline

Definition at line 485 of file qv4object_p.h.

References arrayCreate(), arrayData(), d, getLength(), initSparseArray(), QV4::ArrayData::insert(), QV4::PropertyAttributes::isAccessor(), QV4::Managed::isArrayObject(), setArrayAttributes(), and setArrayLengthUnchecked().

Referenced by copyArrayData(), and QV4::ArrayData::sort().

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

◆ arraySet() [2/2]

void Object::arraySet ( uint  index,
const Value value 
)
inline

Definition at line 501 of file qv4object_p.h.

References arrayCreate(), arrayData(), d, getLength(), initSparseArray(), QV4::ArrayData::insert(), QV4::Managed::isArrayObject(), and setArrayLengthUnchecked().

+ Here is the call graph for this function:

◆ arrayType()

ArrayData::Type QV4::Object::arrayType ( ) const
inline

Definition at line 233 of file qv4object_p.h.

References d.

Referenced by initSparseArray(), QV4::FunctionPrototype::method_apply(), QV4::IntrinsicTypedArrayPrototype::method_subarray(), and setArrayLength().

+ Here is the caller graph for this function:

◆ checkedInstanceOf()

ReturnedValue Object::checkedInstanceOf ( ExecutionEngine engine,
const FunctionObject typeObject,
const Value var 
)
static

Definition at line 859 of file qv4object.cpp.

References QV4::Managed::engine(), QV4::Value::fromReturnedValue(), o, and var.

Referenced by virtualInstanceOf().

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

◆ copyArrayData()

void Object::copyArrayData ( Object other)

Definition at line 684 of file qv4object.cpp.

References arrayData(), arraySet(), d, QV4::Managed::engine(), i, QV4::Managed::isArrayObject(), QV4::ArgumentsObject::isNonStrictArgumentsObject(), other(), Q_ASSERT, QV4::ArrayData::realloc(), and setArrayLengthUnchecked().

+ Here is the call graph for this function:

◆ defineAccessorProperty() [1/2]

void Object::defineAccessorProperty ( const QString name,
VTable::Call  getter,
VTable::Call  setter 
)

Definition at line 168 of file qv4object.cpp.

References e, and engine.

Referenced by QV4::IntrinsicTypedArrayPrototype::init(), and QV4::RegExpPrototype::init().

+ Here is the caller graph for this function:

◆ defineAccessorProperty() [2/2]

void Object::defineAccessorProperty ( StringOrSymbol name,
VTable::Call  getter,
VTable::Call  setter 
)

Definition at line 176 of file qv4object.cpp.

References QV4::Attr_Accessor, QV4::Attr_NotEnumerable, QV4::FunctionObject::createBuiltinFunction(), engine, QChar::fromLatin1(), QString::fromLatin1(), QStringView::mid(), QV4::ExecutionEngine::newString(), and setName().

+ Here is the call graph for this function:

◆ defineDefaultProperty() [1/4]

void Object::defineDefaultProperty ( const QString name,
const Value value,
PropertyAttributes  attributes = Attr_Data|Attr_NotEnumerable 
)

Definition at line 141 of file qv4object.cpp.

References e, and engine.

◆ defineDefaultProperty() [2/4]

void Object::defineDefaultProperty ( const QString name,
VTable::Call  code,
int  argumentCount = 0,
PropertyAttributes  attributes = Attr_Data|Attr_NotEnumerable 
)

Definition at line 149 of file qv4object.cpp.

References QV4::FunctionObject::createBuiltinFunction(), e, engine, and function.

+ Here is the call graph for this function:

◆ defineDefaultProperty() [3/4]

◆ defineDefaultProperty() [4/4]

void QV4::Object::defineDefaultProperty ( StringOrSymbol name,
VTable::Call  code,
int  argumentCount = 0,
PropertyAttributes  attributes = Attr_Data|Attr_NotEnumerable 
)

◆ defineOwnProperty()

bool QV4::Object::defineOwnProperty ( PropertyKey  id,
const Property p,
PropertyAttributes  attrs 
)
inline

Definition at line 144 of file qv4object_p.h.

References attrs.

◆ defineReadonlyConfigurableProperty() [1/2]

◆ defineReadonlyConfigurableProperty() [2/2]

void Object::defineReadonlyConfigurableProperty ( StringOrSymbol name,
const Value value 
)

Definition at line 222 of file qv4object.cpp.

References QV4::Attr_ReadOnly_ButConfigurable.

◆ defineReadonlyProperty() [1/2]

◆ defineReadonlyProperty() [2/2]

void Object::defineReadonlyProperty ( String name,
const Value value 
)

Definition at line 209 of file qv4object.cpp.

References QV4::Attr_ReadOnly.

◆ deleteProperty()

bool QV4::Object::deleteProperty ( PropertyKey  id)
inline

Definition at line 327 of file qv4object_p.h.

◆ get() [1/3]

ReturnedValue QV4::Object::get ( PropertyKey  id,
const Value receiver = nullptr,
bool *  hasProperty = nullptr 
) const
inline

Definition at line 276 of file qv4object_p.h.

◆ get() [2/3]

◆ get() [3/3]

ReturnedValue QV4::Object::get ( uint  idx,
bool *  hasProperty = nullptr,
const Value receiver = nullptr 
) const
inline

Definition at line 272 of file qv4object_p.h.

◆ getIndexed()

QT_DEPRECATED ReturnedValue QV4::Object::getIndexed ( uint  idx,
bool *  hasProperty = nullptr 
) const
inline

Definition at line 274 of file qv4object_p.h.

References get().

+ Here is the call graph for this function:

◆ getLength()

qint64 QV4::Object::getLength ( ) const
inline

Definition at line 331 of file qv4object_p.h.

Referenced by arraySet(), arraySet(), QV4::FunctionPrototype::method_apply(), QV4::ArrayIteratorPrototype::method_next(), push_back(), setArrayLength(), QV4::ArrayObject::toQStringList(), and QV4::ArrayObject::virtualDefineOwnProperty().

+ Here is the caller graph for this function:

◆ getOwnProperty()

PropertyAttributes QV4::Object::getOwnProperty ( PropertyKey  id,
Property p = nullptr 
) const
inline

Definition at line 134 of file qv4object_p.h.

◆ getProperty()

void Object::getProperty ( const InternalClassEntry entry,
Property p 
) const

Definition at line 80 of file qv4object.cpp.

◆ getPrototypeOf()

Heap::Object * QV4::Object::getPrototypeOf ( ) const
inline

Definition at line 201 of file qv4object_p.h.

◆ getValue() [1/2]

ReturnedValue QV4::Object::getValue ( const Value v,
PropertyAttributes  attrs 
) const
inline

Definition at line 156 of file qv4object_p.h.

References attrs.

◆ getValue() [2/2]

static ReturnedValue QV4::Object::getValue ( const Value thisObject,
const Value v,
PropertyAttributes  attrs 
)
inlinestatic

Definition at line 151 of file qv4object_p.h.

References attrs.

Referenced by QV4::ArrayData::append(), and QV4::ArrayData::sort().

+ Here is the caller graph for this function:

◆ getValueAccessor()

ReturnedValue Object::getValueAccessor ( const Value thisObject,
const Value v,
PropertyAttributes  attrs 
)
static

Definition at line 99 of file qv4object.cpp.

References QV4::Value::as(), attrs, QV4::checkedResult(), QV4::Scope::engine, QV4::JSCallArguments::thisObject, and QV4::Encode::undefined().

+ Here is the call graph for this function:

◆ getValueByIndex()

ReturnedValue QV4::Object::getValueByIndex ( uint  propertyIndex) const
inline

Definition at line 159 of file qv4object_p.h.

References attrs.

◆ getValueOrSetter()

PropertyIndex Object::getValueOrSetter ( PropertyKey  id,
PropertyAttributes attrs 
)

Definition at line 270 of file qv4object.cpp.

References QV4::Attr_Invalid, QV4::Attr_NotConfigurable, QV4::Attr_NotWritable, attrs, d, and o.

◆ hasProperty()

◆ initSparseArray()

void Object::initSparseArray ( )

Definition at line 1075 of file qv4object.cpp.

References arrayType(), and QV4::ArrayData::realloc().

Referenced by arraySet(), arraySet(), QV4::ArgumentsObject::fullyCreate(), setArrayLength(), and QV4::ArrayData::sort().

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

◆ insertMember() [1/2]

void Object::insertMember ( StringOrSymbol s,
const Property p,
PropertyAttributes  attributes 
)

Definition at line 253 of file qv4object.cpp.

References QV4::Heap::InternalClass::addMember(), QV4::InternalClassEntry::index, QV4::PropertyAttributes::isAccessor(), setProperty(), and QV4::InternalClassEntry::setterIndex.

+ Here is the call graph for this function:

◆ insertMember() [2/2]

void QV4::Object::insertMember ( StringOrSymbol s,
const Value v,
PropertyAttributes  attributes = Attr_Data 
)
inline

Definition at line 191 of file qv4object_p.h.

References engine.

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

+ Here is the caller graph for this function:

◆ instanceOf()

ReturnedValue QV4::Object::instanceOf ( const Value var) const
inline

Definition at line 332 of file qv4object_p.h.

References var.

Referenced by QV4::doInstanceof().

+ Here is the caller graph for this function:

◆ isArray()

bool Object::isArray ( ) const

Definition at line 1092 of file qv4object.cpp.

References QV4::Scope::engine, QV4::Managed::isArrayObject(), o, QV4::ExecutionEngine::throwTypeError(), and vtable().

Referenced by isConcatSpreadable(), and QV4::ArrayPrototype::method_isArray().

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

◆ isConcatSpreadable()

bool Object::isConcatSpreadable ( ) const

Definition at line 1083 of file qv4object.cpp.

References QV4::Scope::engine, get(), isArray(), QV4::StaticValue::isUndefined(), QV4::ExecutionEngine::symbol_isConcatSpreadable(), and QV4::Value::toBoolean().

+ Here is the call graph for this function:

◆ isExtensible()

bool QV4::Object::isExtensible ( ) const
inline

Definition at line 199 of file qv4object_p.h.

◆ metacall()

int QV4::Object::metacall ( QMetaObject::Call  call,
int  index,
void **  a 
)
inline

Definition at line 346 of file qv4object_p.h.

◆ ownPropertyKeys()

OwnPropertyKeyIterator * QV4::Object::ownPropertyKeys ( Value target) const
inline

Definition at line 329 of file qv4object_p.h.

◆ preventExtensions()

bool QV4::Object::preventExtensions ( )
inline

Definition at line 200 of file qv4object_p.h.

◆ propertyData()

const Value * QV4::Object::propertyData ( uint  index) const
inline

Definition at line 120 of file qv4object_p.h.

References d.

Referenced by QV4::QQmlContextWrapper::getPropertyAndBase(), setArrayLength(), QV4::ArgumentsObject::virtualGetLength(), and QV4::ArrayObject::virtualGetLength().

+ Here is the caller graph for this function:

◆ protoHasArray()

bool QV4::Object::protoHasArray ( )
inline

Definition at line 259 of file qv4object_p.h.

References engine.

Referenced by QV4::FunctionPrototype::method_apply().

+ Here is the caller graph for this function:

◆ push_back()

void Object::push_back ( const Value v)
inline

Definition at line 470 of file qv4object_p.h.

References arrayCreate(), arrayPut(), arrayReserve(), QV4::Managed::engine(), getLength(), Q_UNLIKELY, setArrayLengthUnchecked(), and QV4::ExecutionEngine::throwRangeError().

Referenced by QV4::ObjectPrototype::method_entries().

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

◆ put() [1/3]

bool QV4::Object::put ( PropertyKey  id,
const Value v,
Value receiver = nullptr 
)
inline

Definition at line 286 of file qv4object_p.h.

◆ put() [2/3]

bool QV4::Object::put ( StringOrSymbol name,
const Value v,
Value receiver = nullptr 
)
inline

Definition at line 280 of file qv4object_p.h.

◆ put() [3/3]

bool QV4::Object::put ( uint  idx,
const Value v,
Value receiver = nullptr 
)
inline

Definition at line 282 of file qv4object_p.h.

◆ putIndexed()

QT_DEPRECATED bool QV4::Object::putIndexed ( uint  idx,
const Value v 
)
inline

Definition at line 284 of file qv4object_p.h.

◆ putValue()

bool Object::putValue ( uint  memberIndex,
PropertyAttributes  attrs,
const Value value 
)

Definition at line 114 of file qv4object.cpp.

References QV4::JSCallArguments::args, attrs, QV4::Heap::InternalClass::engine, QV4::EngineBase::hasException, set, setProperty(), and QV4::JSCallArguments::thisObject.

+ Here is the call graph for this function:

◆ resolveLookupGetter()

ReturnedValue QV4::Object::resolveLookupGetter ( ExecutionEngine engine,
Lookup lookup 
) const
inline

Definition at line 341 of file qv4object_p.h.

References engine.

◆ resolveLookupSetter()

ReturnedValue QV4::Object::resolveLookupSetter ( ExecutionEngine engine,
Lookup lookup,
const Value value 
)
inline

Definition at line 343 of file qv4object_p.h.

References engine.

◆ set()

bool QV4::Object::set ( StringOrSymbol name,
const Value v,
ThrowOnFailure  shouldThrow 
)
inline

◆ setArrayAttributes()

void QV4::Object::setArrayAttributes ( uint  i,
PropertyAttributes  a 
)
inline

Definition at line 222 of file qv4object_p.h.

References QV4::Attr_Data, d, i, and Q_ASSERT.

Referenced by arraySet().

+ Here is the caller graph for this function:

◆ setArrayData()

void QV4::Object::setArrayData ( ArrayData a)
inline

Definition at line 123 of file qv4object_p.h.

References d, and engine.

Referenced by QV4::ArrayData::sort().

+ Here is the caller graph for this function:

◆ setArrayLength()

bool Object::setArrayLength ( uint  newLen)

Definition at line 1051 of file qv4object.cpp.

References arrayData(), arrayType(), getLength(), initSparseArray(), QV4::Managed::internalClass(), QV4::Managed::isArrayObject(), QV4::Heap::ArrayObject::LengthPropertyIndex, ok, propertyData(), Q_ASSERT, QV4::ArrayData::realloc(), and setArrayLengthUnchecked().

+ Here is the call graph for this function:

◆ setArrayLengthUnchecked()

void Object::setArrayLengthUnchecked ( uint  l)
inline

Definition at line 464 of file qv4object_p.h.

References QV4::Value::fromUInt32(), QV4::Managed::isArrayObject(), QV4::Heap::ArrayObject::LengthPropertyIndex, and setProperty().

Referenced by arraySet(), arraySet(), copyArrayData(), push_back(), and setArrayLength().

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

◆ setArrayType()

void QV4::Object::setArrayType ( ArrayData::Type  t)
inline

Definition at line 237 of file qv4object_p.h.

References d, and Q_ASSERT.

◆ setIndexed()

bool QV4::Object::setIndexed ( uint  idx,
const Value v,
ThrowOnFailure  shouldThrow 
)
inline

Definition at line 296 of file qv4object_p.h.

References e, engine, QString::number(), and ret.

+ Here is the call graph for this function:

◆ setInternalClass()

void Object::setInternalClass ( Heap::InternalClass ic)

Definition at line 28 of file qv4object.cpp.

References QV4::MemberData::allocate(), d, engine, QV4::Scope::engine, get(), i, Q_ASSERT, and setProperty().

+ Here is the call graph for this function:

◆ setProperty() [1/5]

void Object::setProperty ( const InternalClassEntry entry,
const Property p 
)

Definition at line 87 of file qv4object.cpp.

References setProperty().

Referenced by QV4::RegExpObject::initProperties(), and setArrayLengthUnchecked().

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

◆ setProperty() [2/5]

void QV4::Object::setProperty ( ExecutionEngine engine,
uint  index,
Heap::Base b 
) const
inline

Definition at line 130 of file qv4object_p.h.

References d, and engine.

◆ setProperty() [3/5]

void QV4::Object::setProperty ( ExecutionEngine engine,
uint  index,
Value  v 
) const
inline

Definition at line 129 of file qv4object_p.h.

References d, and engine.

◆ setProperty() [4/5]

void QV4::Object::setProperty ( uint  index,
Heap::Base b 
) const
inline

Definition at line 128 of file qv4object_p.h.

References d, and engine.

◆ setProperty() [5/5]

void QV4::Object::setProperty ( uint  index,
Value  v 
) const
inline

Definition at line 127 of file qv4object_p.h.

References d, and engine.

◆ setProtoFromNewTarget()

bool Object::setProtoFromNewTarget ( const Value newTarget)

Definition at line 1131 of file qv4object.cpp.

References QV4::Value::isFunctionObject(), QV4::StaticValue::isUndefined(), Q_ASSERT, and setPrototypeOf().

+ Here is the call graph for this function:

◆ setPrototypeOf()

bool QV4::Object::setPrototypeOf ( const Object p)
inline

Definition at line 202 of file qv4object_p.h.

Referenced by QV4::GeneratorPrototype::init(), QV4::TypedArrayPrototype::init(), and setProtoFromNewTarget().

+ Here is the caller graph for this function:

◆ setPrototypeUnchecked()

void Object::setPrototypeUnchecked ( const Object p)

Definition at line 264 of file qv4object.cpp.

◆ sparseBegin()

SparseArrayNode * QV4::Object::sparseBegin ( ) const
inline

Definition at line 256 of file qv4object_p.h.

References d.

◆ sparseEnd()

SparseArrayNode * QV4::Object::sparseEnd ( ) const
inline

Definition at line 257 of file qv4object_p.h.

References d.

◆ speciesConstructor()

const FunctionObject * Object::speciesConstructor ( Scope scope,
const FunctionObject defaultConstructor 
) const

Definition at line 1109 of file qv4object.cpp.

References QV4::Scope::engine, get(), QV4::ExecutionEngine::id_constructor(), QV4::StaticValue::isUndefined(), QV4::Value::objectValue(), Q_ASSERT, QV4::ExecutionEngine::symbol_species(), and QV4::ExecutionEngine::throwTypeError().

Referenced by QV4::SharedArrayBufferPrototype::slice(), and typedArraySpeciesCreate().

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

◆ virtualDefineOwnProperty()

bool Object::virtualDefineOwnProperty ( Managed m,
PropertyKey  id,
const Property p,
PropertyAttributes  attrs 
)
staticprotected

Definition at line 941 of file qv4object.cpp.

References QV4::Attr_Data, attrs, QV4::Property::copy(), QV4::Scope::engine, QV4::Property::fullyPopulated(), hasProperty(), o, qCWarning, QStringLiteral, QV4::Value::toQString(), and QV4::Property::value.

+ Here is the call graph for this function:

◆ virtualDeleteProperty()

bool Object::virtualDeleteProperty ( Managed m,
PropertyKey  id 
)
staticprotected

Definition at line 319 of file qv4object.cpp.

◆ virtualGet()

ReturnedValue Object::virtualGet ( const Managed m,
PropertyKey  id,
const Value receiver,
bool *  hasProperty 
)
staticprotected

Definition at line 309 of file qv4object.cpp.

◆ virtualGetLength()

qint64 Object::virtualGetLength ( const Managed m)
staticprotected

Definition at line 719 of file qv4object.cpp.

References QV4::Managed::engine(), QV4::Scope::engine, get(), and QV4::ExecutionEngine::id_length().

+ Here is the call graph for this function:

◆ virtualGetOwnProperty()

PropertyAttributes Object::virtualGetOwnProperty ( const Managed m,
PropertyKey  id,
Property p 
)
staticprotected

Definition at line 913 of file qv4object.cpp.

References QV4::Attr_Invalid, attrs, o, and Q_ASSERT.

◆ virtualGetPrototypeOf()

Heap::Object * Object::virtualGetPrototypeOf ( const Managed m)
staticprotected

Definition at line 1023 of file qv4object.cpp.

◆ virtualHasProperty()

bool Object::virtualHasProperty ( const Managed m,
PropertyKey  id 
)
staticprotected

Definition at line 897 of file qv4object.cpp.

References QV4::Attr_Invalid, and o.

◆ virtualInstanceOf()

ReturnedValue Object::virtualInstanceOf ( const Object typeObject,
const Value var 
)
staticprotected

Definition at line 727 of file qv4object.cpp.

References QV4::Value::as(), checkedInstanceOf(), QV4::Heap::InternalClass::engine, QV4::Managed::engine(), function, QV4::Managed::internalClass(), QV4::ExecutionEngine::throwTypeError(), and var.

+ Here is the call graph for this function:

◆ virtualIsExtensible()

bool Object::virtualIsExtensible ( const Managed m)
staticprotected

Definition at line 1010 of file qv4object.cpp.

◆ virtualMetacall()

int Object::virtualMetacall ( Object object,
QMetaObject::Call  call,
int  index,
void **  a 
)
staticprotected

This method is modeled after \l{QMetaObject::metacall}. It takes a JavaScript object and performs call on it, using index as identifier for the property/method/etc to be used and a as arguments. Like \l{QMetaObject::metacall} this method is overly generic in order to reduce the API surface. On a plain Object it does nothing and returns 0. Specific objects can override it and do some meaningful work. If the metacall succeeds they should return a non-0 value. Otherwise they should return 0.

Most prominently, \l QMetaObject::ReadProperty and \l QMetaObject::WriteProperty calls can be used to manipulate properties of QObjects and Q_GADGETs wrapped by QV4::QObjectWrapper, QV4::QQmlTypeWrapper and QV4::QQmlValueTypeWrapper. They can also be used to manipulate elements in QV4::Sequence.

Definition at line 850 of file qv4object.cpp.

References Q_UNUSED.

◆ virtualOwnPropertyKeys()

OwnPropertyKeyIterator * Object::virtualOwnPropertyKeys ( const Object m,
Value target 
)
staticprotected

Definition at line 402 of file qv4object.cpp.

References o.

◆ virtualPreventExtensions()

bool Object::virtualPreventExtensions ( Managed m)
staticprotected

Definition at line 1015 of file qv4object.cpp.

References o, and Q_ASSERT.

◆ virtualPut()

bool Object::virtualPut ( Managed m,
PropertyKey  id,
const Value value,
Value receiver 
)
staticprotected

Definition at line 314 of file qv4object.cpp.

◆ virtualResolveLookupGetter()

◆ virtualResolveLookupSetter()

◆ virtualSetPrototypeOf()

bool Object::virtualSetPrototypeOf ( Managed m,
const Object proto 
)
staticprotected

Definition at line 1028 of file qv4object.cpp.

References QV4::Heap::InternalClass::changePrototype(), QV4::Heap::InternalClass::isExtensible(), QV4::Heap::InternalClass::isLocked(), o, QV4::Heap::InternalClass::prototype, and Q_ASSERT.

+ Here is the call graph for this function:

◆ vtable()

const VTable * QV4::Object::vtable ( ) const
inline

Definition at line 132 of file qv4object_p.h.

References d.

Referenced by QV4::ExecutionEngine::ExecutionEngine(), and isArray().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ ObjectIterator

friend struct ObjectIterator
friend

Definition at line 376 of file qv4object_p.h.

◆ ObjectPrototype

friend struct ObjectPrototype
friend

Definition at line 377 of file qv4object_p.h.


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