Make the QML/VME interpreter threaded
authorKent Hansen <kent.hansen@nokia.com>
Tue, 20 Sep 2011 09:38:26 +0000 (11:38 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 22 Sep 2011 07:42:43 +0000 (09:42 +0200)
commitdefa339b371204788504d41bea737d05a5d53285
tree81978150129ac7b9420fa170e3e89638569f6089
parent7edf2597d15d2f913d9d59815f45170888de7f78
Make the QML/VME interpreter threaded

This gets rid of the two-level dispatch in the
interpreter loop, which gives a nice performance boost
when many VME instructions must be interpreted
(e.g., 40% faster for 100 StoreInteger instructions).

The threading is implemented in a similar way to the
V4 interpreter.

The way the compiler generates instructions has been
refactored, chiefly to get rid of the
QDeclarativeInstruction::setType() calls (when using
threading, we don't store the instruction type at all,
only the address).

As a nice bonus, the way instructions are defined now
(creating the specific instruction's data type, rather
than a generic (union) type) is more compact and less
error-prone.

Change-Id: If5cbd36b2526fd61b74854712711b06cd7e1ed7d
Reviewed-on: http://codereview.qt-project.org/5246
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
src/declarative/qml/qdeclarativecompileddata.cpp
src/declarative/qml/qdeclarativecompiler.cpp
src/declarative/qml/qdeclarativecompiler_p.h
src/declarative/qml/qdeclarativeinstruction.cpp
src/declarative/qml/qdeclarativeinstruction_p.h
src/declarative/qml/qdeclarativevme.cpp
src/declarative/qml/qdeclarativevme_p.h
tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp