aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlirbuilder_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-05-25 10:25:25 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-05-26 11:33:00 +0000
commit8457ca1b3dfb048acdb4426960ad7ee7c8227ed4 (patch)
treed33256028f22b5a28a9ea6fda3b98bedc5aeebab /src/qml/compiler/qqmlirbuilder_p.h
parent899c1ef0f7574019f1b41a922b2ba10614df130f (diff)
Simplify object to id-in-context mapping
By storing the calculated integer id for an id-named object in CompiledData::Object we can simplify the code and replace a hash table with a plain vector. Change-Id: I4a84cdd00e98766d603d152e5a6574b232771a02 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder_p.h')
-rw-r--r--src/qml/compiler/qqmlirbuilder_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h
index 1d9b4c807a..38fe23b150 100644
--- a/src/qml/compiler/qqmlirbuilder_p.h
+++ b/src/qml/compiler/qqmlirbuilder_p.h
@@ -279,7 +279,8 @@ struct Q_QML_PRIVATE_EXPORT Object
Q_DECLARE_TR_FUNCTIONS(Object)
public:
quint32 inheritedTypeNameIndex;
- quint32 idIndex;
+ quint32 idNameIndex;
+ int id;
int indexOfDefaultPropertyOrAlias;
bool defaultPropertyIsAlias;
int flags;
@@ -302,7 +303,7 @@ public:
// specified object. Used for declarations inside group properties.
Object *declarationsOverride;
- void init(QQmlJS::MemoryPool *pool, int typeNameIndex, int id, const QQmlJS::AST::SourceLocation &location = QQmlJS::AST::SourceLocation());
+ void init(QQmlJS::MemoryPool *pool, int typeNameIndex, int idIndex, const QQmlJS::AST::SourceLocation &location = QQmlJS::AST::SourceLocation());
QString sanityCheckFunctionNames(const QSet<QString> &illegalNames, QQmlJS::AST::SourceLocation *errorLocation);