aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-09-20 18:28:21 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-25 09:46:22 +0200
commit1bc751852996cb89fbe097449e45baabafb730e4 (patch)
treee64c6c8fb24535be122f869ba6ba19a56c45a8d1 /src
parentcb52d1cfdbb2ea113f433cb6843426019d209317 (diff)
V4 SSA: change life-time interval coverage calculation.
When iterating over the ranges in a life-time interval, stop when the range starts after the position to check. Change-Id: Ib64cbfc644820fdb4c0167b8db0b40dacfb5d076 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/compiler/qv4ssa_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4ssa_p.h b/src/qml/compiler/qv4ssa_p.h
index 1aa21eee11..7b4cce89d8 100644
--- a/src/qml/compiler/qv4ssa_p.h
+++ b/src/qml/compiler/qv4ssa_p.h
@@ -96,7 +96,15 @@ public:
int start() const { return _ranges.first().start; }
int end() const { return _end; }
bool covers(int position) const
- { foreach (const Range &r, _ranges) if (r.covers(position)) return true; return false; }
+ {
+ foreach (const Range &r, _ranges) {
+ if (position < r.start)
+ return false;
+ if (position <= r.end)
+ return true;
+ }
+ return false;
+ }
int firstPossibleUsePosition(bool isPhiTarget) const { return start() + (isSplitFromInterval() || isPhiTarget ? 0 : 1); }