Bug 1244828 - Ensure enough ballast space in AllDoublePolicy::adjustInputs. r=bbouvier
☠☠ backed out by 4c067cb416a5 ☠ ☠
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Mon, 08 Feb 2016 17:38:27 +0000
changeset 283476 90b24727ebcd64b245c2aecb3a3babf2cafa2dea
parent 283475 05ea15825d81164547ed0ff93ea06b14497c5884
child 283477 9668af33990ed10cda8515bdd63f22787d3b96ea
push id71562
push usernpierron@mozilla.com
push dateMon, 08 Feb 2016 17:39:06 +0000
treeherdermozilla-inbound@c52611492e87 [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;
     }