aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativescript_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-12-21 16:34:36 +0000
committerQt by Nokia <qt-info@nokia.com>2011-12-21 18:42:48 +0100
commitb6c8497cdf070c8404a1f3784c4ee6df191bd546 (patch)
tree029a5ce39adbad2c9eb1213e57d38fecdd9e6041 /src/declarative/qml/qdeclarativescript_p.h
parent8249c72213bc7d212c05aa086b3145a5742706a3 (diff)
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>
Diffstat (limited to 'src/declarative/qml/qdeclarativescript_p.h')
-rw-r--r--src/declarative/qml/qdeclarativescript_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativescript_p.h b/src/declarative/qml/qdeclarativescript_p.h
index a83cd9f8f0..9b54177cd6 100644
--- a/src/declarative/qml/qdeclarativescript_p.h
+++ b/src/declarative/qml/qdeclarativescript_p.h
@@ -223,8 +223,10 @@ public:
LocationSpan location;
// Used by compiler
- QDeclarativeCompilerTypes::BindingReference *bindingReference;
- int signalExpressionContextStack;
+ union {
+ QDeclarativeCompilerTypes::BindingReference *bindingReference;
+ int signalExpressionContextStack;
+ };
// Used in Property::ValueList lists
Value *nextValue;