diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-11 03:59:56 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-11 03:59:56 (GMT) |
commit | a57bcdde329ef4c9a71aa6ba714f5e30ffd5dc6d (patch) | |
tree | 64cde5908b51e852a3c761031b809f3f056cec16 /src/declarative/qml/qmlvme.cpp | |
parent | 712b8ecad2407645ef80fef94181782d2227b002 (diff) | |
download | Qt-a57bcdde329ef4c9a71aa6ba714f5e30ffd5dc6d.zip Qt-a57bcdde329ef4c9a71aa6ba714f5e30ffd5dc6d.tar.gz Qt-a57bcdde329ef4c9a71aa6ba714f5e30ffd5dc6d.tar.bz2 |
Object property binding optimization
Add a binding optimization that hits
anchors.fill: parent
Diffstat (limited to 'src/declarative/qml/qmlvme.cpp')
-rw-r--r-- | src/declarative/qml/qmlvme.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index dccf5c4..fdfeddc 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -529,7 +529,7 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledData } break; - case QmlInstruction::StoreCompiledBinding: + case QmlInstruction::StoreBinding: { QObject *target = stack.at(stack.count() - 1 - instr.assignBinding.owner); @@ -554,14 +554,30 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledData { QObject *target = stack.top(); - QmlBindingIdOptimization *bind = - new QmlBindingIdOptimization(target, instr.assignIdOptBinding.property, ctxt, instr.assignIdOptBinding.id); + QmlBinding_Id *bind = + new QmlBinding_Id(target, instr.assignIdOptBinding.property, + ctxt, instr.assignIdOptBinding.id); bindValues.append(bind); // ### Need a mePtr bind->addToObject(target); } break; + case QmlInstruction::StoreObjPropBinding: + { + QObject *target = stack.top(); + QObject *context = + stack.at(stack.count() - 1 - instr.assignObjPropBinding.context); + + QmlBinding_ObjProperty *bind = + new QmlBinding_ObjProperty(target, instr.assignObjPropBinding.property, context, instr.assignObjPropBinding.contextIdx, instr.assignObjPropBinding.notifyIdx); + + bindValues.append(bind); + // ### Need a mePtr + bind->addToObject(target); + } + break; + case QmlInstruction::StoreValueSource: { QmlPropertyValueSource *vs = |