diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-09 10:23:17 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-21 06:36:47 +0000 |
commit | 3db3c38b1055cc8b41a9aa951c33f5621babb5d0 (patch) | |
tree | 8ba17669737ab0bd06cae7ac8366c5709614c5a0 /src/qml/compiler/qqmltypecompiler_p.h | |
parent | a41dc6147436f3c1c977ff8c04379ff4bde3f0a6 (diff) |
Speed up property binding initialization on object creation
Avoid repeated string hashing and lookups in the property cache in order to
retrieve the property details when initializing literal and script bindings.
Instead we now cache the property data at type validation time, similar to how
the property data was encoded in the VME instructions in the old engine.
Change-Id: I3957c7c4c3e26dfa97c4880b23940a3755ee90e4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qqmltypecompiler_p.h')
-rw-r--r-- | src/qml/compiler/qqmltypecompiler_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h index 0982058e14..75987af656 100644 --- a/src/qml/compiler/qqmltypecompiler_p.h +++ b/src/qml/compiler/qqmltypecompiler_p.h @@ -93,6 +93,7 @@ public: QStringRef newStringRef(const QString &string); const QV4::Compiler::StringTableGenerator *stringPool() const; void setDeferredBindingsPerObject(const QHash<int, QBitArray> &deferredBindingsPerObject); + void setBindingPropertyDataPerObject(const QVector<QV4::CompiledData::BindingPropertyData> &propertyData); const QHash<int, QQmlCustomParser*> &customParserCache() const { return customParsers; } @@ -295,6 +296,7 @@ private: // collected state variables, essentially write-only mutable QHash<int, QBitArray> _deferredBindingsPerObject; mutable bool _seenObjectWithId; + mutable QVector<QV4::CompiledData::BindingPropertyData> _bindingPropertyDataPerObject; }; // ### merge with QtQml::JSCodeGen and operate directly on object->functionsAndExpressions once old compiler is gone. |