aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v4
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-07-04 12:41:21 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-04 07:27:11 +0200
commit71114ff964582f58e68d68bf0301cd42110751cc (patch)
treee3ad3d3e1af59ef9dc32aa28ce12a6d70a89a03a /src/declarative/qml/v4
parent8371e37e47967848ec470a4b34f46b1c8591c3c1 (diff)
Optimize QDeclarativePropertyCache
The creation of QDeclarativePropertyCaches contributes significantly to the initial compile time of a QML app. Change-Id: Iac5d1578155dfa4678a0e21eab51f4c1675762a9 Reviewed-on: http://codereview.qt.nokia.com/1026 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/declarative/qml/v4')
-rw-r--r--src/declarative/qml/v4/qdeclarativev4irbuilder.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/declarative/qml/v4/qdeclarativev4irbuilder.cpp b/src/declarative/qml/v4/qdeclarativev4irbuilder.cpp
index 928fea4487..9232292c48 100644
--- a/src/declarative/qml/v4/qdeclarativev4irbuilder.cpp
+++ b/src/declarative/qml/v4/qdeclarativev4irbuilder.cpp
@@ -472,7 +472,7 @@ bool QDeclarativeV4IRBuilder::visit(AST::IdentifierExpression *ast)
return false;
}
- if (data && !(data->flags & QDeclarativePropertyCache::Data::IsFunction)) {
+ if (data && !data->isFunction()) {
IR::Type irType = irTypeFromVariantType(data->propType, m_engine, metaObject);
_expr.code = _block->SYMBOL(irType, name, metaObject, data->coreIndex, IR::Name::ScopeStorage, line, column);
found = true;
@@ -493,7 +493,7 @@ bool QDeclarativeV4IRBuilder::visit(AST::IdentifierExpression *ast)
return false;
}
- if (data && !(data->flags & QDeclarativePropertyCache::Data::IsFunction)) {
+ if (data && !data->isFunction()) {
IR::Type irType = irTypeFromVariantType(data->propType, m_engine, metaObject);
_expr.code = _block->SYMBOL(irType, name, metaObject, data->coreIndex, IR::Name::RootStorage, line, column);
found = true;
@@ -611,10 +611,10 @@ bool QDeclarativeV4IRBuilder::visit(AST::FieldMemberExpression *ast)
QDeclarativePropertyCache *cache = m_engine->cache(attachedMeta);
QDeclarativePropertyCache::Data *data = cache->property(name);
- if (!data || data->flags & QDeclarativePropertyCache::Data::IsFunction)
+ if (!data || data->isFunction())
return false; // Don't support methods (or non-existing properties ;)
- if(!(data->flags & QDeclarativePropertyCache::Data::IsFinal)) {
+ if(!data->isFinal()) {
if (qmlVerboseCompiler())
qWarning() << "*** non-final attached property:"
<< (baseName->id + QLatin1String(".") + ast->name->asString());
@@ -633,7 +633,7 @@ bool QDeclarativeV4IRBuilder::visit(AST::FieldMemberExpression *ast)
QDeclarativePropertyCache::Data *data = cache->property(name);
- if (!data || data->flags & QDeclarativePropertyCache::Data::IsFunction)
+ if (!data || data->isFunction())
return false; // Don't support methods (or non-existing properties ;)
if (data->revision != 0) {
@@ -657,10 +657,10 @@ bool QDeclarativeV4IRBuilder::visit(AST::FieldMemberExpression *ast)
QDeclarativePropertyCache::Data *data = cache->property(name);
- if (!data || data->flags & QDeclarativePropertyCache::Data::IsFunction)
+ if (!data || data->isFunction())
return false; // Don't support methods (or non-existing properties ;)
- if(!(data->flags & QDeclarativePropertyCache::Data::IsFinal)) {
+ if(!data->isFinal()) {
if (qmlVerboseCompiler())
qWarning() << "*** non-final property access:"
<< (baseName->id + QLatin1String(".") + ast->name->asString());