diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-02 09:58:13 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-02 10:32:33 +0200 |
commit | 41e924eb6e1c690bc81d095fc5e8f57244aae964 (patch) | |
tree | b459dfa150530443901be68471df88c69ca7a7d4 /src/qml/compiler | |
parent | d51afdb74fdcb9a5c7e1fdaa763325c78d794d06 (diff) | |
parent | 87a5889029aed8c53a4b02a42804d036614db36b (diff) |
Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
.qmake.conf
examples/quick/scenegraph/openglunderqml/squircle.h
src/quick/doc/src/qmltypereference.qdoc
src/quick/scenegraph/qsgthreadedrenderloop.cpp
Change-Id: Ife4f4b897044a7ffcd0710493c6aed1d87cf1ef9
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qv4jsir.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4jsir.cpp b/src/qml/compiler/qv4jsir.cpp index 9a1a8bab42..aa3769be46 100644 --- a/src/qml/compiler/qv4jsir.cpp +++ b/src/qml/compiler/qv4jsir.cpp @@ -749,6 +749,11 @@ void BasicBlock::setStatements(const QVector<Stmt *> &newStatements) { Q_ASSERT(!isRemoved()); Q_ASSERT(newStatements.size() >= _statements.size()); + // FIXME: this gets quite inefficient for large basic-blocks, so this function/case should be re-worked. + foreach (Stmt *s, _statements) { + if (!newStatements.contains(s)) + s->destroyData(); + } _statements = newStatements; } @@ -788,18 +793,21 @@ void BasicBlock::insertStatementBeforeTerminator(Stmt *stmt) void BasicBlock::replaceStatement(int index, Stmt *newStmt) { Q_ASSERT(!isRemoved()); + _statements[index]->destroyData(); _statements[index] = newStmt; } void BasicBlock::removeStatement(Stmt *stmt) { Q_ASSERT(!isRemoved()); + stmt->destroyData(); _statements.remove(_statements.indexOf(stmt)); } void BasicBlock::removeStatement(int idx) { Q_ASSERT(!isRemoved()); + _statements[idx]->destroyData(); _statements.remove(idx); } |