diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-11-28 16:04:33 +0000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-05 15:33:30 +0100 |
commit | 5ac2990688c7da6ce872bccc5c08129267887d68 (patch) | |
tree | 4099c1f9e415dc3efda5ea97385a5a76824375c6 /src/declarative/qml/v4/qv4compiler.cpp | |
parent | 5c9179b19776808acecab4805b10932dc4f9511a (diff) |
Introduce more generic fast property handling
Also reduce the number of direct calls to qt_metacall().
Change-Id: I04cd6e516a3e61058548309a19fe0b830f15c93f
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/declarative/qml/v4/qv4compiler.cpp')
-rw-r--r-- | src/declarative/qml/v4/qv4compiler.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/declarative/qml/v4/qv4compiler.cpp b/src/declarative/qml/v4/qv4compiler.cpp index 1d6cd30a99..e091ce2731 100644 --- a/src/declarative/qml/v4/qv4compiler.cpp +++ b/src/declarative/qml/v4/qv4compiler.cpp @@ -46,7 +46,7 @@ #include "qv4irbuilder_p.h" #include <private/qdeclarativejsast_p.h> -#include <private/qdeclarativefastproperties_p.h> +#include <private/qdeclarativeaccessors_p.h> #include <private/qdeclarativejsengine_p.h> QT_BEGIN_NAMESPACE @@ -323,7 +323,6 @@ void QV4CompilerPrivate::visitName(IR::Name *e) QMetaProperty prop; e->property->load(prop, QDeclarativeEnginePrivate::get(engine)); } - int fastFetchIndex = QDeclarativeFastProperties::instance()->accessorIndexForProperty(e->meta, e->property->coreIndex); const int propTy = e->property->propType; QDeclarativeRegisterType regType; @@ -359,13 +358,13 @@ void QV4CompilerPrivate::visitName(IR::Name *e) break; } // switch - if (fastFetchIndex != -1) { + if (e->property->hasAccessors()) { Instr::FetchAndSubscribe fetch; fetch.reg = currentReg; - fetch.function = fastFetchIndex; fetch.subscription = subscriptionIndex(_subscribeName); fetch.exceptionId = exceptionId(e->line, e->column); fetch.valueType = regType; + fetch.property = *e->property; gen(fetch); } else { if (blockNeedsSubscription(_subscribeName) && e->property->notifyIndex != -1) { |