diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-06-04 14:43:38 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-09 01:36:23 +0200 |
commit | 49a3883e86b61d8facfeea9c43037d484cb50b92 (patch) | |
tree | ba1afdf6ddc3740f26c5e3c95cb2fffeb953abb4 /src/qml/qml/v8 | |
parent | 3095493a4ce4bec11b9381a3d1d23f17b313332c (diff) |
Use V4 binding for non-final properties where possible
When a property referenced in a binding is not marked as final, do not
automatically abort optimization. Instead generate both V4 and V8
binidngs, and only fall back to the V8 binding if necessary at run time.
Change-Id: I1bcc7e2b495935c5d519a9a223f640c1972cdb4e
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qml/qml/v8')
-rw-r--r-- | src/qml/qml/v8/qv8bindings.cpp | 3 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8bindings_p.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/qml/v8/qv8bindings.cpp b/src/qml/qml/v8/qv8bindings.cpp index 00134c5a51..5a6abdbe22 100644 --- a/src/qml/qml/v8/qv8bindings.cpp +++ b/src/qml/qml/v8/qv8bindings.cpp @@ -296,7 +296,8 @@ QV8Bindings::configBinding(QObject *target, QObject *scope, rv->setNotifyOnValueChanged(true); rv->parent = this; - addref(); // This is decremented in Binding::destroy() + if (!i->isFallback) + addref(); // This is decremented in Binding::destroy() return rv; } diff --git a/src/qml/qml/v8/qv8bindings_p.h b/src/qml/qml/v8/qv8bindings_p.h index fc6617b516..c7c2a3c960 100644 --- a/src/qml/qml/v8/qv8bindings_p.h +++ b/src/qml/qml/v8/qv8bindings_p.h @@ -129,6 +129,8 @@ public: inline void addref(); inline void release(); + QQmlAbstractBinding *binding(int index) const { return bindings + index; } + private: Q_DISABLE_COPY(QV8Bindings) |