summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlrewrite_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-12-02 02:35:38 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-12-02 02:35:38 (GMT)
commitcb70f2096cbc66e6e8b5324e0e9508c788144e7e (patch)
treedd4f6f98e2b27d09f2b7c275e705b5a28e89d541 /src/declarative/qml/qmlrewrite_p.h
parentec42d6843ca0937f338e5e2d7d3353134d143eb6 (diff)
downloadQt-cb70f2096cbc66e6e8b5324e0e9508c788144e7e.zip
Qt-cb70f2096cbc66e6e8b5324e0e9508c788144e7e.tar.gz
Qt-cb70f2096cbc66e6e8b5324e0e9508c788144e7e.tar.bz2
Cache binding closures
Diffstat (limited to 'src/declarative/qml/qmlrewrite_p.h')
-rw-r--r--src/declarative/qml/qmlrewrite_p.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlrewrite_p.h b/src/declarative/qml/qmlrewrite_p.h
index a5cb841..a04a0db 100644
--- a/src/declarative/qml/qmlrewrite_p.h
+++ b/src/declarative/qml/qmlrewrite_p.h
@@ -63,6 +63,17 @@ QT_BEGIN_NAMESPACE
namespace QmlRewrite {
using namespace QmlJS;
+class SharedBindingTester : protected AST::Visitor
+{
+ bool _sharable;
+public:
+ bool isSharable(const QString &code);
+
+ virtual bool visit(AST::FunctionDeclaration *) { _sharable = false; return false; }
+ virtual bool visit(AST::FunctionExpression *) { _sharable = false; return false; }
+ virtual bool visit(AST::CallExpression *) { _sharable = false; return false; }
+};
+
class RewriteBinding: protected AST::Visitor
{
unsigned _position;