aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_moth.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-05-07 11:02:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-28 15:34:45 +0200
commit4a2c3f319485dd1df008ec2d7e262d860952b3df (patch)
treed96433656c342855f0f98f24b51fd7723c73cfb1 /src/qml/compiler/qv4isel_moth.cpp
parentcc1929da585664aa16c53e5c0cd624fe5e699345 (diff)
V4 IR: make statement numbering fixed and clean up statement worklists.
Every statement in the IR now gets a fixed unique number. This number can be used to store statements or information for a statement into an array where the number is used as an index. This removes the need for many hashes. In the process of changing the code the two statement worklists in the optimizer are merged into one. A single instance can be (and is) re-used by the various algorithms. Change-Id: I8f49ec7b1df79cf6914c5747f5d2c994dad110b2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index f5038c8ae1..478346572e 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -219,7 +219,7 @@ protected:
virtual void process(IR::Stmt *s)
{
- Q_ASSERT(s->id > 0);
+ Q_ASSERT(s->id() > 0);
// qDebug("L%d statement %d:", _currentBasicBlock->index, s->id);
@@ -229,7 +229,7 @@ protected:
// purge ranges no longer alive:
for (int i = 0; i < _live.size(); ) {
const IR::LifeTimeInterval *lti = _live.at(i);
- if (lti->end() < s->id) {
+ if (lti->end() < s->id()) {
// qDebug() << "\t - moving temp" << lti->temp().index << "to handled, freeing slot" << _stackSlotForTemp[lti->temp().index];
_live.remove(i);
Q_ASSERT(_slotIsInUse[_stackSlotForTemp[lti->temp().index]]);
@@ -243,7 +243,7 @@ protected:
// active new ranges:
while (!_unhandled.isEmpty()) {
const IR::LifeTimeInterval *lti = _unhandled.last();
- if (lti->start() > s->id)
+ if (lti->start() > s->id())
break; // we're done
Q_ASSERT(!_stackSlotForTemp.contains(lti->temp().index));
_stackSlotForTemp[lti->temp().index] = allocateFreeSlot();