Fix the backwards code so it matches the well thought out comment (bug 792589, r=jbramley)

This commit is contained in:
Marty Rosenberg 2012-10-08 06:32:39 -04:00
Родитель fd952228e5
Коммит d4348a58a0
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -481,7 +481,7 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer<SliceSize, Inst>
// Since the last pool is pools[0].other, and the first pool
// is pools[numPoolKinds-1], we actually want to process this
// forwards.
for (cur = &pools[numPoolKinds-1]; cur >= pools; cur--) {
for (cur = pools; cur < &pools[numPoolKinds]; cur++) {
// fetch the pool for the backwards half.
tmp = cur->other;
if (p == cur)
@ -504,7 +504,6 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer<SliceSize, Inst>
if (p == tmp) {
poolOffset += tmp->immSize;
}
poolOffset += tmp->immSize * tmp->numEntries + tmp->getAlignment();
}
return p->numEntries + p->other->insertEntry(data, this->nextOffset());
}