Fix invalid reads in valgrind during unused basic block collections
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 13 Dec 2012 14:52:07 +0000 (15:52 +0100)
committerLars Knoll <lars.knoll@digia.com>
Thu, 13 Dec 2012 19:29:23 +0000 (20:29 +0100)
commit2761c4ceacab2e4f7da2e2a293a895595c02a928
tree73cb1a7ed4c500f89e81efb6ecfe8a0e3c38e8bf
parent48b825007fe45d84cea1ae6f526103ccedef87c3
Fix invalid reads in valgrind during unused basic block collections

When clearing cross-references to unused basic blocks blocks, don't
delete the block right afterwards because another block might also
still reference it. Instead keep track of the ones to be deleted
and delete them afterwards in one shot.

Also replaces the existance check for the blocks from a linear
vector search to a hash set lookup which we already have around.

Change-Id: I3bd72359259065ba26bf2116bf849575e4601f32
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qv4codegen.cpp