Bug 996518 - Add an extra assert in TypePolicy of MTypeBarrier, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Thu, 17 Apr 2014 12:26:13 +0200
changeset 198672 4ac1f53ee2249cf823a7a0d9682f6ccbce0ecc13
parent 198671 5e815640f63d0d2c93a1917c5f4250f9590717d9
child 198673 e7f563c9c7b8d4d0713e97daeda7fe0d77962864
push id486
push userasasaki@mozilla.com
push dateMon, 14 Jul 2014 18:39:42 +0000
treeherdermozilla-release@d33428174ff1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs996518
milestone31.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 996518 - Add an extra assert in TypePolicy of MTypeBarrier, r=jandem
js/src/jit/TypePolicy.cpp
--- a/js/src/jit/TypePolicy.cpp
+++ b/js/src/jit/TypePolicy.cpp
@@ -290,16 +290,17 @@ TypeBarrierPolicy::adjustInputs(TempAllo
     }
 
     // Input is a value. Unbox the input to the requested type.
     if (inputType == MIRType_Value) {
         JS_ASSERT(outputType != MIRType_Value);
 
         // We can't unbox a value to null/undefined. So keep output also a value.
         if (IsNullOrUndefined(outputType) || outputType == MIRType_Magic) {
+            JS_ASSERT(ins->defUseCount() == 0);
             ins->setResultType(MIRType_Value);
             return true;
         }
 
         MUnbox *unbox = MUnbox::New(alloc, ins->getOperand(0), outputType, MUnbox::TypeBarrier);
         ins->block()->insertBefore(ins, unbox);
         ins->replaceOperand(0, unbox);
         return true;