From 7fdc5c34a5ea0ba2c98e63aa78094991d44c8f51 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 2 Dec 2013 16:35:17 +0100 Subject: V4 IR: change the worklist to a QSet for block scheduling. Fixes a crash in octane. Change-Id: Ib72ac0b7a2941230a87543f30fcf7e55d7094886 Reviewed-by: Lars Knoll --- src/qml/compiler/qv4ssa.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 249dfab660..051691e2ad 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -1982,7 +1982,7 @@ QHash scheduleBlocks(Function *function, const Domin QSet visited; QVector &sequence; BasicBlock *currentGroup; - QList postponed; + QSet postponed; I(const DominatorTree &df, QVector &sequence, QHash &startEndLoops) @@ -1998,7 +1998,7 @@ QHash scheduleBlocks(Function *function, const Domin return; if (bb->containingGroup() != currentGroup) { - postponed.append(bb); + postponed.insert(bb); return; } if (bb->isGroupStart()) @@ -2031,7 +2031,7 @@ QHash scheduleBlocks(Function *function, const Domin if (bb->isGroupStart()) { currentGroup = bb->containingGroup(); startEndLoops.insert(bb, sequence.last()); - QList p = postponed; + QSet p = postponed; foreach (BasicBlock *pBB, p) DFS(pBB); } @@ -2040,7 +2040,7 @@ QHash scheduleBlocks(Function *function, const Domin void layout(BasicBlock *bb) { sequence.append(bb); visited.insert(bb); - postponed.removeAll(bb); + postponed.remove(bb); } }; -- cgit v1.2.3