diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-11-17 18:07:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-28 15:12:06 +0100 |
commit | 4bf6969d8a1e17911a076ac470a38a464d7322a2 (patch) | |
tree | 5d2209c4d90cef64fac6f77bf3e86307de3f7f21 /src/qml/compiler/qv4jsir_p.h | |
parent | d72adccd2727d55a8f0adb87cfa9ef22db27ff9e (diff) |
Slightly accelerate access to value type properties
We can't do a fast property index based access on them, due to the inability to
read individual fields from the original object (i.e. the logic in
QQmlValueTypeWrapper). However what we can determine and propagate is the type
information of the individual properties, i.e. that the x and y properties of a
QPointF are always doubles.
Change-Id: Iee71ece2117294b7bc0b93deb0a77d7c51148b11
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4jsir_p.h')
-rw-r--r-- | src/qml/compiler/qv4jsir_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h index 9105a9137d..59e8d02bbc 100644 --- a/src/qml/compiler/qv4jsir_p.h +++ b/src/qml/compiler/qv4jsir_p.h @@ -562,6 +562,12 @@ struct Member: Expr { bool memberIsEnum : 1; bool freeOfSideEffects : 1; + // This is set for example for for QObject properties. All sorts of extra behavior + // is defined when writing to them, for example resettable properties are reset + // when writing undefined to them, and an exception is thrown when they're missing + // a reset function. And then there's also Qt.binding(). + bool inhibitTypeConversionOnWrite: 1; + void init(Expr *base, const QString *name, QQmlPropertyData *property = 0, int attachedPropertiesId = 0) { this->base = base; @@ -571,6 +577,7 @@ struct Member: Expr { this->enumValue = 0; this->memberIsEnum = false; this->freeOfSideEffects = false; + this->inhibitTypeConversionOnWrite = property != 0; } void init(Expr *base, const QString *name, int enumValue) @@ -582,6 +589,7 @@ struct Member: Expr { this->enumValue = enumValue; this->memberIsEnum = true; this->freeOfSideEffects = false; + this->inhibitTypeConversionOnWrite = false; } virtual void accept(ExprVisitor *v) { v->visitMember(this); } |