Bug 1246136: Check for dead code in assertion in EmitIfElse; r=luke
authorBenjamin Bouvier <benj@benj.me>
Fri, 05 Feb 2016 14:19:26 +0100
changeset 283393 33f24d250f97b5150f798f90b60856cef8719514
parent 283392 18b9f0924b4a73c16b29ab49dfb750ffcf57245a
child 283394 df927d7001cdb96045f0fb4cc2f7a4415895e002
push id29980
push userphilringnalda@gmail.com
push dateSun, 07 Feb 2016 23:30:48 +0000
treeherdermozilla-central@1cfe34ea394c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1246136
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 1246136: Check for dead code in assertion in EmitIfElse; r=luke
js/src/asmjs/WasmIonCompile.cpp
--- a/js/src/asmjs/WasmIonCompile.cpp
+++ b/js/src/asmjs/WasmIonCompile.cpp
@@ -2514,17 +2514,17 @@ EmitIfElse(FunctionCompiler& f, bool has
 
     if (!f.joinIfElse(thenBlocks))
         return false;
 
     // Now we're on the join block.
     if (expected != ExprType::Void)
         *def = f.popPhiOutput();
 
-    MOZ_ASSERT((expected != ExprType::Void) == !!*def);
+    MOZ_ASSERT_IF(!f.inDeadCode(), (expected != ExprType::Void) == !!*def);
     return true;
 }
 
 static bool
 EmitTableSwitch(FunctionCompiler& f)
 {
     bool hasDefault = f.readU8();
     int32_t low = f.readI32();