aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_p.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-10-29 11:59:54 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-31 21:49:21 +0100
commitbbc36ebbc38de276b85947b65d89897bf430add5 (patch)
tree31c4a4754210fe3e97391c9dffdc31e105885390 /src/qml/compiler/qv4isel_p.cpp
parent7d850df7e68e0eab0f07d5f7a03050175080fb81 (diff)
Speed up lookups of imported scripts
The QQmlContextData stores the JS objects of imported scripts in a QList<PersistentValue>. Instead of indexing into that list, this patch changes ctxt->importedScripts to be a JavaScript array, that in the IR we can index via subscript. Change-Id: Ie2c35fb5294a20a0b7084bb51d19671a27195fec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_p.cpp')
-rw-r--r--src/qml/compiler/qv4isel_p.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp
index 3b7509d7bf..0afd25315e 100644
--- a/src/qml/compiler/qv4isel_p.cpp
+++ b/src/qml/compiler/qv4isel_p.cpp
@@ -107,6 +107,8 @@ void IRDecoder::visitMove(V4IR::Move *s)
loadQmlContextObject(t);
else if (n->builtin == V4IR::Name::builtin_qml_scope_object)
loadQmlScopeObject(t);
+ else if (n->builtin == V4IR::Name::builtin_qml_imported_scripts_object)
+ loadQmlImportedScripts(t);
else
getActivationProperty(n, t);
return;
@@ -147,9 +149,6 @@ void IRDecoder::visitMove(V4IR::Move *s)
if (base->builtin == V4IR::Name::builtin_qml_id_scope) {
loadQmlIdObject(m->memberIndex, t);
return;
- } else if (base->builtin == V4IR::Name::builtin_qml_imported_scripts_scope) {
- loadQmlImportedScript(m->memberIndex, t);
- return;
}
} else if (m->type == V4IR::Member::MemberOfQObject) {
getQObjectProperty(m->base, m->property->coreIndex, t);