diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-01 05:29:26 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-01 05:29:26 (GMT) |
commit | 8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6 (patch) | |
tree | 691fe48f981f40f2d50790ceeb7d3719799d9b82 /src/declarative/qml/qdeclarativedeclarativedata_p.h | |
parent | b1748ec7a9fdcd74fcf05af3903623c7165420ad (diff) | |
download | Qt-8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6.zip Qt-8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6.tar.gz Qt-8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6.tar.bz2 |
Optimization: Improve allocation strategy for QDeclarativeDeclarativeData
This improves the declarative/creation/itemtree_qml benchmark by 6%
Diffstat (limited to 'src/declarative/qml/qdeclarativedeclarativedata_p.h')
-rw-r--r-- | src/declarative/qml/qdeclarativedeclarativedata_p.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativedeclarativedata_p.h b/src/declarative/qml/qdeclarativedeclarativedata_p.h index d1d063a..dfc3113 100644 --- a/src/declarative/qml/qdeclarativedeclarativedata_p.h +++ b/src/declarative/qml/qdeclarativedeclarativedata_p.h @@ -64,6 +64,10 @@ class QDeclarativeAbstractBinding; class QDeclarativeContext; class QDeclarativePropertyCache; class QDeclarativeContextData; +// This class is structured in such a way, that simply zero'ing it is the +// default state for elemental object allocations. This is crucial in the +// workings of the QDeclarativeInstruction::CreateSimpleObject instruction. +// Don't change anything here without first considering that case! class Q_AUTOTEST_EXPORT QDeclarativeDeclarativeData : public QDeclarativeData { public: @@ -73,8 +77,8 @@ public: bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), attachedProperties(0), propertyCache(0), guards(0) {} - virtual void destroyed(QObject *); - virtual void parentChanged(QObject *, QObject *); + void destroyed(QObject *); + void parentChanged(QObject *, QObject *); void setImplicitDestructible() { if (!explicitIndestructibleSet) indestructible = false; |