summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativerewrite_p.h
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/qdeclarativerewrite_p.h
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/qdeclarativerewrite_p.h')
-rw-r--r--src/declarative/qml/qdeclarativerewrite_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativerewrite_p.h b/src/declarative/qml/qdeclarativerewrite_p.h
index 6f3c46e..40c8321 100644
--- a/src/declarative/qml/qdeclarativerewrite_p.h
+++ b/src/declarative/qml/qdeclarativerewrite_p.h
@@ -68,6 +68,7 @@ class SharedBindingTester : protected AST::Visitor
bool _sharable;
public:
bool isSharable(const QString &code);
+ bool isSharable(AST::Statement *statement);
virtual bool visit(AST::FunctionDeclaration *) { _sharable = false; return false; }
virtual bool visit(AST::FunctionExpression *) { _sharable = false; return false; }
@@ -81,7 +82,7 @@ class RewriteBinding: protected AST::Visitor
QByteArray _name;
public:
- QString operator()(const QString &code, bool *ok = 0);
+ QString operator()(const QString &code, bool *ok = 0, bool *sharable = 0);
//name of the function: used for the debugger
void setName(const QByteArray &name) { _name = name; }