diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-03-24 16:19:03 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-03-29 09:04:06 +0100 |
commit | bd294e78239a198c9c7458a490681d170823a97f (patch) | |
tree | bc40b21084a2d94c14fdcfac3f34e29ca0cee07b /src/qml/qml/qqmlbinding_p.h | |
parent | aa05de42962f7dce931f965b6affd0d27f24c50a (diff) |
Provide an AOT-optimized code path for binding evaluation
We don't need to convert the results of calling binding functions back
and forth.
Change-Id: Icb997532ebc3092f3e3882a804173346b450e435
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding_p.h')
-rw-r--r-- | src/qml/qml/qqmlbinding_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h index bf73c24c9e..9542f3acca 100644 --- a/src/qml/qml/qqmlbinding_p.h +++ b/src/qml/qml/qqmlbinding_p.h @@ -116,6 +116,7 @@ public: void setBoundFunction(QV4::BoundFunction *boundFunction) { m_boundFunction.set(boundFunction->engine(), *boundFunction); } + bool hasBoundFunction() const { return m_boundFunction.valueRef(); } /** * This method returns a snapshot of the currently tracked dependencies of @@ -138,6 +139,10 @@ protected: const QV4::Value &result, bool isUndefined, QQmlPropertyData::WriteFlags flags); QV4::ReturnedValue evaluate(bool *isUndefined); + bool evaluate(void *result, QMetaType type) + { + return QQmlJavaScriptExpression::evaluate(&result, &type, 0); + } private: inline bool updatingFlag() const; |