From cb2ac154273a8c07a1e4a14246ae22f6e0deaeda Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 7 Jan 2014 17:04:18 +0100 Subject: [new compiler] Cleanups Move all compilation phase related sub-classes (property cache generator, component and alias resolver, etc.) together into qqmltypecompiler.cpp Change-Id: I598c801d9434623fc8e6338dec11e4d4ee6d7232 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlobjectcreator_p.h | 71 --------------------------------------- 1 file changed, 71 deletions(-) (limited to 'src/qml/qml/qqmlobjectcreator_p.h') diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index 2d776058ca..a8907fb762 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -53,77 +53,6 @@ QT_BEGIN_NAMESPACE class QQmlAbstractBinding; struct QQmlTypeCompiler; -class QQmlPropertyCacheCreator : public QQmlCompilePass -{ - Q_DECLARE_TR_FUNCTIONS(QQmlPropertyCacheCreator) -public: - QQmlPropertyCacheCreator(QQmlTypeCompiler *typeCompiler); - - bool create(const QtQml::QmlObject *obj, QQmlPropertyCache **cache, QByteArray *vmeMetaObjectData); - -protected: - QQmlEnginePrivate *enginePrivate; - const QQmlImports *imports; - QHash *resolvedTypes; -}; - -class QQmlComponentAndAliasResolver : public QQmlCompilePass -{ - Q_DECLARE_TR_FUNCTIONS(QQmlAnonymousComponentResolver) -public: - QQmlComponentAndAliasResolver(QQmlTypeCompiler *typeCompiler); - - bool resolve(); - -protected: - void findAndRegisterImplicitComponents(const QtQml::QmlObject *obj, int objectIndex); - bool collectIdsAndAliases(int objectIndex); - bool resolveAliases(); - - QQmlEnginePrivate *enginePrivate; - QQmlJS::MemoryPool *pool; - - QList *qmlObjects; - const int indexOfRootObject; - - // indices of the objects that are actually Component {} - QVector componentRoots; - // indices of objects that are the beginning of a new component - // scope. This is sorted and used for binary search. - QVector componentBoundaries; - - int _componentIndex; - QHash _idToObjectIndex; - QHash *_objectIndexToIdInScope; - QList _objectsWithAliases; - - QHash *resolvedTypes; - const QList propertyCaches; - QList *vmeMetaObjectData; - QHash *objectIndexToIdForRoot; - QHash > *objectIndexToIdPerComponent; -}; - -class QQmlPropertyValidator : public QQmlCompilePass -{ - Q_DECLARE_TR_FUNCTIONS(QQmlPropertyValidator) -public: - QQmlPropertyValidator(QQmlTypeCompiler *typeCompiler); - - bool validate(); - -private: - bool validateObject(const QV4::CompiledData::Object *obj, int objectIndex, QQmlPropertyCache *propertyCache); - - bool isComponent(int objectIndex) const { return objectIndexToIdPerComponent.contains(objectIndex); } - - const QV4::CompiledData::QmlUnit *qmlUnit; - const QHash &resolvedTypes; - const QList &propertyCaches; - const QHash > objectIndexToIdPerComponent; - QHash *customParserData; -}; - class QmlObjectCreator { Q_DECLARE_TR_FUNCTIONS(QmlObjectCreator) -- cgit v1.2.3