Bug 1244828 - Ensure enough ballast space in AllDoublePolicy::adjustInputs. r=bbouvier
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Thu, 11 Feb 2016 17:50:52 +0000
changeset 284000 ecae2990b06807d8ce7c1d4761f6569f29a6af9f
parent 283999 db1d8b455d542bfea1cbc3242aba1564d693975f
child 284001 4dd1e1b817f213444357efd9d7fbb0e4193cd277
push id29995
push usercbook@mozilla.com
push dateFri, 12 Feb 2016 14:16:12 +0000
treeherdermozilla-central@218d16a9ddcc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1244828
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1244828 - Ensure enough ballast space in AllDoublePolicy::adjustInputs. r=bbouvier
js/src/jit/TypePolicy.cpp
--- a/js/src/jit/TypePolicy.cpp
+++ b/js/src/jit/TypePolicy.cpp
@@ -101,16 +101,18 @@ ArithPolicy::adjustInputs(TempAllocator&
 bool
 AllDoublePolicy::adjustInputs(TempAllocator& alloc, MInstruction* ins)
 {
     for (size_t i = 0, e = ins->numOperands(); i < e; i++) {
         MDefinition* in = ins->getOperand(i);
         if (in->type() == MIRType_Double)
             continue;
 
+        if (!alloc.ensureBallast())
+            return false;
         MInstruction* replace = MToDouble::New(alloc, in);
 
         ins->block()->insertBefore(ins, replace);
         ins->replaceOperand(i, replace);
 
         if (!replace->typePolicy()->adjustInputs(alloc, replace))
             return false;
     }