Bug 906964 - ARM: leave some head-room in the double pools to help avoid bailing out which causes compilation failure for asm.js code. r=mjrosenb

This commit is contained in:
Douglas Crosher 2013-11-10 04:20:22 +11:00
Родитель 5ef843a9ec
Коммит 59a16eaf0f
1 изменённых файлов: 7 добавлений и 2 удалений

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

@ -1303,12 +1303,17 @@ class Assembler
void initWithAllocator() {
m_buffer.initWithAllocator();
// Note that the sizes for the double pools are set to 1020 rather than 1024 to
// work around a rare edge case that would otherwise bail out - which is not
// possible for Asm.js code and causes a compilation failure. See the comment at
// the fail_bail call within IonAssemberBufferWithConstantPools.h: finishPool().
// Set up the backwards double region
new (&pools_[2]) Pool (1024, 8, 4, 8, 8, m_buffer.LifoAlloc_, true);
new (&pools_[2]) Pool (1020, 8, 4, 8, 8, m_buffer.LifoAlloc_, true);
// Set up the backwards 32 bit region
new (&pools_[3]) Pool (4096, 4, 4, 8, 4, m_buffer.LifoAlloc_, true, true);
// Set up the forwards double region
new (doublePool) Pool (1024, 8, 4, 8, 8, m_buffer.LifoAlloc_, false, false, &pools_[2]);
new (doublePool) Pool (1020, 8, 4, 8, 8, m_buffer.LifoAlloc_, false, false, &pools_[2]);
// Set up the forwards 32 bit region
new (int32Pool) Pool (4096, 4, 4, 8, 4, m_buffer.LifoAlloc_, false, true, &pools_[3]);
for (int i = 0; i < 4; i++) {