Bug 1244828 - Ensure enough ballast space in CallPolicy::adjustInputs. r=bbouvier
☠☠ backed out by ae0cecf92f88 ☠ ☠
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Mon, 08 Feb 2016 17:38:27 +0000
changeset 319857 9668af33990ed10cda8515bdd63f22787d3b96ea
parent 319856 90b24727ebcd64b245c2aecb3a3babf2cafa2dea
child 319858 092754992cefe625ebd5e10fa22813e08a475461
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [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 CallPolicy::adjustInputs. r=bbouvier
js/src/jit/TypePolicy.cpp
--- a/js/src/jit/TypePolicy.cpp
+++ b/js/src/jit/TypePolicy.cpp
@@ -908,18 +908,21 @@ CallPolicy::adjustInputs(TempAllocator& 
         MInstruction* unbox = MUnbox::New(alloc, func, MIRType_Object, MUnbox::Fallible);
         call->block()->insertBefore(call, unbox);
         call->replaceFunction(unbox);
 
         if (!unbox->typePolicy()->adjustInputs(alloc, unbox))
             return false;
     }
 
-    for (uint32_t i = 0; i < call->numStackArgs(); i++)
+    for (uint32_t i = 0; i < call->numStackArgs(); i++) {
+        if (!alloc.ensureBallast())
+            return false;
         EnsureOperandNotFloat32(alloc, call, MCall::IndexOfStackArg(i));
+    }
 
     return true;
 }
 
 bool
 CallSetElementPolicy::adjustInputs(TempAllocator& alloc, MInstruction* ins)
 {
     // The first operand should be an object.