Bug 1347486 - Replace MOZ_CRASH in GetCacheIRExpectedInputType with MOZ_ASSERT_UNREACHABLE. r=h4writer a=gchang
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 27 Mar 2017 14:39:56 +0200
changeset 377020 0ed8ba3fbaa1cd74f73221a639dc4d9e317fb023
parent 377019 873e6160117862799207256fffb11d95d702b260
child 377021 68f40432b9a3a58ae9b369ccac7761e3c0d1041b
push id7114
push usercbook@mozilla.com
push dateTue, 28 Mar 2017 13:36:07 +0000
treeherdermozilla-beta@f758f44a68de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer, gchang
bugs1347486
milestone53.0
Bug 1347486 - Replace MOZ_CRASH in GetCacheIRExpectedInputType with MOZ_ASSERT_UNREACHABLE. r=h4writer a=gchang
js/src/jit/BaselineInspector.cpp
--- a/js/src/jit/BaselineInspector.cpp
+++ b/js/src/jit/BaselineInspector.cpp
@@ -1110,17 +1110,19 @@ GetCacheIRExpectedInputType(ICCacheIR_Mo
     if (reader.matchOp(CacheOp::GuardIsObject, ValOperandId(0)))
         return MIRType::Object;
     if (reader.matchOp(CacheOp::GuardIsString, ValOperandId(0)))
         return MIRType::String;
     if (reader.matchOp(CacheOp::GuardType, ValOperandId(0))) {
         JSValueType type = reader.valueType();
         return MIRTypeFromValueType(type);
     }
-    MOZ_CRASH("Unexpected instruction");
+
+    MOZ_ASSERT_UNREACHABLE("Unexpected instruction");
+    return MIRType::Value;
 }
 
 MIRType
 BaselineInspector::expectedPropertyAccessInputType(jsbytecode* pc)
 {
     if (!hasBaselineScript())
         return MIRType::Value;