aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4jsir.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-11-02 20:35:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-12 18:20:30 +0100
commit7a092000169a8e9d537f3d341ef48277397f997d (patch)
treef29f189d57e4923dff2decfd073b8e04f4a211a8 /src/qml/compiler/qv4jsir.cpp
parent7c6d2d78fe0997dfebba5569f097bdacbba5a861 (diff)
Fix property dependency generation for accelerated QML QObject properties
The previous approach of collecting the dependencies through an IR visitor doesn't work, because it relies on a fixed structure - for example MEMBER(NAME, prop) - which we can't guarantee (it's usually MEMBER(TEMP, prop)). But it turns out that we can only pre-calculate dependencies for context, scope or id properties, so we can do that right away in the QML specific JS codegen, store that information in the IR function and use it from there in the data structure generator as well as in the isel as a parameter to getQObjectProperty to tell the run-time whether capture is required or not. Change-Id: I33711c3420d6534c653c2a6a4284f0fc12e941cf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4jsir.cpp')
-rw-r--r--src/qml/compiler/qv4jsir.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/qml/compiler/qv4jsir.cpp b/src/qml/compiler/qv4jsir.cpp
index f8189b673d..75261b2469 100644
--- a/src/qml/compiler/qv4jsir.cpp
+++ b/src/qml/compiler/qv4jsir.cpp
@@ -1042,31 +1042,6 @@ void CloneExpr::visitMember(Member *e)
Q_ASSERT(!"Unimplemented!");
}
-void QmlDependenciesCollector::visitMember(Member *e) {
- e->base->accept(this);
- if (e->type == Member::MemberOfQmlContext) {
- V4IR::Name *base = e->base->asName();
- Q_ASSERT(base);
- if (base->builtin == V4IR::Name::builtin_qml_id_scope)
- _usedIdObjects.insert(e->memberIndex);
- } else if (e->type == Member::MemberOfQObject
- && !e->property->isFunction()) { // only non-functions have notifyIndex
-
- if (Name *base = e->base->asName()) {
- if (base->builtin == Name::builtin_qml_context_object)
- _usedContextProperties.insert(e->property);
- else if (base->builtin == Name::builtin_qml_scope_object)
- _usedScopeProperties.insert(e->property);
- }
- }
-}
-
-void QmlDependenciesCollector::visitPhi(Phi *s) {
- s->targetTemp->accept(this);
- foreach (Expr *e, s->d->incoming)
- e->accept(this);
-}
-
} // end of namespace IR
} // end of namespace QQmlJS