summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecompiler.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-11-16 05:46:39 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-11-16 05:46:39 (GMT)
commite8e28735046d419463e235a58a7c4c88d04163db (patch)
treef20c4c5a27d9eb8667d2909cb8c189d85b58c8c1 /src/declarative/qml/qdeclarativecompiler.cpp
parent463786121871c7b0934949f4fcb8ef8b4d64712f (diff)
downloadQt-e8e28735046d419463e235a58a7c4c88d04163db.zip
Qt-e8e28735046d419463e235a58a7c4c88d04163db.tar.gz
Qt-e8e28735046d419463e235a58a7c4c88d04163db.tar.bz2
Optimize test for sharable bindings.
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index b371f52..3e63bb1 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -2800,13 +2800,10 @@ bool QDeclarativeCompiler::completeComponentBuild()
// Pre-rewrite the expression
QString expression = binding.expression.asScript();
- // ### Optimize
- QDeclarativeRewrite::SharedBindingTester sharableTest;
- bool isSharable = sharableTest.isSharable(expression);
-
QDeclarativeRewrite::RewriteBinding rewriteBinding;
rewriteBinding.setName('$'+binding.property->name);
- expression = rewriteBinding(expression);
+ bool isSharable = false;
+ expression = rewriteBinding(expression,0,&isSharable);
quint32 length = expression.length();
quint32 pc;