diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-08-12 13:47:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-13 07:04:29 +0200 |
commit | 058172c6f9beb666e74d3e17a79f60aed8ff72bd (patch) | |
tree | 6bfa15da9cfed35042a4a2ad4e8230aecd2ff9f1 /src/qml/compiler/qv4jsir_p.h | |
parent | 12520389e91b73b47fb2006b7c7623285c9450c5 (diff) |
Fix leaks in Phi nodes in the V4 IR
The phi nodes store a QVector, but as the destructors of the IR nodes aren't
called, the QVector internal data is leaked. This patch re-uses the existing
Stmt::Data mechanism that was introduced to serve exactly that purpose. It
replaces the now unused QVectors there with the Phi::incoming vector and
adjusts usage accordingly.
Change-Id: I22f351a17c1983637b54fa73a93dd40d64fec46c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4jsir_p.h')
-rw-r--r-- | src/qml/compiler/qv4jsir_p.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h index 4b716fc2ac..d322ea8a96 100644 --- a/src/qml/compiler/qv4jsir_p.h +++ b/src/qml/compiler/qv4jsir_p.h @@ -523,10 +523,7 @@ struct Stmt { }; struct Data { - QVector<unsigned> uses; - QVector<unsigned> defs; - QBitArray liveIn; - QBitArray liveOut; + QVector<Expr *> incoming; // used by Phi nodes }; Data *d; @@ -661,7 +658,6 @@ struct Try: Stmt { struct Phi: Stmt { Temp *targetTemp; - QVector<Expr *> incoming; virtual void accept(StmtVisitor *v) { v->visitPhi(this); } virtual Phi *asPhi() { return this; } |