Bug 1245152 - Ensure enough ballast space in RangeAnalysis::addRangeAssertions. r=h4writer
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Thu, 11 Feb 2016 17:50:53 +0000
changeset 284003 794747093c1fe3109392031d19c6c1c559d4a07e
parent 284002 08c473408dcc82fc017c526fbb321035ac72cc03
child 284004 632547643a7496a752b1ef5044bc4a225becb38a
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)
reviewersh4writer
bugs1245152
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 1245152 - Ensure enough ballast space in RangeAnalysis::addRangeAssertions. r=h4writer
js/src/jit/RangeAnalysis.cpp
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -2306,16 +2306,18 @@ RangeAnalysis::addRangeAssertions()
             // Don't insert assertions if there's nothing interesting to assert.
             if (r.isUnknown() || (ins->type() == MIRType_Int32 && r.isUnknownInt32()))
                 continue;
 
             // Don't add a use to an instruction that is recovered on bailout.
             if (ins->isRecoveredOnBailout())
                 continue;
 
+            if (!alloc().ensureBallast())
+                return false;
             MAssertRange* guard = MAssertRange::New(alloc(), ins, new(alloc()) Range(r));
 
             // Beta nodes and interrupt checks are required to be located at the
             // beginnings of basic blocks, so we must insert range assertions
             // after any such instructions.
             MInstruction* insertAt = block->safeInsertTop(ins);
 
             if (insertAt == *iter)