From a6814650232825663f33fe4f11a362c397385350 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 23 May 2016 15:20:29 +0200 Subject: Get rid of QQmlVMEMetaData It is unused now and we can remove it as well as its QByteArray based storage. The non-emptyness of the meta-data QByteArray was also used to indicate whether it is necessary to create a VME meta-object when instantiating an object. This bit is now folded into the flag of the QFlagPointer storing the property caches. Change-Id: I3c3604c61ff16a4e76912e68b1c19afdb0f2bd9d Reviewed-by: Lars Knoll --- src/qml/compiler/qqmltypecompiler_p.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/qml/compiler/qqmltypecompiler_p.h') diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h index 273ba01a88..968902dae1 100644 --- a/src/qml/compiler/qqmltypecompiler_p.h +++ b/src/qml/compiler/qqmltypecompiler_p.h @@ -99,10 +99,8 @@ public: QHash *resolvedTypes(); QList *qmlObjects(); int rootObjectIndex() const; - void setPropertyCaches(const QVector &caches); - const QVector &propertyCaches() const; - void setVMEMetaObjects(const QVector &metaObjects); - QVector *vmeMetaObjects() const; + void setPropertyCaches(const QQmlPropertyCacheVector &caches); + const QQmlPropertyCacheVector &propertyCaches() const; QHash *objectIndexToIdForRoot(); QHash > *objectIndexToIdPerComponent(); QHash *customParserBindings(); @@ -149,15 +147,14 @@ public: bool buildMetaObjects(); protected: bool buildMetaObjectRecursively(int objectIndex, int referencingObjectIndex, const QV4::CompiledData::Binding *instantiatingBinding); - bool ensureMetaObject(int objectIndex); + bool ensureVMEMetaObject(int objectIndex); bool createMetaObject(int objectIndex, const QmlIR::Object *obj, QQmlPropertyCache *baseTypeCache); QQmlEnginePrivate *enginePrivate; const QList &qmlObjects; const QQmlImports *imports; QHash *resolvedTypes; - QVector vmeMetaObjects; - QVector propertyCaches; + QQmlPropertyCacheVector propertyCaches; }; // "Converts" signal expressions to full-fleged function declarations with @@ -181,7 +178,7 @@ private: const QHash &customParsers; const QHash &resolvedTypes; const QSet &illegalNames; - const QVector &propertyCaches; + const QQmlPropertyCacheVector &propertyCaches; }; // ### This will go away when the codegen resolves all enums to constant expressions @@ -208,7 +205,7 @@ private: const QList &qmlObjects; - const QVector propertyCaches; + const QQmlPropertyCacheVector propertyCaches; const QQmlImports *imports; QHash *resolvedTypes; }; @@ -236,7 +233,7 @@ public: void annotateBindingsToAliases(); private: const QList &qmlObjects; - const QVector propertyCaches; + const QQmlPropertyCacheVector propertyCaches; }; class QQmlScriptStringScanner : public QQmlCompilePass @@ -248,7 +245,7 @@ public: private: const QList &qmlObjects; - const QVector propertyCaches; + const QQmlPropertyCacheVector propertyCaches; }; class QQmlComponentAndAliasResolver : public QQmlCompilePass @@ -282,8 +279,7 @@ protected: QList _objectsWithAliases; QHash *resolvedTypes; - QVector propertyCaches; - QVector *vmeMetaObjectData; + QQmlPropertyCacheVector propertyCaches; QHash *objectIndexToIdForRoot; QHash > *objectIndexToIdPerComponent; }; @@ -312,7 +308,7 @@ private: const QV4::CompiledData::Unit *qmlUnit; const QHash &resolvedTypes; const QHash &customParsers; - const QVector &propertyCaches; + const QQmlPropertyCacheVector &propertyCaches; const QHash > objectIndexToIdPerComponent; QHash *customParserBindingsPerObject; @@ -340,7 +336,7 @@ private: const QHash &resolvedTypes; const QHash &customParsers; const QList &qmlObjects; - const QVector &propertyCaches; + const QQmlPropertyCacheVector &propertyCaches; QmlIR::JSCodeGen * const v4CodeGen; }; @@ -355,7 +351,7 @@ private: void mergeDefaultProperties(int objectIndex); const QList &qmlObjects; - const QVector &propertyCaches; + const QQmlPropertyCacheVector &propertyCaches; }; class QQmlJavaScriptBindingExpressionSimplificationPass : public QQmlCompilePass, public QV4::IR::StmtVisitor -- cgit v1.2.3