Detect and optimize qsTr() and qsTrId() bindings
authorAaron Kennedy <aaron.kennedy@nokia.com>
Wed, 21 Dec 2011 16:34:36 +0000 (16:34 +0000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 21 Dec 2011 17:42:48 +0000 (18:42 +0100)
commitb6c8497cdf070c8404a1f3784c4ee6df191bd546
tree029a5ce39adbad2c9eb1213e57d38fecdd9e6041
parent8249c72213bc7d212c05aa086b3145a5742706a3
Detect and optimize qsTr() and qsTrId() bindings

As these two are frequently used with constants, we can detect them in
the compiler, and run the appropriate C++ functions directly in the VME.
This saves pointlessly creating and running bindings.

Change-Id: I148a150400c13fda7955949453405202f18b1a6b
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
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/qdeclarativescript.cpp
src/declarative/qml/qdeclarativescript_p.h
src/declarative/qml/qdeclarativevme.cpp
tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
tests/auto/declarative/qdeclarativetranslation/data/idtranslation.qml
tests/auto/declarative/qdeclarativetranslation/data/translation.qml
tests/auto/declarative/qdeclarativetranslation/tst_qdeclarativetranslation.cpp