|
| static QV4::ReturnedValue | virtualGet (const QV4::Managed *that, PropertyKey idid, const Value *receiver, bool *hasProperty) |
| static qint64 | virtualGetLength (const Managed *mm) |
| static bool | virtualPut (Managed *that, PropertyKey idid, const QV4::Value &valuevalue, Value *receiver) |
| static bool | virtualDeleteProperty (QV4::Managed *that, PropertyKey idid) |
| static bool | virtualIsEqualTo (Managed *that, Managed *other) |
| static QV4::OwnPropertyKeyIterator * | virtualOwnPropertyKeys (const Object *mm, Value *targettarget) |
| static int | virtualMetacall (Object *objectobject, QMetaObject::Call call, int indexindex, void **aa) |
| static bool | shouldConnect (Heap::ReferenceObject *refref) |
| static void | connect (Heap::ReferenceObject *refref) |
| template<typename HeapObject> |
| static bool | readReference (HeapObject *refref) |
| template<typename HeapObject> |
| static bool | writeBack (HeapObject *refref, int internalIndex=AllProperties) |
| template<typename HeapObject> |
| static HeapObject * | detached (HeapObject *refref) |
| static ReturnedValue | getValue (const Value *thisObject, const Value &vv, PropertyAttributes attrs) |
| static ReturnedValue | getValueAccessor (const Value *thisObject, const Value &vv, PropertyAttributes attrs) |
| static ReturnedValue | checkedInstanceOf (ExecutionEngine *engine, const FunctionObject *typeObject, const Value &var) |
| static QString | typeToString (Type) |
| static constexpr Value | fromStaticValue (StaticValue staticValue) |
| static constexpr Value | undefined () |
| static Value | fromHeapObject (HeapBasePtr mm) |
| static bool | toBooleanImpl (Value valval) |
| static double | toNumberImpl (Value vv) |
| static Heap::String * | toString (ExecutionEngine *e, Value valval) |
| static Heap::Object * | toObject (ExecutionEngine *e, Value valval) |
| static constexpr Value | fromReturnedValue (ReturnedValue valval) |
| 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 bb) |
| 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 int | valueOffset () |
| static int | tagOffset () |
| static constexpr quint64 | tagValue (quint32 tag, quint32 valuevalue) |
| static constexpr quint64 | tagBitMask (TagBit bit) |
| static bool | integerCompatible (StaticValue aa, StaticValue bb) |
| static bool | bothDouble (StaticValue aa, StaticValue bb) |
| static QV4_NEARLY_ALWAYS_INLINE bool | isInt32 (double d) |
| static constexpr StaticValue | fromReturnedValue (ReturnedValue valval) |
| static constexpr StaticValue | emptyValue () |
| static constexpr StaticValue | fromBoolean (bool bb) |
| 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) |
|
| enum | { NInlineProperties = 2
} |
| enum | { IsObject = true
, GetterOffset = 0
, SetterOffset = 1
} |
| enum | ThrowOnFailure { DoThrowOnRejection
, DoNotThrow
} |
| enum | {
IsExecutionContext = false
, IsString = false
, IsStringOrSymbol = false
, IsObject = false
,
IsTailCallable = 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
, Type_V4QObjectWrapper
, Type_QMLTypeWrapper
,
Type_V4ReferenceObject
, Type_QMLValueTypeWrapper
, Type_MemberData
, Type_ArrayData
,
Type_StringOrSymbol
} |
| using | ManagedPtr = Managed * |
| 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 |
| void | setInternalClass (Heap::InternalClass *ic) |
| const Value * | propertyData (uint indexindex) const |
| Heap::ArrayData * | arrayData () const |
| void | setArrayData (ArrayData *aa) |
| void | getProperty (const InternalClassEntry &entryentry, Property *pp) const |
| void | setProperty (const InternalClassEntry &entryentry, const Property *pp) |
| void | setProperty (uint indexindex, Value vv) const |
| void | setProperty (uint indexindex, Heap::Base *bb) const |
| void | setProperty (ExecutionEngine *engine, uint indexindex, Value vv) const |
| void | setProperty (ExecutionEngine *engine, uint indexindex, Heap::Base *bb) const |
| const VTable * | vtable () const |
| PropertyAttributes | getOwnProperty (PropertyKey idid, Property *pp=nullptr) const |
| PropertyIndex | getValueOrSetter (PropertyKey idid, PropertyAttributes *attrs) |
| bool | hasProperty (PropertyKey idid) const |
| bool | defineOwnProperty (PropertyKey idid, const Property *pp, PropertyAttributes attrs) |
| ReturnedValue | getValue (const Value &vv, PropertyAttributes attrs) const |
| ReturnedValue | getValueByIndex (uint propertyIndex) const |
| bool | putValue (uint memberIndex, PropertyAttributes attrs, const Value &valuevalue) |
| void | defineDefaultProperty (StringOrSymbol *namename, const Value &valuevalue, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable) |
| void | defineDefaultProperty (const QString &namename, const Value &valuevalue, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable) |
| void | defineDefaultProperty (const QString &namename, VTable::Call code, int argumentCount=0, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable) |
| void | defineDefaultProperty (StringOrSymbol *namename, VTable::Call code, int argumentCount=0, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable) |
| void | defineAccessorProperty (const QString &namename, VTable::Call getter, VTable::Call setter) |
| void | defineAccessorProperty (StringOrSymbol *namename, VTable::Call getter, VTable::Call setter) |
| void | defineReadonlyProperty (const QString &namename, const Value &valuevalue) |
| void | defineReadonlyProperty (String *namename, const Value &valuevalue) |
| void | defineReadonlyConfigurableProperty (const QString &namename, const Value &valuevalue) |
| void | defineReadonlyConfigurableProperty (StringOrSymbol *namename, const Value &valuevalue) |
| void | addSymbolSpecies () |
| void | insertMember (StringOrSymbol *ss, const Value &vv, PropertyAttributes attributes=Attr_Data) |
| void | insertMember (StringOrSymbol *ss, const Property *pp, PropertyAttributes attributes) |
| bool | isExtensible () const |
| bool | preventExtensions () |
| Heap::Object * | getPrototypeOf () const |
| bool | setPrototypeOf (const Object *pp) |
| void | setPrototypeUnchecked (const Object *pp) |
| void | copyArrayData (Object *other) |
| bool | setArrayLength (uint newLen) |
| void | setArrayLengthUnchecked (uint l) |
| void | arraySet (uint indexindex, const Property *pp, PropertyAttributes attributes=Attr_Data) |
| void | arraySet (uint indexindex, const Value &valuevalue) |
| bool | arrayPut (uint indexindex, const Value &valuevalue) |
| bool | arrayPut (uint indexindex, const Value *valuesvalues, uint nn) |
| void | setArrayAttributes (uint i, PropertyAttributes aa) |
| void | push_back (const Value &vv) |
| ArrayData::Type | arrayType () const |
| void | setArrayType (ArrayData::Type tt) |
| void | arrayReserve (uint nn) |
| void | arrayCreate () |
| void | initSparseArray () |
| SparseArrayNode * | sparseBegin () const |
| SparseArrayNode * | sparseEnd () const |
| bool | protoHasArray () |
| ReturnedValue | get (StringOrSymbol *namename, 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 idid, const Value *receiver=nullptr, bool *hasProperty=nullptr) const |
| bool | put (StringOrSymbol *namename, const Value &vv, Value *receiver=nullptr) |
| bool | put (uint idx, const Value &vv, Value *receiver=nullptr) |
| QT_DEPRECATED bool | putIndexed (uint idx, const Value &vv) |
| bool | put (PropertyKey idid, const Value &vv, Value *receiver=nullptr) |
| bool | setIndexed (uint idx, const Value &vv, ThrowOnFailure shouldThrow) |
| bool | set (StringOrSymbol *namename, const Value &vv, ThrowOnFailure shouldThrow) |
| bool | deleteProperty (PropertyKey idid) |
| OwnPropertyKeyIterator * | ownPropertyKeys (Value *targettarget) const |
| qint64 | getLength () const |
| ReturnedValue | instanceOf (const Value &var) const |
| bool | isConcatSpreadable () const |
| bool | isArray () const |
| const FunctionObject * | speciesConstructor (Scope &scope, const FunctionObject *defaultConstructor) const |
| bool | setProtoFromNewTarget (const Value *newTarget) |
| ReturnedValue | resolveLookupGetter (ExecutionEngine *engine, Lookup *lookup) const |
| bool | resolveLookupSetter (ExecutionEngine *engine, Lookup *lookup, const Value &valuevalue) |
| int | metacall (QMetaObject::Call call, int indexindex, void **aa) |
| Heap::InternalClass * | internalClass () const |
| const VTable * | vtable () const |
| ExecutionEngine * | engine () const |
| bool | isV4SequenceType () const |
| bool | isV4QObjectWrapper () 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::Base * | heapObject () const |
| template<typename T> |
| T * | cast () |
| template<typename T> |
| const T * | cast () const |
| bool | isString () const |
| bool | isStringOrSymbol () const |
| bool | isSymbol () const |
| bool | isObject () const |
| bool | isFunctionObject () const |
| QML_NEARLY_ALWAYS_INLINE String * | stringValue () const |
| QML_NEARLY_ALWAYS_INLINE StringOrSymbol * | stringOrSymbolValue () const |
| QML_NEARLY_ALWAYS_INLINE Symbol * | symbolValue () const |
| QML_NEARLY_ALWAYS_INLINE Object * | objectValue () 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::String * | toString (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) const |
| Value & | operator= (const ScopedValue &vv) |
| Value & | operator= (ReturnedValue vv) |
| Value & | operator= (ManagedPtr mm) |
| Value & | operator= (HeapBasePtr o) |
| template<typename T> |
| Value & | operator= (const Scoped< T > &tt) |
| template<> |
| const ArrayObject * | as () const |
| template<> |
| const FunctionObject * | as () const |
| template<> |
| const StringOrSymbol * | as () const |
| template<> |
| const String * | as () const |
| template<> |
| const DateObject * | as () const |
| template<> |
| const Managed * | as () const |
| template<> |
| const Object * | as () const |
| template<> |
| const ErrorObject * | as () const |
| template<> |
| const UrlObject * | as () const |
| template<> |
| const UrlSearchParamsObject * | as () const |
| | StaticValue ()=default |
| constexpr | StaticValue (quint64 valval) |
| StaticValue & | operator= (ReturnedValue vv) |
| template<typename Value> |
| StaticValue & | operator= (const Value &) |
| template<typename Value> |
| const Value & | asValue () const |
| template<typename Value> |
| Value & | asValue () |
| QV4_NEARLY_ALWAYS_INLINE constexpr quint64 & | rawValueRef () |
| 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 valuevalue) |
| 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 |
| ReturnedValue * | data_ptr () |
| constexpr ReturnedValue | asReturnedValue () const |
| template<> |
| StaticValue & | operator= (const Value &valuevalue) |
| template<typename Managed> |
| StaticValue & | operator= (const Managed &mm) |
| template<> |
| Value & | asValue () |
| template<> |
| const Value & | asValue () const |
| quint64 | _val |
| static constexpr const int | AllProperties = -1 |
| 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 ReturnedValue | virtualGet (const Managed *mm, PropertyKey idid, const Value *receiver, bool *hasProperty) |
| static bool | virtualPut (Managed *mm, PropertyKey idid, const Value &valuevalue, Value *receiver) |
| static bool | virtualDeleteProperty (Managed *mm, PropertyKey idid) |
| static bool | virtualHasProperty (const Managed *mm, PropertyKey idid) |
| static PropertyAttributes | virtualGetOwnProperty (const Managed *mm, PropertyKey idid, Property *pp) |
| static bool | virtualDefineOwnProperty (Managed *mm, PropertyKey idid, const Property *pp, PropertyAttributes attrs) |
| static bool | virtualIsExtensible (const Managed *mm) |
| static bool | virtualPreventExtensions (Managed *) |
| static Heap::Object * | virtualGetPrototypeOf (const Managed *) |
| static bool | virtualSetPrototypeOf (Managed *, const Object *) |
| static OwnPropertyKeyIterator * | virtualOwnPropertyKeys (const Object *mm, Value *targettarget) |
| static qint64 | virtualGetLength (const Managed *mm) |
| static ReturnedValue | virtualInstanceOf (const Object *typeObject, const Value &var) |
| static ReturnedValue | virtualResolveLookupGetter (const Object *objectobject, ExecutionEngine *engine, Lookup *lookup) |
| static bool | virtualResolveLookupSetter (Object *objectobject, ExecutionEngine *engine, Lookup *lookup, const Value &valuevalue) |
| static int | virtualMetacall (Object *objectobject, QMetaObject::Call call, int indexindex, void **aa) |
| static bool | virtualIsEqualTo (Managed *mm, Managed *other) |
| 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::CallWithMetaTypes | virtualConvertAndCall = nullptr |
| static constexpr VTable::ResolveLookupGetter | virtualResolveLookupGetter = nullptr |
| static constexpr VTable::ResolveLookupSetter | virtualResolveLookupSetter = nullptr |
| static constexpr VTable::Metacall | virtualMetacall = nullptr |
A Sequence stores the contents of a sequential container and makes them acccessible to the JavaScript engine. It behaves mostly like a regular JavaScript array. The entries of the container are exposed as array elements.
Sequence is a ReferenceObject. Therefore it writes back its contents to the property it was retrieved from whenever it changes. It also re-reads the property whenever that one changes.
As long as a Sequence is attached to a property this way, it is the responsibility of the property's surrounding (C++) object to keep the contents valid. It has to, for example, track pointers to QObjects potentially deleted in other places so that they don't become dangling.
However, the Sequence can also be detached. This happens predominantly by assigning it to a QML-declared property. In that case, it becomes the Sequence's responsibility to track its contents. To do so, it does not necessarily keep an actual instance of the original container in this case, but may rather stores its contents as actual JavaScript array elements. This includes QObjectWrappers for all QObject pointers it may contain. The contents are then marked like all JavaScript array elements when the garbage collector runs, and QObjectWrapper also guards against external deletion. There is no property to read or write back in this case, and neither does the internal container need to be updated. Therefore, the objects stored as array elements are created detached and won't read or write back.
For element types that don't need to be marked, Sequence will still use the original container for storage, even in the detached case. This is usually more efficient because because it saves some data conversion. The only types that need to be marked are pointers to QObject-derived types, either stored as-is or hidden inside QVariant. Whenever the container cannot possibly hold such elements (directly or indirectly), the original container is used.
Definition at line 143 of file qv4sequenceobject_p.h.