summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativerewrite_p.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-11-18 04:26:33 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-11-19 00:41:12 (GMT)
commit03c671e557a59a2c908cb8241c7ad5c31536841d (patch)
tree5f7415134fd7e1b23ee384e4442298d252aa2cf0 /src/declarative/qml/qdeclarativerewrite_p.h
parente8e28735046d419463e235a58a7c4c88d04163db (diff)
downloadQt-03c671e557a59a2c908cb8241c7ad5c31536841d.zip
Qt-03c671e557a59a2c908cb8241c7ad5c31536841d.tar.gz
Qt-03c671e557a59a2c908cb8241c7ad5c31536841d.tar.bz2
Optimize binding rewrites.
Use the existing AST rather than recreating it. Task-number: QTBUG-15331 Reviewed-by: Aaron Kennedy
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 40c8321..310ef3c 100644
--- a/src/declarative/qml/qdeclarativerewrite_p.h
+++ b/src/declarative/qml/qdeclarativerewrite_p.h
@@ -68,7 +68,7 @@ class SharedBindingTester : protected AST::Visitor
bool _sharable;
public:
bool isSharable(const QString &code);
- bool isSharable(AST::Statement *statement);
+ bool isSharable(AST::Node *Node);
virtual bool visit(AST::FunctionDeclaration *) { _sharable = false; return false; }
virtual bool visit(AST::FunctionExpression *) { _sharable = false; return false; }
@@ -83,6 +83,7 @@ class RewriteBinding: protected AST::Visitor
public:
QString operator()(const QString &code, bool *ok = 0, bool *sharable = 0);
+ QString operator()(QDeclarativeJS::AST::Node *node, const QString &code, bool *sharable = 0);
//name of the function: used for the debugger
void setName(const QByteArray &name) { _name = name; }