summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiler.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-08-04 03:18:37 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-08-04 03:34:52 (GMT)
commit588093b3e12dd5039bcc4ee545d9d9112d25394f (patch)
tree2f401dd36f44004fb06cead7846965dad3b5738e /src/declarative/qml/qmlcompiler.cpp
parentdbda9ae7996d090cda296074fc02842f1dd2e0f7 (diff)
downloadQt-588093b3e12dd5039bcc4ee545d9d9112d25394f.zip
Qt-588093b3e12dd5039bcc4ee545d9d9112d25394f.tar.gz
Qt-588093b3e12dd5039bcc4ee545d9d9112d25394f.tar.bz2
Improve performance by separating id and context properties
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 091b7bb..197bd44 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -603,6 +603,7 @@ void QmlCompiler::compileTree(Object *tree)
init.line = 0;
init.init.bindingsSize = compileState.bindings.count();
init.init.parserStatusSize = compileState.parserStatusCount;
+ init.init.idSize = compileState.ids.count();
output->bytecode << init;
genObject(tree);
@@ -774,6 +775,7 @@ void QmlCompiler::genObject(QmlParser::Object *obj)
id.type = QmlInstruction::SetId;
id.line = -1;
id.setId.value = output->indexForString(obj->id);
+ id.setId.index = obj->idIndex;
output->bytecode << id;
}
@@ -917,6 +919,7 @@ void QmlCompiler::genComponent(QmlParser::Object *obj)
init.type = QmlInstruction::Init;
init.init.bindingsSize = compileState.bindings.count();
init.init.parserStatusSize = compileState.parserStatusCount;
+ init.init.idSize = compileState.ids.count();
init.line = obj->location.start.line;
output->bytecode << init;
@@ -936,7 +939,8 @@ void QmlCompiler::genComponent(QmlParser::Object *obj)
QmlInstruction id;
id.type = QmlInstruction::SetId;
id.line = -1;
- id.setId.value = output->indexForString(obj->id);;
+ id.setId.value = output->indexForString(obj->id);
+ id.setId.index = obj->idIndex;
output->bytecode << id;
}
}