Fix leaks in Phi nodes in the V4 IR
authorSimon Hausmann <simon.hausmann@digia.com>
Mon, 12 Aug 2013 11:47:34 +0000 (13:47 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 13 Aug 2013 05:04:29 +0000 (07:04 +0200)
commit058172c6f9beb666e74d3e17a79f60aed8ff72bd
tree6bfa15da9cfed35042a4a2ad4e8230aecd2ff9f1
parent12520389e91b73b47fb2006b7c7623285c9450c5
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>
src/qml/compiler/qv4jsir.cpp
src/qml/compiler/qv4jsir_p.h
src/qml/compiler/qv4ssa.cpp