V4 regalloc: fix intersection calculation.
authorErik Verbruggen <erik.verbruggen@me.com>
Fri, 20 Sep 2013 14:02:27 +0000 (16:02 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 25 Sep 2013 07:46:17 +0000 (09:46 +0200)
commit750e15320a633cee214fa053138e0eba086003f2
treedcd045cdcda5403d4671e1f7c4b28c8efd7218a7
parenta5b82cca184c613b40ce55646e522d7cb7f7a60a
V4 regalloc: fix intersection calculation.

The previous version was plain wrong: when the first interval had more
than one range, those ranges would never be checked for intersection.

This version iterates over all ranges in the first interval, and returns
the index of the first range in the second interval that overlaps with
that range. Iterating over the second interval is cut off when an
interval is found that starts after the current one end (the ranges of
both intervals are sorted).

Change-Id: I87c254a645164eb6639925c2e3b7fd7c1b1bfa0a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/compiler/qv4regalloc.cpp