Bug 1286462 - Ensure we have enough ballast space in TypeAnalyzer::specializeValidFloatOps. r=bbouvier
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Wed, 13 Jul 2016 13:13:51 +0000
changeset 387176 3cf91a31e92c7b749999d74b1470b35ac1e97823
parent 387175 b00ee999a59199c84960398dce43cc68c44be6cc
child 387177 195d2748f55de15241d5052a4178127f2de2debc
child 387282 86915c03c7c74a8beda3e922850d2320e6631319
child 387285 c82aebe222aa01b1d1eed1ac9cebf03b774c9fc4
child 387309 f6bedd98c84e5eb80cdbe8b0156fea86d85547a4
child 387418 dcb7835534e21a62cebdd5d1205d4e81f6bc6946
child 387676 24392aa69d0d390f5daedf91b56d31becd677e9d
child 387677 aa30a4efffa63f75086cc42ae2497e662d5da948
push id22903
push userbmo:tchiovoloni@mozilla.com
push dateWed, 13 Jul 2016 14:16:11 +0000
reviewersbbouvier
bugs1286462
milestone50.0a1
Bug 1286462 - Ensure we have enough ballast space in TypeAnalyzer::specializeValidFloatOps. r=bbouvier
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -1811,16 +1811,19 @@ TypeAnalyzer::specializeValidFloatOps()
 
         for (MInstructionIterator ins(block->begin()); ins != block->end(); ++ins) {
             if (!ins->isFloat32Commutative())
                 continue;
 
             if (ins->type() == MIRType::Float32)
                 continue;
 
+            if (!alloc().ensureBallast())
+                return false;
+
             // This call will try to specialize the instruction iff all uses are consumers and
             // all inputs are producers.
             ins->trySpecializeFloat32(alloc());
         }
     }
     return true;
 }