Bug 820686 - Rename MOZ_NOT_REACHED() and JS_NOT_REACHED() to MOZ_ASSUME_NOT_REACHED(). r=waldo
authorJustin Lebar <justin.lebar@gmail.com>
Fri, 28 Jun 2013 18:38:31 -0700
changeset 136856 1735d098ea863982696383cd25fbb6857e0d2f6f
parent 136855 55c1f447549d5ad6245f8f78fbea89ebd5350b04
child 136857 5ecd26bc5274bb4e2831e6649fa8bb516f3c9bc2
push id30310
push userjlebar@mozilla.com
push dateSat, 29 Jun 2013 01:39:21 +0000
treeherdermozilla-inbound@5ecd26bc5274 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs820686
milestone25.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 820686 - Rename MOZ_NOT_REACHED() and JS_NOT_REACHED() to MOZ_ASSUME_NOT_REACHED(). r=waldo This includes a mechanical renaming of MOZ_NOT_REACHED to MOZ_ASSUME_NOT_REACHED in JS. Later patches in this queue clean up whitespace errors and so on.
js/public/RootingAPI.h
js/public/Utility.h
js/src/assembler/assembler/ARMAssembler.h
js/src/assembler/jit/ExecutableAllocator.h
js/src/assembler/wtf/Assertions.h
js/src/builtin/Intl.cpp
js/src/builtin/TestingFunctions.cpp
js/src/ctypes/CTypes.cpp
js/src/frontend/BytecodeEmitter.cpp
js/src/frontend/ParseNode.cpp
js/src/frontend/Parser.cpp
js/src/gc/RootMarking.cpp
js/src/gc/Statistics.cpp
js/src/ion/AsmJS.cpp
js/src/ion/BacktrackingAllocator.cpp
js/src/ion/BaselineBailouts.cpp
js/src/ion/BaselineCompiler.cpp
js/src/ion/BaselineFrameInfo.cpp
js/src/ion/BaselineIC.cpp
js/src/ion/BaselineIC.h
js/src/ion/BaselineJIT.cpp
js/src/ion/CodeGenerator.cpp
js/src/ion/CompactBuffer.h
js/src/ion/ExecutionModeInlines.h
js/src/ion/FixedArityList.h
js/src/ion/Ion.cpp
js/src/ion/IonAnalysis.cpp
js/src/ion/IonBuilder.cpp
js/src/ion/IonCaches.cpp
js/src/ion/IonCaches.h
js/src/ion/IonCompartment.h
js/src/ion/IonFrames-inl.h
js/src/ion/IonFrames.cpp
js/src/ion/IonFrames.h
js/src/ion/IonMacroAssembler.cpp
js/src/ion/IonMacroAssembler.h
js/src/ion/IonTypes.h
js/src/ion/LIR-Common.h
js/src/ion/LIR.cpp
js/src/ion/LIR.h
js/src/ion/LiveRangeAllocator.cpp
js/src/ion/LiveRangeAllocator.h
js/src/ion/Lowering.cpp
js/src/ion/MCallOptimize.cpp
js/src/ion/MIR.cpp
js/src/ion/MIR.h
js/src/ion/MIRGraph.cpp
js/src/ion/MOpcodes.h
js/src/ion/Snapshots.cpp
js/src/ion/StupidAllocator.cpp
js/src/ion/TypePolicy.cpp
js/src/ion/VMFunctions.cpp
js/src/ion/arm/Assembler-arm.cpp
js/src/ion/arm/BaselineIC-arm.cpp
js/src/ion/arm/CodeGenerator-arm.cpp
js/src/ion/arm/Lowering-arm.cpp
js/src/ion/arm/MacroAssembler-arm.cpp
js/src/ion/arm/MacroAssembler-arm.h
js/src/ion/arm/MoveEmitter-arm.cpp
js/src/ion/arm/Trampoline-arm.cpp
js/src/ion/shared/Assembler-shared.h
js/src/ion/shared/Assembler-x86-shared.cpp
js/src/ion/shared/Assembler-x86-shared.h
js/src/ion/shared/CodeGenerator-shared-inl.h
js/src/ion/shared/CodeGenerator-x86-shared.cpp
js/src/ion/shared/IonAssemblerBuffer.h
js/src/ion/shared/IonAssemblerBufferWithConstantPools.h
js/src/ion/x64/Assembler-x64.cpp
js/src/ion/x64/Assembler-x64.h
js/src/ion/x64/BaselineIC-x64.cpp
js/src/ion/x64/CodeGenerator-x64.cpp
js/src/ion/x64/Lowering-x64.cpp
js/src/ion/x64/MacroAssembler-x64.h
js/src/ion/x64/Trampoline-x64.cpp
js/src/ion/x86/Assembler-x86.cpp
js/src/ion/x86/Assembler-x86.h
js/src/ion/x86/BaselineIC-x86.cpp
js/src/ion/x86/CodeGenerator-x86.cpp
js/src/ion/x86/Lowering-x86.cpp
js/src/ion/x86/MacroAssembler-x86.h
js/src/ion/x86/Trampoline-x86.cpp
js/src/jsanalyze.cpp
js/src/jsanalyze.h
js/src/jsanalyzeinlines.h
js/src/jsclone.cpp
js/src/jscntxtinlines.h
js/src/jsdbgapi.cpp
js/src/jsfriendapi.cpp
js/src/jsfun.cpp
js/src/jsgc.cpp
js/src/jsgcinlines.h
js/src/jsinfer.cpp
js/src/jsinferinlines.h
js/src/jsobjinlines.h
js/src/jsopcode.cpp
js/src/jsopcode.h
js/src/jsproxy.cpp
js/src/jsreflect.cpp
js/src/jsscript.cpp
js/src/jstypedarray.cpp
js/src/jstypedarray.h
js/src/jstypedarrayinlines.h
js/src/jsworkers.cpp
js/src/shell/jsoptparse.cpp
js/src/tests/js1_8_1/regress/regress-452498-053.js
js/src/vm/Debugger.cpp
js/src/vm/ForkJoin.cpp
js/src/vm/Interpreter.cpp
js/src/vm/ObjectImpl.cpp
js/src/vm/ObjectImpl.h
js/src/vm/RegExpObject.cpp
js/src/vm/ScopeObject.cpp
js/src/vm/Stack-inl.h
js/src/vm/Stack.cpp
mfbt/Assertions.h
mfbt/decimal/moz-decimal-utils.h
mfbt/decimal/to-moz-dependencies.patch
--- a/js/public/RootingAPI.h
+++ b/js/public/RootingAPI.h
@@ -883,22 +883,22 @@ template <typename T> class MaybeRooted<
 template <typename T> class MaybeRooted<T, NoGC>
 {
   public:
     typedef T HandleType;
     typedef FakeRooted<T> RootType;
     typedef FakeMutableHandle<T> MutableHandleType;
 
     static inline JS::Handle<T> toHandle(HandleType v) {
-        JS_NOT_REACHED("Bad conversion");
+        MOZ_ASSUME_NOT_REACHED("Bad conversion");
         return JS::Handle<T>::fromMarkedLocation(NULL);
     }
 
     static inline JS::MutableHandle<T> toMutableHandle(MutableHandleType v) {
-        JS_NOT_REACHED("Bad conversion");
+        MOZ_ASSUME_NOT_REACHED("Bad conversion");
         return JS::MutableHandle<T>::fromMarkedLocation(NULL);
     }
 };
 
 } /* namespace js */
 
 namespace JS {
 
--- a/js/public/Utility.h
+++ b/js/public/Utility.h
@@ -36,17 +36,16 @@ namespace js {}
 /*
  * Pattern used to overwrite freed memory. If you are accessing an object with
  * this pattern, you probably have a dangling pointer.
  */
 #define JS_FREE_PATTERN 0xDA
 
 #define JS_ASSERT(expr)           MOZ_ASSERT(expr)
 #define JS_ASSERT_IF(cond, expr)  MOZ_ASSERT_IF(cond, expr)
-#define JS_NOT_REACHED(reason)    MOZ_NOT_REACHED(reason)
 #define JS_ALWAYS_TRUE(expr)      MOZ_ALWAYS_TRUE(expr)
 #define JS_ALWAYS_FALSE(expr)     MOZ_ALWAYS_FALSE(expr)
 
 #ifdef DEBUG
 # ifdef JS_THREADSAFE
 #  define JS_THREADSAFE_ASSERT(expr) JS_ASSERT(expr)
 # else
 #  define JS_THREADSAFE_ASSERT(expr) ((void) 0)
--- a/js/src/assembler/assembler/ARMAssembler.h
+++ b/js/src/assembler/assembler/ARMAssembler.h
@@ -1544,17 +1544,17 @@ namespace JSC {
             if (isFloatType(srcType) && isFloatType (dstType)) {
                 // doing a float -> float conversion
                 bool dblToFloat = srcType == FloatReg64;
                 emitVFPInst(static_cast<ARMWord>(cc) | VFP_DATA | VFP_FPCVT |
                             (dblToFloat ? VFP_DBL : 0),
                             dblToFloat ? SD(dest) : DD(dest),
                             dblToFloat ? DM(src) : SM(src), 0);
             } else {
-                JS_NOT_REACHED("Other conversions did not seem useful on 2011/08/04");
+                MOZ_ASSUME_NOT_REACHED("Other conversions did not seem useful on 2011/08/04");
             }
         }
 
         // does r2:r1 -> dn, dn -> r2:r1, r2:r1 -> s2:s1, etc.
         void vmov64 (bool fromFP, bool isDbl, int r1, int r2, int rFP, Condition cc = AL)
         {
             if (fromFP) {
                 spew("%-15s %s, %s, %s", "vmov", 
--- a/js/src/assembler/jit/ExecutableAllocator.h
+++ b/js/src/assembler/jit/ExecutableAllocator.h
@@ -157,17 +157,17 @@ private:
         m_freePtr += n;
 
         switch (kind) {
           case ION_CODE:      m_ionCodeBytes      += n;        break;
           case BASELINE_CODE: m_baselineCodeBytes += n;        break;
           case ASMJS_CODE:    m_asmJSCodeBytes    += n;        break;
           case REGEXP_CODE:   m_regexpCodeBytes   += n;        break;
           case OTHER_CODE:    m_otherCodeBytes    += n;        break;
-          default:            JS_NOT_REACHED("bad code kind"); break;
+          default:            MOZ_ASSUME_NOT_REACHED("bad code kind"); break;
         }
         return result;
     }
 
     size_t available() const {
         JS_ASSERT(m_end >= m_freePtr);
         return m_end - m_freePtr;
     }
--- a/js/src/assembler/wtf/Assertions.h
+++ b/js/src/assembler/wtf/Assertions.h
@@ -39,13 +39,13 @@
 
 #ifndef ASSERT
 #define ASSERT(assertion) MOZ_ASSERT(assertion)
 #endif
 #define ASSERT_UNUSED(variable, assertion) do { \
     (void)variable; \
     ASSERT(assertion); \
 } while (0)
-#define ASSERT_NOT_REACHED() MOZ_NOT_REACHED("")
+#define ASSERT_NOT_REACHED() MOZ_ASSUME_NOT_REACHED()
 #define CRASH() MOZ_CRASH()
 #define COMPILE_ASSERT(exp, name) MOZ_STATIC_ASSERT(exp, #name)
 
 #endif /* assembler_wtf_Assertions_h */
--- a/js/src/builtin/Intl.cpp
+++ b/js/src/builtin/Intl.cpp
@@ -132,62 +132,54 @@ enum UCollationResult {
   UCOL_GREATER = 1,
   UCOL_LESS = -1
 };
 
 static int32_t
 ucol_countAvailable(void)
 {
     MOZ_NOT_REACHED("ucol_countAvailable: Intl API disabled");
-    return 0;
 }
 
 static const char *
 ucol_getAvailable(int32_t localeIndex)
 {
     MOZ_NOT_REACHED("ucol_getAvailable: Intl API disabled");
-    return NULL;
 }
 
 static UCollator *
 ucol_open(const char *loc, UErrorCode *status)
 {
     MOZ_NOT_REACHED("ucol_open: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 static void
 ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value, UErrorCode *status)
 {
     MOZ_NOT_REACHED("ucol_setAttribute: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
 }
 
 static UCollationResult
 ucol_strcoll(const UCollator *coll, const UChar *source, int32_t sourceLength,
              const UChar *target, int32_t targetLength)
 {
     MOZ_NOT_REACHED("ucol_strcoll: Intl API disabled");
-    return (UCollationResult) 0;
 }
 
 static void
 ucol_close(UCollator *coll)
 {
     MOZ_NOT_REACHED("ucol_close: Intl API disabled");
 }
 
 static UEnumeration *
 ucol_getKeywordValuesForLocale(const char *key, const char *locale, UBool commonlyUsed,
                                UErrorCode *status)
 {
     MOZ_NOT_REACHED("ucol_getKeywordValuesForLocale: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 struct UParseError;
 struct UFieldPosition;
 typedef void *UNumberFormat;
 
 enum UNumberFormatStyle {
     UNUM_DECIMAL = 1,
@@ -215,62 +207,55 @@ enum UNumberFormatAttribute {
 enum UNumberFormatTextAttribute {
   UNUM_CURRENCY_CODE,
 };
 
 static int32_t
 unum_countAvailable(void)
 {
     MOZ_NOT_REACHED("unum_countAvailable: Intl API disabled");
-    return 0;
 }
 
 static const char *
 unum_getAvailable(int32_t localeIndex)
 {
     MOZ_NOT_REACHED("unum_getAvailable: Intl API disabled");
-    return NULL;
 }
 
 static UNumberFormat *
 unum_open(UNumberFormatStyle style, const UChar *pattern, int32_t patternLength,
           const char *locale, UParseError *parseErr, UErrorCode *status)
 {
     MOZ_NOT_REACHED("unum_open: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 static void
 unum_setAttribute(UNumberFormat *fmt, UNumberFormatAttribute  attr, int32_t newValue)
 {
     MOZ_NOT_REACHED("unum_setAttribute: Intl API disabled");
 }
 
 static int32_t
 unum_formatDouble(const UNumberFormat *fmt, double number, UChar *result,
                   int32_t resultLength, UFieldPosition *pos, UErrorCode *status)
 {
     MOZ_NOT_REACHED("unum_formatDouble: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return 0;
 }
 
 static void
 unum_close(UNumberFormat *fmt)
 {
     MOZ_NOT_REACHED("unum_close: Intl API disabled");
 }
 
 static void
 unum_setTextAttribute(UNumberFormat *fmt, UNumberFormatTextAttribute tag, const UChar *newValue,
                       int32_t newValueLength, UErrorCode *status)
 {
     MOZ_NOT_REACHED("unum_setTextAttribute: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
 }
 
 class Locale {
   public:
     Locale(const char *language, const char *country = 0, const char *variant = 0,
            const char *keywordsAndValues = 0);
 };
 
@@ -285,85 +270,72 @@ class NumberingSystem {
     static NumberingSystem *createInstance(const Locale &inLocale, UErrorCode &status);
     const char *getName();
 };
 
 NumberingSystem *
 NumberingSystem::createInstance(const Locale &inLocale, UErrorCode &status)
 {
     MOZ_NOT_REACHED("NumberingSystem::createInstance: Intl API disabled");
-    status = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 const char *
 NumberingSystem::getName()
 {
     MOZ_NOT_REACHED("NumberingSystem::getName: Intl API disabled");
-    return NULL;
 }
 
 typedef void *UCalendar;
 
 enum UCalendarType {
   UCAL_TRADITIONAL,
   UCAL_DEFAULT = UCAL_TRADITIONAL,
   UCAL_GREGORIAN
 };
 
 static UCalendar *
 ucal_open(const UChar *zoneID, int32_t len, const char *locale,
           UCalendarType type, UErrorCode *status)
 {
     MOZ_NOT_REACHED("ucal_open: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 static const char *
 ucal_getType(const UCalendar *cal, UErrorCode *status)
 {
     MOZ_NOT_REACHED("ucal_getType: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 static UEnumeration *
 ucal_getKeywordValuesForLocale(const char *key, const char *locale,
                                UBool commonlyUsed, UErrorCode *status)
 {
     MOZ_NOT_REACHED("ucal_getKeywordValuesForLocale: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 static void
 ucal_close(UCalendar *cal)
 {
     MOZ_NOT_REACHED("ucal_close: Intl API disabled");
 }
 
 typedef void *UDateTimePatternGenerator;
 
 static UDateTimePatternGenerator *
 udatpg_open(const char *locale, UErrorCode *pErrorCode)
 {
     MOZ_NOT_REACHED("udatpg_open: Intl API disabled");
-    *pErrorCode = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 static int32_t
 udatpg_getBestPattern(UDateTimePatternGenerator *dtpg, const UChar *skeleton,
                       int32_t length, UChar *bestPattern, int32_t capacity,
                       UErrorCode *pErrorCode)
 {
     MOZ_NOT_REACHED("udatpg_getBestPattern: Intl API disabled");
-    *pErrorCode = U_UNSUPPORTED_ERROR;
-    return 0;
 }
 
 static void
 udatpg_close(UDateTimePatternGenerator *dtpg)
 {
     MOZ_NOT_REACHED("udatpg_close: Intl API disabled");
 }
 
@@ -374,57 +346,49 @@ enum UDateFormatStyle {
     UDAT_PATTERN = -2,
     UDAT_IGNORE = UDAT_PATTERN
 };
 
 static int32_t
 udat_countAvailable(void)
 {
     MOZ_NOT_REACHED("udat_countAvailable: Intl API disabled");
-    return 0;
 }
 
 static const char *
 udat_getAvailable(int32_t localeIndex)
 {
     MOZ_NOT_REACHED("udat_getAvailable: Intl API disabled");
-    return NULL;
 }
 
 static UDateFormat *
 udat_open(UDateFormatStyle timeStyle, UDateFormatStyle dateStyle, const char *locale,
           const UChar *tzID, int32_t tzIDLength, const UChar *pattern,
           int32_t patternLength, UErrorCode *status)
 {
     MOZ_NOT_REACHED("udat_open: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return NULL;
 }
 
 static const UCalendar *
 udat_getCalendar(const UDateFormat *fmt)
 {
     MOZ_NOT_REACHED("udat_getCalendar: Intl API disabled");
-    return NULL;
 }
 
 static void
 ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode)
 {
     MOZ_NOT_REACHED("ucal_setGregorianChange: Intl API disabled");
-    *pErrorCode = U_UNSUPPORTED_ERROR;
 }
 
 static int32_t
 udat_format(const UDateFormat *format, UDate dateToFormat, UChar *result,
             int32_t resultLength, UFieldPosition *position, UErrorCode *status)
 {
     MOZ_NOT_REACHED("udat_format: Intl API disabled");
-    *status = U_UNSUPPORTED_ERROR;
-    return 0;
 }
 
 static void
 udat_close(UDateFormat *format)
 {
     MOZ_NOT_REACHED("udat_close: Intl API disabled");
 }
 
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -485,17 +485,17 @@ GCState(JSContext *cx, unsigned argc, js
     gc::State globalState = cx->runtime()->gcIncrementalState;
     if (globalState == gc::NO_INCREMENTAL)
         state = "none";
     else if (globalState == gc::MARK)
         state = "mark";
     else if (globalState == gc::SWEEP)
         state = "sweep";
     else
-        JS_NOT_REACHED("Unobserveable global GC state");
+        MOZ_NOT_REACHED("Unobserveable global GC state");
 
     JSString *str = JS_NewStringCopyZ(cx, state);
     if (!str)
         return false;
     *vp = StringValue(str);
     return true;
 }
 
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -2124,17 +2124,17 @@ ConvertToJS(JSContext* cx,
     JSObject* obj = CData::Create(cx, typeObj, parentObj, data, ownResult);
     if (!obj)
       return false;
 
     *result = OBJECT_TO_JSVAL(obj);
     break;
   }
   case TYPE_function:
-    JS_NOT_REACHED("cannot return a FunctionType");
+    MOZ_ASSUME_NOT_REACHED("cannot return a FunctionType");
   }
 
   return true;
 }
 
 // Determine if the contents of a typed array can be converted without
 // ambiguity to a C type. Elements of a Int8Array are converted to
 // ctypes.int8_t, UInt8Array to ctypes.uint8_t, etc.
@@ -2564,17 +2564,17 @@ ImplicitConvert(JSContext* cx,
       memcpy(buffer, intermediate.get(), structSize);
       break;
     }
 
     return TypeError(cx, "struct", val);
   }
   case TYPE_void_t:
   case TYPE_function:
-    JS_NOT_REACHED("invalid type");
+    MOZ_ASSUME_NOT_REACHED("invalid type");
     return false;
   }
 
   return true;
 }
 
 // Convert jsval 'val' to a C binary representation of CType 'targetType',
 // storing the result in 'buffer'. This function is more forceful than
@@ -2637,17 +2637,17 @@ ExplicitConvert(JSContext* cx, HandleVal
   case TYPE_double:
   case TYPE_array:
   case TYPE_struct:
     // ImplicitConvert is sufficient. Re-throw the exception it generated.
     JS_SetPendingException(cx, ex);
     return false;
   case TYPE_void_t:
   case TYPE_function:
-    JS_NOT_REACHED("invalid type");
+    MOZ_ASSUME_NOT_REACHED("invalid type");
     return false;
   }
   return true;
 }
 
 // Given a CType 'typeObj', generate a string describing the C type declaration
 // corresponding to 'typeObj'. For instance, the CType constructed from
 // 'ctypes.int32_t.ptr.array(4).ptr.ptr' will result in the type string
@@ -2810,17 +2810,17 @@ BuildTypeSource(JSContext* cx,
       break;
     case ABI_STDCALL:
       AppendString(result, "ctypes.stdcall_abi, ");
       break;
     case ABI_WINAPI:
       AppendString(result, "ctypes.winapi_abi, ");
       break;
     case INVALID_ABI:
-      JS_NOT_REACHED("invalid abi");
+      MOZ_ASSUME_NOT_REACHED("invalid abi");
       break;
     }
 
     // Recursively build the source string describing the function return and
     // argument types.
     BuildTypeSource(cx, fninfo->mReturnType, true, result);
 
     if (fninfo->mArgTypes.length() > 0) {
@@ -3055,17 +3055,17 @@ BuildDataSource(JSContext* cx,
     }
 
     if (isImplicit)
       AppendString(result, "}");
 
     break;
   }
   case TYPE_void_t:
-    JS_NOT_REACHED("invalid type");
+    MOZ_ASSUME_NOT_REACHED("invalid type");
     break;
   }
 
   return true;
 }
 
 /*******************************************************************************
 ** JSAPI callback function implementations
@@ -3529,17 +3529,17 @@ CType::GetFFIType(JSContext* cx, JSObjec
     result = ArrayType::BuildFFIType(cx, obj);
     break;
 
   case TYPE_struct:
     result = StructType::BuildFFIType(cx, obj);
     break;
 
   default:
-    JS_NOT_REACHED("simple types must have an ffi_type");
+    MOZ_ASSUME_NOT_REACHED("simple types must have an ffi_type");
   }
 
   if (!result)
     return NULL;
   JS_SetReservedSlot(obj, SLOT_FFITYPE, PRIVATE_TO_JSVAL(result.get()));
   return result.forget();
 }
 
@@ -5458,17 +5458,17 @@ FunctionType::BuildSymbolName(JSString* 
     // On Win64, stdcall is an alias to the default ABI for compatibility, so no
     // mangling is done.
     AppendString(result, name);
 #endif
     break;
   }
 
   case INVALID_ABI:
-    JS_NOT_REACHED("invalid abi");
+    MOZ_ASSUME_NOT_REACHED("invalid abi");
     break;
   }
 }
 
 static FunctionInfo*
 NewFunctionInfo(JSContext* cx,
                 jsval abiType,
                 jsval returnType,
@@ -6795,17 +6795,17 @@ CDataFinalizer::Methods::ToString(JSCont
   if (!JS_GetPrivate(objThis)) {
     // Pre-check whether CDataFinalizer::GetValue can fail
     // to avoid reporting an error when not appropriate.
     strMessage = JS_NewStringCopyZ(cx, "[CDataFinalizer - empty]");
     if (!strMessage) {
       return JS_FALSE;
     }
   } else if (!CDataFinalizer::GetValue(cx, objThis, value.address())) {
-    JS_NOT_REACHED("Could not convert an empty CDataFinalizer");
+    MOZ_ASSUME_NOT_REACHED("Could not convert an empty CDataFinalizer");
   } else {
     strMessage = JS_ValueToString(cx, value);
     if (!strMessage) {
       return JS_FALSE;
     }
   }
   args.rval().setString(strMessage);
   return JS_TRUE;
@@ -7003,17 +7003,17 @@ CDataFinalizer::Construct(JSContext* cx,
   // of the function, which may be less precise.
   JSObject *objBestArgType = objArgType;
   if (!JSVAL_IS_PRIMITIVE(valData)) {
     JSObject *objData = &valData.toObject();
     if (CData::IsCData(objData)) {
       objBestArgType = CData::GetCType(objData);
       size_t sizeBestArg;
       if (!CType::GetSafeSize(objBestArgType, &sizeBestArg)) {
-        JS_NOT_REACHED("object with unknown size");
+        MOZ_ASSUME_NOT_REACHED("object with unknown size");
       }
       if (sizeBestArg != sizeArg) {
         return TypeError(cx, "(an object with the same size as that expected by the C finalization function)", valData);
       }
     }
   }
 
   // Used by GetCType
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -914,17 +914,17 @@ EmitVarOp(JSContext *cx, ParseNode *pn, 
         JS_ASSERT_IF(pn->isDefn(), pn->pn_cookie.level() == bce->script->staticLevel);
         return EmitUnaliasedVarOp(cx, op, pn->pn_cookie.slot(), bce);
     }
 
     switch (op) {
       case JSOP_GETARG: case JSOP_GETLOCAL: op = JSOP_GETALIASEDVAR; break;
       case JSOP_SETARG: case JSOP_SETLOCAL: op = JSOP_SETALIASEDVAR; break;
       case JSOP_CALLARG: case JSOP_CALLLOCAL: op = JSOP_CALLALIASEDVAR; break;
-      default: JS_NOT_REACHED("unexpected var op");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected var op");
     }
 
     return EmitAliasedVarOp(cx, op, pn, bce);
 }
 
 static JSOp
 GetIncDecInfo(ParseNodeKind kind, bool *post)
 {
@@ -1008,17 +1008,17 @@ BytecodeEmitter::isAliasedName(ParseNode
          */
         return script->formalIsAliased(pn->pn_cookie.slot());
       case Definition::VAR:
       case Definition::CONST:
         return script->varIsAliased(pn->pn_cookie.slot());
       case Definition::PLACEHOLDER:
       case Definition::NAMED_LAMBDA:
       case Definition::MISSING:
-        JS_NOT_REACHED("unexpected dn->kind");
+        MOZ_ASSUME_NOT_REACHED("unexpected dn->kind");
     }
     return false;
 }
 
 /*
  * Adjust the slot for a block local to account for the number of variables
  * that share the same index space with locals. Due to the incremental code
  * generation for top-level script, we do the adjustment via code patching in
@@ -1103,17 +1103,17 @@ TryConvertFreeName(BytecodeEmitter *bce,
      * cloned lazily upon first access.
      */
     if (bce->emitterMode == BytecodeEmitter::SelfHosting) {
         JSOp op;
         switch (pn->getOp()) {
           case JSOP_NAME:     op = JSOP_GETINTRINSIC; break;
           case JSOP_SETNAME:  op = JSOP_SETINTRINSIC; break;
           /* Other *NAME ops aren't (yet) supported in self-hosted code. */
-          default: JS_NOT_REACHED("intrinsic");
+          default: MOZ_ASSUME_NOT_REACHED("intrinsic");
         }
         pn->setOp(op);
         return true;
     }
 
     /*
      * When parsing inner functions lazily, parse nodes for outer functions no
      * longer exist and only the function's scope chain is available for
@@ -1209,17 +1209,17 @@ TryConvertFreeName(BytecodeEmitter *bce,
         // js::ReportIfUndeclaredVarAssignment.
         JSOp op;
         switch (pn->getOp()) {
           case JSOP_NAME:     op = JSOP_GETGNAME; break;
           case JSOP_SETNAME:  op = JSOP_SETGNAME; break;
           case JSOP_SETCONST:
             /* Not supported. */
             return false;
-          default: JS_NOT_REACHED("gname");
+          default: MOZ_ASSUME_NOT_REACHED("gname");
         }
         pn->setOp(op);
         return true;
     }
 
     return false;
 }
 
@@ -1358,29 +1358,29 @@ BindNameToSlotHelper(JSContext *cx, Byte
      * to stack slot. Look for an argument or variable in the function and
      * rewrite pn_op and update pn accordingly.
      */
     switch (dn->kind()) {
       case Definition::ARG:
         switch (op) {
           case JSOP_NAME:     op = JSOP_GETARG; break;
           case JSOP_SETNAME:  op = JSOP_SETARG; break;
-          default: JS_NOT_REACHED("arg");
+          default: MOZ_ASSUME_NOT_REACHED("arg");
         }
         JS_ASSERT(!pn->isConst());
         break;
 
       case Definition::VAR:
       case Definition::CONST:
       case Definition::LET:
         switch (op) {
           case JSOP_NAME:     op = JSOP_GETLOCAL; break;
           case JSOP_SETNAME:  op = JSOP_SETLOCAL; break;
           case JSOP_SETCONST: op = JSOP_SETLOCAL; break;
-          default: JS_NOT_REACHED("local");
+          default: MOZ_ASSUME_NOT_REACHED("local");
         }
         break;
 
       case Definition::NAMED_LAMBDA: {
         JS_ASSERT(dn->isOp(JSOP_CALLEE));
         JS_ASSERT(op != JSOP_CALLEE);
 
         /*
@@ -1427,17 +1427,17 @@ BindNameToSlotHelper(JSContext *cx, Byte
         pn->pn_dflags |= PND_BOUND;
         return true;
       }
 
       case Definition::PLACEHOLDER:
         return true;
 
       case Definition::MISSING:
-        JS_NOT_REACHED("missing");
+        MOZ_ASSUME_NOT_REACHED("missing");
     }
 
     /*
      * The difference between the current static level and the static level of
      * the definition is the number of function scopes between the current
      * scope and dn's scope.
      */
     unsigned skip = bce->script->staticLevel - dn->pn_cookie.level();
@@ -1619,17 +1619,17 @@ CheckSideEffects(JSContext *cx, Bytecode
               case PNK_CALL:
               case PNK_ELEM:
                 /* All these delete addressing modes have effects too. */
                 *answer = true;
                 return true;
               default:
                 return CheckSideEffects(cx, bce, pn2, answer);
             }
-            MOZ_NOT_REACHED("We have a returning default case");
+            MOZ_ASSUME_NOT_REACHED("We have a returning default case");
             return false;
           }
 
           case PNK_TYPEOF:
           case PNK_VOID:
           case PNK_NOT:
           case PNK_BITNOT:
             if (pn->isOp(JSOP_NOT)) {
@@ -1643,17 +1643,17 @@ CheckSideEffects(JSContext *cx, Bytecode
              * All of PNK_INC, PNK_DEC, PNK_THROW, and PNK_YIELD have direct
              * effects. Of the remaining unary-arity node types, we can't
              * easily prove that the operand never denotes an object with a
              * toString or valueOf method.
              */
             *answer = true;
             return true;
         }
-        MOZ_NOT_REACHED("We have a returning default case");
+        MOZ_ASSUME_NOT_REACHED("We have a returning default case");
         return false;
 
       case PN_NAME:
         /*
          * Take care to avoid trying to bind a label name (labels, both for
          * statements and property values in object initialisers, have pn_op
          * defaulted to JSOP_NOP).
          */
@@ -3360,17 +3360,17 @@ EmitAssignment(JSContext *cx, BytecodeEm
                 if (!EmitAtomOp(cx, lhs, JSOP_GETINTRINSIC, bce))
                     return false;
             } else {
                 JSOp op;
                 switch (lhs->getOp()) {
                   case JSOP_SETARG: op = JSOP_GETARG; break;
                   case JSOP_SETLOCAL: op = JSOP_GETLOCAL; break;
                   case JSOP_SETALIASEDVAR: op = JSOP_GETALIASEDVAR; break;
-                  default: JS_NOT_REACHED("Bad op");
+                  default: MOZ_ASSUME_NOT_REACHED("Bad op");
                 }
                 if (!EmitVarOp(cx, lhs, op, bce))
                     return false;
             }
             break;
           case PNK_DOT: {
             if (Emit1(cx, bce, JSOP_DUP) < 0)
                 return false;
@@ -3584,17 +3584,17 @@ ParseNode::getConstantValue(JSContext *c
             }
         }
 
         types::FixObjectType(cx, obj);
         vp.setObject(*obj);
         return true;
       }
       default:
-        JS_NOT_REACHED("Unexpected node");
+        MOZ_ASSUME_NOT_REACHED("Unexpected node");
     }
     return false;
 }
 
 static bool
 EmitSingletonInitialiser(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
 {
     RootedValue value(cx);
@@ -5418,17 +5418,17 @@ EmitObject(JSContext *cx, BytecodeEmitte
             obj = NULL;
 
         if (pn3->isKind(PNK_NUMBER)) {
             obj = NULL;
             switch (op) {
               case JSOP_INITPROP:        op = JSOP_INITELEM;        break;
               case JSOP_INITPROP_GETTER: op = JSOP_INITELEM_GETTER; break;
               case JSOP_INITPROP_SETTER: op = JSOP_INITELEM_SETTER; break;
-              default: JS_NOT_REACHED("Invalid op");
+              default: MOZ_ASSUME_NOT_REACHED("Invalid op");
             }
             if (Emit1(cx, bce, op) < 0)
                 return false;
         } else {
             JS_ASSERT(pn3->isKind(PNK_NAME) || pn3->isKind(PNK_STRING));
             jsatomid index;
             if (!bce->makeAtomIndex(pn3->pn_atom, &index))
                 return false;
--- a/js/src/frontend/ParseNode.cpp
+++ b/js/src/frontend/ParseNode.cpp
@@ -376,17 +376,17 @@ Parser<FullParseHandler>::cloneParseTree
     pn->setDefn(opn->isDefn());
     pn->setUsed(opn->isUsed());
 
     switch (pn->getArity()) {
 #define NULLCHECK(e)    JS_BEGIN_MACRO if (!(e)) return NULL; JS_END_MACRO
 
       case PN_CODE:
         if (pn->getKind() == PNK_MODULE) {
-            JS_NOT_REACHED("module nodes cannot be cloned");
+            MOZ_ASSUME_NOT_REACHED("module nodes cannot be cloned");
             return NULL;
         } else {
             NULLCHECK(pn->pn_funbox =
                       newFunctionBox(opn->pn_funbox->function(), pc, opn->pn_funbox->strict));
             NULLCHECK(pn->pn_body = cloneParseTree(opn->pn_body));
             pn->pn_cookie = opn->pn_cookie;
             pn->pn_dflags = opn->pn_dflags;
             pn->pn_blockid = opn->pn_blockid;
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -183,17 +183,17 @@ ParseContext<FullParseHandler>::define(J
         dn->setOp(JSOP_GETLOCAL);
         dn->pn_dflags |= (PND_LET | PND_BOUND);
         JS_ASSERT(dn->pn_cookie.level() == staticLevel); /* see bindLet */
         if (!decls_.addShadow(name, dn))
             return false;
         break;
 
       default:
-        JS_NOT_REACHED("unexpected kind");
+        MOZ_ASSUME_NOT_REACHED("unexpected kind");
         break;
     }
 
     return true;
 }
 
 template <>
 bool
@@ -274,17 +274,17 @@ AppendPackedBindings(const ParseContext<
             break;
           case Definition::CONST:
             kind = CONSTANT;
             break;
           case Definition::ARG:
             kind = ARGUMENT;
             break;
           default:
-            JS_NOT_REACHED("unexpected dn->kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected dn->kind");
         }
 
         /*
          * Bindings::init does not check for duplicates so we must ensure that
          * only one binding with a given name is marked aliased. pc->decls
          * maintains the canonical definition for each name, so use that.
          */
         JS_ASSERT_IF(dn->isClosed(), pc->decls().lookupFirst(name) == dn);
@@ -3970,17 +3970,17 @@ Parser<FullParseHandler>::forStatement()
         switch (pn2->getKind()) {
           case PNK_NAME:
             /* Beware 'for (arguments in ...)' with or without a 'var'. */
             pn2->markAsAssigned();
             break;
 
 #if JS_HAS_DESTRUCTURING
           case PNK_ASSIGN:
-            JS_NOT_REACHED("forStatement TOK_ASSIGN");
+            MOZ_ASSUME_NOT_REACHED("forStatement TOK_ASSIGN");
             break;
 
           case PNK_ARRAY:
           case PNK_OBJECT:
             if (versionNumber() == JSVERSION_1_7) {
                 /*
                  * Destructuring for-in requires [key, value] enumeration
                  * in JS1.7.
@@ -6651,17 +6651,17 @@ Parser<ParseHandler>::primaryExpr(TokenK
             AssignmentType assignType;
             if (op == JSOP_INITPROP) {
                 assignType = VALUE;
             } else if (op == JSOP_INITPROP_GETTER) {
                 assignType = GET;
             } else if (op == JSOP_INITPROP_SETTER) {
                 assignType = SET;
             } else {
-                JS_NOT_REACHED("bad opcode in object initializer");
+                MOZ_ASSUME_NOT_REACHED("bad opcode in object initializer");
                 assignType = VALUE; /* try to error early */
             }
 
             AtomIndexAddPtr p = seen.lookupForAdd(atom);
             if (p) {
                 jsatomid index = p.value();
                 AssignmentType oldAssignType = AssignmentType(index);
                 if ((oldAssignType & assignType) &&
--- a/js/src/gc/RootMarking.cpp
+++ b/js/src/gc/RootMarking.cpp
@@ -61,17 +61,17 @@ MarkExactStackRoot(JSTracer *trc, Rooted
       case THING_ROOT_TYPE:        MarkTypeRoot(trc, (types::Type *)addr, "exact-type"); break;
       case THING_ROOT_TYPE_OBJECT: MarkTypeObjectRoot(trc, (types::TypeObject **)addr, "exact-typeobject"); break;
       case THING_ROOT_ION_CODE:    MarkIonCodeRoot(trc, (ion::IonCode **)addr, "exact-ioncode"); break;
       case THING_ROOT_VALUE:       MarkValueRoot(trc, (Value *)addr, "exact-value"); break;
       case THING_ROOT_ID:          MarkIdRoot(trc, (jsid *)addr, "exact-id"); break;
       case THING_ROOT_PROPERTY_ID: MarkIdRoot(trc, &((js::PropertyId *)addr)->asId(), "exact-propertyid"); break;
       case THING_ROOT_BINDINGS:    ((Bindings *)addr)->trace(trc); break;
       case THING_ROOT_PROPERTY_DESCRIPTOR: ((JSPropertyDescriptor *)addr)->trace(trc); break;
-      default: JS_NOT_REACHED("Invalid THING_ROOT kind"); break;
+      default: MOZ_ASSUME_NOT_REACHED("Invalid THING_ROOT kind"); break;
     }
 }
 
 static inline void
 MarkExactStackRootList(JSTracer *trc, Rooted<void*> *rooter, ThingRootKind kind)
 {
     while (rooter) {
         MarkExactStackRoot(trc, rooter, kind);
--- a/js/src/gc/Statistics.cpp
+++ b/js/src/gc/Statistics.cpp
@@ -246,18 +246,17 @@ ExplainReason(JS::gcreason::Reason reaso
 {
     switch (reason) {
 #define SWITCH_REASON(name)                     \
         case JS::gcreason::name:                    \
           return #name;
         GCREASONS(SWITCH_REASON)
 
         default:
-          JS_NOT_REACHED("bad GC reason");
-          return "?";
+          MOZ_NOT_REACHED("bad GC reason");
 #undef SWITCH_REASON
     }
 }
 
 static double
 t(int64_t t)
 {
     return double(t) / PRMJ_USEC_PER_MSEC;
--- a/js/src/ion/AsmJS.cpp
+++ b/js/src/ion/AsmJS.cpp
@@ -407,33 +407,33 @@ class Type
           case Signed:
           case Unsigned:
           case Intish:
             return MIRType_Int32;
           case Void:
           case Unknown:
             return MIRType_None;
         }
-        JS_NOT_REACHED("Invalid Type");
+        MOZ_ASSUME_NOT_REACHED("Invalid Type");
         return MIRType_None;
     }
 
     const char *toChars() const {
         switch (which_) {
           case Double:    return "double";
           case Doublish:  return "doublish";
           case Fixnum:    return "fixnum";
           case Int:       return "int";
           case Signed:    return "signed";
           case Unsigned:  return "unsigned";
           case Intish:    return "intish";
           case Void:      return "void";
           case Unknown:   return "unknown";
         }
-        JS_NOT_REACHED("Invalid Type");
+        MOZ_ASSUME_NOT_REACHED("Invalid Type");
         return "";
     }
 };
 
 // Represents the subset of Type that can be used as the return type of a
 // function.
 class RetType
 {
@@ -463,42 +463,42 @@ class RetType
         return Type::Which(which_);
     }
     AsmJSModule::ReturnType toModuleReturnType() const {
         switch (which_) {
           case Void: return AsmJSModule::Return_Void;
           case Signed: return AsmJSModule::Return_Int32;
           case Double: return AsmJSModule::Return_Double;
         }
-        JS_NOT_REACHED("Unexpected return type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected return type");
         return AsmJSModule::Return_Void;
     }
     MIRType toMIRType() const {
         switch (which_) {
           case Void: return MIRType_None;
           case Signed: return MIRType_Int32;
           case Double: return MIRType_Double;
         }
-        JS_NOT_REACHED("Unexpected return type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected return type");
         return MIRType_None;
     }
     bool operator==(RetType rhs) const { return which_ == rhs.which_; }
     bool operator!=(RetType rhs) const { return which_ != rhs.which_; }
 };
 
 // Implements <: (subtype) operator when the rhs is an RetType
 static inline bool
 operator<=(Type lhs, RetType rhs)
 {
     switch (rhs.which()) {
       case RetType::Signed: return lhs.isSigned();
       case RetType::Double: return lhs == Type::Double;
       case RetType::Void:   return lhs == Type::Void;
     }
-    JS_NOT_REACHED("Unexpected rhs type");
+    MOZ_ASSUME_NOT_REACHED("Unexpected rhs type");
     return false;
 }
 
 // Represents the subset of Type that can be used as a variable or
 // argument's type. Note: AsmJSCoercion and VarType are kept separate to
 // make very clear the signed/int distinction: a coercion may explicitly sign
 // an *expression* but, when stored as a variable, this signedness information
 // is explicitly thrown away by the asm.js type system. E.g., in
@@ -562,17 +562,17 @@ class VarType
 // Implements <: (subtype) operator when the rhs is an VarType
 static inline bool
 operator<=(Type lhs, VarType rhs)
 {
     switch (rhs.which()) {
       case VarType::Int:    return lhs.isInt();
       case VarType::Double: return lhs.isDouble();
     }
-    JS_NOT_REACHED("Unexpected rhs type");
+    MOZ_ASSUME_NOT_REACHED("Unexpected rhs type");
     return false;
 }
 
 // Passed from parent expressions to child expressions to indicate if and how
 // the child expression's result will be coerced. While most type checking
 // occurs bottom-up (with child expressions returning the type of the result
 // and parents checking these types), FFI calls naturally want to know the
 // parent's context to determine the appropriate result type. If a parent
@@ -724,17 +724,17 @@ IsLiteralUint32(ParseNode *pn, uint32_t 
         *u32 = uint32_t(literal.toInt32());
         return true;
       case NumLit::NegativeInt:
       case NumLit::Double:
       case NumLit::OutOfRangeInt:
         return false;
     }
 
-    JS_NOT_REACHED("Bad literal type");
+    MOZ_ASSUME_NOT_REACHED("Bad literal type");
 }
 
 static inline bool
 IsBits32(ParseNode *pn, int32_t i)
 {
     if (!IsNumericLiteral(pn))
         return false;
 
@@ -744,17 +744,17 @@ IsBits32(ParseNode *pn, int32_t i)
       case NumLit::BigUnsigned:
       case NumLit::NegativeInt:
         return literal.toInt32() == i;
       case NumLit::Double:
       case NumLit::OutOfRangeInt:
         return false;
     }
 
-    JS_NOT_REACHED("Bad literal type");
+    MOZ_ASSUME_NOT_REACHED("Bad literal type");
 }
 
 /*****************************************************************************/
 // Typed array utilities
 
 static Type
 TypedArrayLoadType(ArrayBufferView::ViewType viewType)
 {
@@ -766,17 +766,17 @@ TypedArrayLoadType(ArrayBufferView::View
       case ArrayBufferView::TYPE_UINT16:
       case ArrayBufferView::TYPE_UINT32:
         return Type::Intish;
       case ArrayBufferView::TYPE_FLOAT32:
       case ArrayBufferView::TYPE_FLOAT64:
         return Type::Doublish;
       default:;
     }
-    JS_NOT_REACHED("Unexpected array type");
+    MOZ_ASSUME_NOT_REACHED("Unexpected array type");
     return Type();
 }
 
 enum ArrayStoreEnum {
     ArrayStore_Intish,
     ArrayStore_Doublish
 };
 
@@ -791,17 +791,17 @@ TypedArrayStoreType(ArrayBufferView::Vie
       case ArrayBufferView::TYPE_UINT16:
       case ArrayBufferView::TYPE_UINT32:
         return ArrayStore_Intish;
       case ArrayBufferView::TYPE_FLOAT32:
       case ArrayBufferView::TYPE_FLOAT64:
         return ArrayStore_Doublish;
       default:;
     }
-    JS_NOT_REACHED("Unexpected array type");
+    MOZ_ASSUME_NOT_REACHED("Unexpected array type");
     return ArrayStore_Doublish;
 }
 
 /*****************************************************************************/
 
 typedef Vector<PropertyName*,1> LabelVector;
 typedef Vector<MBasicBlock*,8> BlockVector;
 
@@ -3858,17 +3858,17 @@ IsValidIntMultiplyConstant(ParseNode *ex
             return true;
         return false;
       case NumLit::BigUnsigned:
       case NumLit::Double:
       case NumLit::OutOfRangeInt:
         return false;
     }
 
-    JS_NOT_REACHED("Bad literal");
+    MOZ_ASSUME_NOT_REACHED("Bad literal");
     return false;
 }
 
 static bool
 CheckMultiply(FunctionCompiler &f, ParseNode *star, MDefinition **def, Type *type)
 {
     JS_ASSERT(star->isKind(PNK_STAR));
     ParseNode *lhs = BinaryLeft(star);
@@ -4037,17 +4037,17 @@ CheckBitwise(FunctionCompiler &f, ParseN
     bool onlyOnRight;
     switch (bitwise->getKind()) {
       case PNK_BITOR:  identityElement = 0;  onlyOnRight = false; *type = Type::Signed;   break;
       case PNK_BITAND: identityElement = -1; onlyOnRight = false; *type = Type::Signed;   break;
       case PNK_BITXOR: identityElement = 0;  onlyOnRight = false; *type = Type::Signed;   break;
       case PNK_LSH:    identityElement = 0;  onlyOnRight = true;  *type = Type::Signed;   break;
       case PNK_RSH:    identityElement = 0;  onlyOnRight = true;  *type = Type::Signed;   break;
       case PNK_URSH:   identityElement = 0;  onlyOnRight = true;  *type = Type::Unsigned; break;
-      default: JS_NOT_REACHED("not a bitwise op");
+      default: MOZ_ASSUME_NOT_REACHED("not a bitwise op");
     }
 
     if (!onlyOnRight && IsBits32(lhs, identityElement)) {
         Type rhsType;
         if (!CheckExpr(f, rhs, Use::Normal, def, &rhsType))
             return false;
         if (!rhsType.isIntish())
             return f.failf(bitwise, "%s is not a subtype of intish", rhsType.toChars());
@@ -4083,17 +4083,17 @@ CheckBitwise(FunctionCompiler &f, ParseN
 
     switch (bitwise->getKind()) {
       case PNK_BITOR:  *def = f.bitwise<MBitOr>(lhsDef, rhsDef); break;
       case PNK_BITAND: *def = f.bitwise<MBitAnd>(lhsDef, rhsDef); break;
       case PNK_BITXOR: *def = f.bitwise<MBitXor>(lhsDef, rhsDef); break;
       case PNK_LSH:    *def = f.bitwise<MLsh>(lhsDef, rhsDef); break;
       case PNK_RSH:    *def = f.bitwise<MRsh>(lhsDef, rhsDef); break;
       case PNK_URSH:   *def = f.bitwise<MUrsh>(lhsDef, rhsDef); break;
-      default: JS_NOT_REACHED("not a bitwise op");
+      default: MOZ_ASSUME_NOT_REACHED("not a bitwise op");
     }
 
     return true;
 }
 
 static bool
 CheckExpr(FunctionCompiler &f, ParseNode *expr, Use use, MDefinition **def, Type *type)
 {
@@ -5631,17 +5631,17 @@ GenerateOOLConvert(ModuleCompiler &m, Re
           masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel);
 #if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP)
           masm.loadValue(Address(StackPointer, offsetToArgv), softfpReturnOperand);
 #else
           masm.loadDouble(Address(StackPointer, offsetToArgv), ReturnFloatReg);
 #endif
           break;
       default:
-          JS_NOT_REACHED("Unsupported convert type");
+          MOZ_ASSUME_NOT_REACHED("Unsupported convert type");
     }
 
     masm.freeStack(stackDec);
 }
 
 static void
 EnableActivation(AsmJSActivation *activation)
 {
--- a/js/src/ion/BacktrackingAllocator.cpp
+++ b/js/src/ion/BacktrackingAllocator.cpp
@@ -1146,17 +1146,17 @@ BacktrackingAllocator::populateSafepoint
                     safepoint->addNunboxPayload(i, *a);
                     break;
 #else
                   case LDefinition::BOX:
                     safepoint->addBoxedValue(*a);
                     break;
 #endif
                   default:
-                    JS_NOT_REACHED("Bad register type");
+                    MOZ_ASSUME_NOT_REACHED("Bad register type");
                 }
             }
         }
     }
 
     return true;
 }
 
@@ -1434,17 +1434,17 @@ BacktrackingAllocator::computeSpillWeigh
             usesTotal += 2000;
             break;
 
           case LUse::KEEPALIVE:
             break;
 
           default:
             // Note: RECOVERED_INPUT will not appear in UsePositionIterator.
-            JS_NOT_REACHED("Bad use");
+            MOZ_ASSUME_NOT_REACHED("Bad use");
         }
     }
 
     // Intervals for registers in groups get higher weights.
     if (interval->hint()->kind() != Requirement::NONE)
         usesTotal += 2000;
 
     // Compute spill weight as a use density, lowering the weight for long
--- a/js/src/ion/BaselineBailouts.cpp
+++ b/js/src/ion/BaselineBailouts.cpp
@@ -1323,16 +1323,16 @@ ion::FinishBailoutToBaseline(BaselineBai
         if (!HandleShapeGuardFailure(cx, outerScript, innerScript))
             return false;
         break;
       case Bailout_CachedShapeGuard:
         if (!HandleCachedShapeGuardFailure(cx, outerScript, innerScript))
             return false;
         break;
       default:
-        JS_NOT_REACHED("Unknown bailout kind!");
+        MOZ_ASSUME_NOT_REACHED("Unknown bailout kind!");
     }
 
     if (!CheckFrequentBailouts(cx, outerScript))
         return false;
 
     return true;
 }
--- a/js/src/ion/BaselineCompiler.cpp
+++ b/js/src/ion/BaselineCompiler.cpp
@@ -1082,17 +1082,17 @@ BaselineCompiler::storeValue(const Stack
         masm.loadValue(frame.addressOfThis(), scratch);
         masm.storeValue(scratch, dest);
         break;
       case StackValue::Stack:
         masm.loadValue(frame.addressOfStackValue(source), scratch);
         masm.storeValue(scratch, dest);
         break;
       default:
-        JS_NOT_REACHED("Invalid kind");
+        MOZ_ASSUME_NOT_REACHED("Invalid kind");
     }
 }
 
 bool
 BaselineCompiler::emit_JSOP_BITOR()
 {
     return emitBinaryArith();
 }
--- a/js/src/ion/BaselineFrameInfo.cpp
+++ b/js/src/ion/BaselineFrameInfo.cpp
@@ -43,17 +43,17 @@ FrameInfo::sync(StackValue *val)
         break;
       case StackValue::Register:
         masm.pushValue(val->reg());
         break;
       case StackValue::Constant:
         masm.pushValue(val->constant());
         break;
       default:
-        JS_NOT_REACHED("Invalid kind");
+        MOZ_ASSUME_NOT_REACHED("Invalid kind");
         break;
     }
 
     val->setStack();
 }
 
 void
 FrameInfo::syncStack(uint32_t uses)
@@ -100,17 +100,17 @@ FrameInfo::popValue(ValueOperand dest)
         break;
       case StackValue::Stack:
         masm.popValue(dest);
         break;
       case StackValue::Register:
         masm.moveValue(val->reg(), dest);
         break;
       default:
-        JS_NOT_REACHED("Invalid kind");
+        MOZ_ASSUME_NOT_REACHED("Invalid kind");
     }
 
     // masm.popValue already adjusted the stack pointer, don't do it twice.
     pop(DontAdjustStack);
 }
 
 void
 FrameInfo::popRegsAndSync(uint32_t uses)
@@ -136,17 +136,17 @@ FrameInfo::popRegsAndSync(uint32_t uses)
             masm.moveValue(R1, R2);
             val->setRegister(R2);
         }
         popValue(R1);
         popValue(R0);
         break;
       }
       default:
-        JS_NOT_REACHED("Invalid uses");
+        MOZ_ASSUME_NOT_REACHED("Invalid uses");
     }
 }
 
 #ifdef DEBUG
 void
 FrameInfo::assertValidState(const BytecodeInfo &info)
 {
     // Check stack depth.
@@ -173,14 +173,14 @@ FrameInfo::assertValidState(const Byteco
             ValueOperand reg = stack[i].reg();
             if (reg == R0) {
                 JS_ASSERT(!usedR0);
                 usedR0 = true;
             } else if (reg == R1) {
                 JS_ASSERT(!usedR1);
                 usedR1 = true;
             } else {
-                JS_NOT_REACHED("Invalid register");
+                MOZ_ASSUME_NOT_REACHED("Invalid register");
             }
         }
     }
 }
 #endif
--- a/js/src/ion/BaselineIC.cpp
+++ b/js/src/ion/BaselineIC.cpp
@@ -215,17 +215,17 @@ ICStub::trace(JSTracer *trc)
         JS_STATIC_ASSERT(ICSetElem_DenseAdd::MAX_PROTO_CHAIN_DEPTH == 4);
 
         switch (setElemStub->protoChainDepth()) {
           case 0: setElemStub->toImpl<0>()->traceShapes(trc); break;
           case 1: setElemStub->toImpl<1>()->traceShapes(trc); break;
           case 2: setElemStub->toImpl<2>()->traceShapes(trc); break;
           case 3: setElemStub->toImpl<3>()->traceShapes(trc); break;
           case 4: setElemStub->toImpl<4>()->traceShapes(trc); break;
-          default: JS_NOT_REACHED("Invalid proto stub.");
+          default: MOZ_ASSUME_NOT_REACHED("Invalid proto stub.");
         }
         break;
       }
       case ICStub::SetElem_TypedArray: {
         ICSetElem_TypedArray *setElemStub = toSetElem_TypedArray();
         MarkShape(trc, &setElemStub->shape(), "baseline-setelem-typedarray-shape");
         break;
       }
@@ -353,17 +353,17 @@ ICStub::trace(JSTracer *trc)
         MarkShape(trc, &propStub->newShape(), "baseline-setpropnativeadd-stub-newshape");
         JS_STATIC_ASSERT(ICSetProp_NativeAdd::MAX_PROTO_CHAIN_DEPTH == 4);
         switch (propStub->protoChainDepth()) {
           case 0: propStub->toImpl<0>()->traceShapes(trc); break;
           case 1: propStub->toImpl<1>()->traceShapes(trc); break;
           case 2: propStub->toImpl<2>()->traceShapes(trc); break;
           case 3: propStub->toImpl<3>()->traceShapes(trc); break;
           case 4: propStub->toImpl<4>()->traceShapes(trc); break;
-          default: JS_NOT_REACHED("Invalid proto stub.");
+          default: MOZ_ASSUME_NOT_REACHED("Invalid proto stub.");
         }
         break;
       }
       case ICStub::SetProp_CallScripted: {
         ICSetProp_CallScripted *callStub = toSetProp_CallScripted();
         MarkShape(trc, &callStub->shape(), "baseline-setpropcallscripted-stub-shape");
         MarkObject(trc, &callStub->holder(), "baseline-setpropcallscripted-stub-holder");
         MarkShape(trc, &callStub->holderShape(), "baseline-setpropcallscripted-stub-holdershape");
@@ -718,17 +718,17 @@ EnsureCanEnterIon(JSContext *cx, ICUseCo
 
     if (stat == Method_CantCompile)
         IonSpew(IonSpew_BaselineOSR, "  Can't compile with Ion!");
     else if (stat == Method_Skipped)
         IonSpew(IonSpew_BaselineOSR, "  Skipped compile with Ion!");
     else if (stat == Method_Compiled)
         IonSpew(IonSpew_BaselineOSR, "  Compiled with Ion!");
     else
-        JS_NOT_REACHED("Invalid MethodStatus!");
+        MOZ_ASSUME_NOT_REACHED("Invalid MethodStatus!");
 
     // Failed to compile.  Reset use count and return.
     if (stat != Method_Compiled) {
         // TODO: If stat == Method_CantCompile, insert stub that just skips the useCount
         // entirely, instead of resetting it.
         bool bailoutExpected = script->hasIonScript() && script->ionScript()->bailoutExpected();
         if (stat == Method_CantCompile || bailoutExpected) {
             IonSpew(IonSpew_BaselineOSR, "  Reset UseCount cantCompile=%s bailoutExpected=%s!",
@@ -1431,17 +1431,17 @@ DoTypeUpdateFallback(JSContext *cx, Base
         if (*pc == JSOP_SETALIASEDVAR)
             id = NameToId(ScopeCoordinateName(cx, script, pc));
         else
             id = NameToId(script->getName(pc));
         types::AddTypePropertyId(cx, obj, id, value);
         break;
       }
       default:
-        JS_NOT_REACHED("Invalid stub");
+        MOZ_ASSUME_NOT_REACHED("Invalid stub");
         return false;
     }
 
     return stub->addUpdateStubForValue(cx, script, obj, id, value);
 }
 
 typedef bool (*DoTypeUpdateFallbackFn)(JSContext *, BaselineFrame *, ICUpdatedStub *, HandleValue,
                                        HandleValue);
@@ -2459,17 +2459,17 @@ DoBinaryArithFallback(JSContext *cx, Bas
         break;
       }
       case JSOP_URSH: {
         if (!UrshOperation(cx, script, pc, lhs, rhs, ret.address()))
             return false;
         break;
       }
       default:
-        JS_NOT_REACHED("Unhandled baseline arith op");
+        MOZ_ASSUME_NOT_REACHED("Unhandled baseline arith op");
         return false;
     }
 
     if (ret.isDouble())
         stub->setSawDoubleResult();
 
     // Check to see if a new stub should be generated.
     if (stub->numOptimizedStubs() >= ICBinaryArith_Fallback::MAX_OPTIMIZED_STUBS) {
@@ -2778,17 +2778,17 @@ ICBinaryArith_Double::Compiler::generate
       case JSOP_MOD:
         masm.setupUnalignedABICall(2, R0.scratchReg());
         masm.passABIArg(FloatReg0);
         masm.passABIArg(FloatReg1);
         masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, NumberMod), MacroAssembler::DOUBLE);
         JS_ASSERT(ReturnFloatReg == FloatReg0);
         break;
       default:
-        JS_NOT_REACHED("Unexpected op");
+        MOZ_ASSUME_NOT_REACHED("Unexpected op");
         return false;
     }
 
     masm.boxDouble(FloatReg0, R0);
     EmitReturnFromIC(masm);
 
     // Failure case - jump to next stub
     masm.bind(&failure);
@@ -2859,17 +2859,17 @@ ICBinaryArith_BooleanWithInt32::Compiler
       }
       case JSOP_BITAND: {
         masm.andPtr(rhsReg, lhsReg);
         masm.tagValue(JSVAL_TYPE_INT32, lhsReg, R0);
         EmitReturnFromIC(masm);
         break;
       }
       default:
-       JS_NOT_REACHED("Unhandled op for BinaryArith_BooleanWithInt32.");
+       MOZ_ASSUME_NOT_REACHED("Unhandled op for BinaryArith_BooleanWithInt32.");
        return false;
     }
 
     // Failure case - jump to next stub
     masm.bind(&failure);
     EmitStubGuardFailure(masm);
     return true;
 }
@@ -2922,17 +2922,17 @@ ICBinaryArith_DoubleWithInt32::Compiler:
         break;
       case JSOP_BITXOR:
         masm.xorPtr(intReg, intReg2);
         break;
       case JSOP_BITAND:
         masm.andPtr(intReg, intReg2);
         break;
       default:
-       JS_NOT_REACHED("Unhandled op for BinaryArith_DoubleWithInt32.");
+       MOZ_ASSUME_NOT_REACHED("Unhandled op for BinaryArith_DoubleWithInt32.");
        return false;
     }
     masm.tagValue(JSVAL_TYPE_INT32, intReg2, R0);
     EmitReturnFromIC(masm);
 
     // Failure case - jump to next stub
     masm.bind(&failure);
     EmitStubGuardFailure(masm);
@@ -2964,17 +2964,17 @@ DoUnaryArithFallback(JSContext *cx, Base
         res.setInt32(result);
         break;
       }
       case JSOP_NEG:
         if (!NegOperation(cx, script, pc, val, res))
             return false;
         break;
       default:
-        JS_NOT_REACHED("Unexpected op");
+        MOZ_ASSUME_NOT_REACHED("Unexpected op");
         return false;
     }
 
     if (res.isDouble())
         stub->setSawDoubleResult();
 
     if (stub->numOptimizedStubs() >= ICUnaryArith_Fallback::MAX_OPTIMIZED_STUBS) {
         // TODO: Discard/replace stubs.
@@ -4473,17 +4473,17 @@ ICSetElemDenseAddCompiler::getStub(ICStu
 
     ICUpdatedStub *stub = NULL;
     switch (protoChainDepth_) {
       case 0: stub = getStubSpecific<0>(space, &shapes); break;
       case 1: stub = getStubSpecific<1>(space, &shapes); break;
       case 2: stub = getStubSpecific<2>(space, &shapes); break;
       case 3: stub = getStubSpecific<3>(space, &shapes); break;
       case 4: stub = getStubSpecific<4>(space, &shapes); break;
-      default: JS_NOT_REACHED("ProtoChainDepth too high.");
+      default: MOZ_ASSUME_NOT_REACHED("ProtoChainDepth too high.");
     }
     if (!stub || !stub->initUpdatingChain(cx, space))
         return NULL;
     return stub;
 }
 
 bool
 ICSetElemDenseAddCompiler::generateStubCode(MacroAssembler &masm)
@@ -6447,17 +6447,17 @@ ICSetPropNativeAddCompiler::getStub(ICSt
 
     ICUpdatedStub *stub = NULL;
     switch(protoChainDepth_) {
       case 0: stub = getStubSpecific<0>(space, &shapes); break;
       case 1: stub = getStubSpecific<1>(space, &shapes); break;
       case 2: stub = getStubSpecific<2>(space, &shapes); break;
       case 3: stub = getStubSpecific<3>(space, &shapes); break;
       case 4: stub = getStubSpecific<4>(space, &shapes); break;
-      default: JS_NOT_REACHED("ProtoChainDepth too high.");
+      default: MOZ_ASSUME_NOT_REACHED("ProtoChainDepth too high.");
     }
     if (!stub || !stub->initUpdatingChain(cx, space))
         return NULL;
     return stub;
 }
 
 bool
 ICSetPropNativeAddCompiler::generateStubCode(MacroAssembler &masm)
@@ -8134,17 +8134,17 @@ ICTypeOf_Typed::Compiler::generateStubCo
         masm.branchTestNumber(Assembler::NotEqual, R0, &failure);
         break;
 
       case JSTYPE_BOOLEAN:
         masm.branchTestBoolean(Assembler::NotEqual, R0, &failure);
         break;
 
       default:
-        JS_NOT_REACHED("Unexpected type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected type");
     }
 
     masm.movePtr(ImmGCPtr(typeString_), R0.scratchReg());
     masm.tagValue(JSVAL_TYPE_STRING, R0.scratchReg(), R0);
     EmitReturnFromIC(masm);
 
     masm.bind(&failure);
     EmitStubGuardFailure(masm);
--- a/js/src/ion/BaselineIC.h
+++ b/js/src/ion/BaselineIC.h
@@ -539,17 +539,17 @@ class ICStub
     }
 
     static const char *KindString(Kind k) {
         switch(k) {
 #define DEF_KIND_STR(kindName) case kindName: return #kindName;
             IC_STUB_KIND_LIST(DEF_KIND_STR)
 #undef DEF_KIND_STR
           default:
-            JS_NOT_REACHED("Invalid kind.");
+            MOZ_ASSUME_NOT_REACHED("Invalid kind.");
             return "INVALID_KIND";
         }
     }
 
     enum Trait {
         Regular             = 0x0,
         Fallback            = 0x1,
         Monitored           = 0x2,
@@ -1041,17 +1041,17 @@ class ICStubCompiler
           case 1:
             regs.take(R0);
             break;
           case 2:
             regs.take(R0);
             regs.take(R1);
             break;
           default:
-            JS_NOT_REACHED("Invalid numInputs");
+            MOZ_ASSUME_NOT_REACHED("Invalid numInputs");
         }
 
         return regs;
     }
 
 #ifdef JSGC_GENERATIONAL
     inline bool emitPostWriteBarrierSlot(MacroAssembler &masm, Register obj, Register scratch,
                                          GeneralRegisterSet saveRegs);
--- a/js/src/ion/BaselineJIT.cpp
+++ b/js/src/ion/BaselineJIT.cpp
@@ -485,17 +485,17 @@ BaselineScript::icEntryFromPCOffset(uint
     for (size_t i = mid; i < numICEntries() && icEntry(i).pcOffset() == pcOffset; i--) {
         if (icEntry(i).isForOp())
             return icEntry(i);
     }
     for (size_t i = mid+1; i < numICEntries() && icEntry(i).pcOffset() == pcOffset; i++) {
         if (icEntry(i).isForOp())
             return icEntry(i);
     }
-    JS_NOT_REACHED("Invalid PC offset for IC entry.");
+    MOZ_ASSUME_NOT_REACHED("Invalid PC offset for IC entry.");
     return icEntry(mid);
 }
 
 ICEntry &
 BaselineScript::icEntryFromPCOffset(uint32_t pcOffset, ICEntry *prevLookedUpEntry)
 {
     // Do a linear forward search from the last queried PC offset, or fallback to a
     // binary search if the last offset is too far away.
@@ -631,17 +631,17 @@ BaselineScript::nativeCodeForPC(JSScript
             if (slotInfo)
                 *slotInfo = PCMappingSlotInfo(b & ~0x80);
             return method_->raw() + nativeOffset;
         }
 
         curPC += GetBytecodeLength(curPC);
     }
 
-    JS_NOT_REACHED("Invalid pc");
+    MOZ_ASSUME_NOT_REACHED("Invalid pc");
     return NULL;
 }
 
 jsbytecode *
 BaselineScript::pcForReturnOffset(JSScript *script, uint32_t nativeOffset)
 {
     JS_ASSERT(script->baselineScript() == this);
     JS_ASSERT(nativeOffset < method_->instructionsSize());
@@ -676,17 +676,17 @@ BaselineScript::pcForReturnOffset(JSScri
             curNativeOffset += reader.readUnsigned();
 
         if (curNativeOffset == nativeOffset)
             return curPC;
 
         curPC += GetBytecodeLength(curPC);
     }
 
-    JS_NOT_REACHED("Invalid pc");
+    MOZ_ASSUME_NOT_REACHED("Invalid pc");
     return NULL;
 }
 
 jsbytecode *
 BaselineScript::pcForReturnAddress(JSScript *script, uint8_t *nativeAddress)
 {
     JS_ASSERT(script->baselineScript() == this);
     JS_ASSERT(nativeAddress >= method_->raw());
--- a/js/src/ion/CodeGenerator.cpp
+++ b/js/src/ion/CodeGenerator.cpp
@@ -591,17 +591,17 @@ CodeGenerator::visitIntToString(LIntToSt
         ool = oolCallVM(IntToStringInfo, lir, (ArgList(), input),
                         StoreRegisterTo(output));
         break;
       case ParallelExecution:
         ool = oolCallVM(ParallelIntToStringInfo, lir, (ArgList(), input),
                         StoreRegisterTo(output));
         break;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
     if (!ool)
         return false;
 
     masm.branch32(Assembler::AboveOrEqual, input, Imm32(StaticStrings::INT_STATIC_LIMIT),
                   ool->entry());
 
     masm.movePtr(ImmWord(&gen->compartment->rt->staticStrings.intStaticTable), output);
@@ -632,17 +632,17 @@ CodeGenerator::visitDoubleToString(LDoub
         ool = oolCallVM(DoubleToStringInfo, lir, (ArgList(), input),
                         StoreRegisterTo(output));
         break;
       case ParallelExecution:
         ool = oolCallVM(ParallelDoubleToStringInfo, lir, (ArgList(), input),
                         StoreRegisterTo(output));
         break;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
     if (!ool)
         return false;
 
     masm.convertDoubleToInt32(input, temp, ool->entry(), true);
     masm.branch32(Assembler::AboveOrEqual, temp, Imm32(StaticStrings::INT_STATIC_LIMIT),
                   ool->entry());
 
@@ -3521,17 +3521,17 @@ CodeGenerator::visitMathFunctionD(LMathF
         break;
       case MMathFunction::ASin:
         funptr = JS_FUNC_TO_DATA_PTR(void *, js::math_asin_impl);
         break;
       case MMathFunction::ACos:
         funptr = JS_FUNC_TO_DATA_PTR(void *, js::math_acos_impl);
         break;
       default:
-        JS_NOT_REACHED("Unknown math function");
+        MOZ_ASSUME_NOT_REACHED("Unknown math function");
     }
 
     masm.callWithABI(funptr, MacroAssembler::DOUBLE);
     return true;
 }
 
 bool
 CodeGenerator::visitModD(LModD *ins)
@@ -3583,17 +3583,17 @@ CodeGenerator::visitBinaryV(LBinaryV *li
 
       case JSOP_MOD:
         return callVM(ModInfo, lir);
 
       case JSOP_URSH:
         return callVM(UrshInfo, lir);
 
       default:
-        JS_NOT_REACHED("Unexpected binary op");
+        MOZ_ASSUME_NOT_REACHED("Unexpected binary op");
         return false;
     }
 }
 
 typedef bool (*StringCompareFn)(JSContext *, HandleString, HandleString, JSBool *);
 static const VMFunction stringsEqualInfo =
     FunctionInfo<StringCompareFn>(ion::StringsEqual<true>);
 static const VMFunction stringsNotEqualInfo =
@@ -3731,17 +3731,17 @@ CodeGenerator::visitCompareVM(LCompareVM
 
           case JSOP_GT:
             return callVM(GtInfo, lir);
 
           case JSOP_GE:
             return callVM(GeInfo, lir);
 
           default:
-            JS_NOT_REACHED("Unexpected compare op");
+            MOZ_ASSUME_NOT_REACHED("Unexpected compare op");
             return false;
         }
 
       case ParallelExecution:
         switch (lir->mir()->jsop()) {
           case JSOP_EQ:
             return callVM(ParLooselyEqInfo, lir);
 
@@ -3762,22 +3762,22 @@ CodeGenerator::visitCompareVM(LCompareVM
 
           case JSOP_GT:
             return callVM(ParGtInfo, lir);
 
           case JSOP_GE:
             return callVM(ParGeInfo, lir);
 
           default:
-            JS_NOT_REACHED("Unexpected compare op");
+            MOZ_ASSUME_NOT_REACHED("Unexpected compare op");
             return false;
         }
     }
 
-    JS_NOT_REACHED("Unexpected exec mode");
+    MOZ_ASSUME_NOT_REACHED("Unexpected exec mode");
 }
 
 bool
 CodeGenerator::visitIsNullOrLikeUndefined(LIsNullOrLikeUndefined *lir)
 {
     JSOp op = lir->mir()->jsop();
     MCompare::CompareType compareType = lir->mir()->compareType();
     JS_ASSERT(compareType == MCompare::Compare_Undefined ||
@@ -4133,17 +4133,17 @@ IonCompartment::generateStringConcatStub
       case ParallelExecution:
         masm.push(temp1);
         masm.push(temp2);
         masm.parNewGCString(output, forkJoinSlice, temp1, temp2, &failurePopTemps);
         masm.pop(temp2);
         masm.pop(temp1);
         break;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
 
     // Store lengthAndFlags.
     JS_STATIC_ASSERT(JSString::ROPE_FLAGS == 0);
     masm.lshiftPtr(Imm32(JSString::LENGTH_SHIFT), temp2);
     masm.storePtr(temp2, Address(output, JSString::offsetOfLengthAndFlags()));
 
     // Store left and right nodes.
@@ -4178,17 +4178,17 @@ IonCompartment::generateStringConcatStub
       case ParallelExecution:
         masm.push(temp1);
         masm.push(temp2);
         masm.parNewGCShortString(output, forkJoinSlice, temp1, temp2, &failurePopTemps);
         masm.pop(temp2);
         masm.pop(temp1);
         break;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
 
     // Set lengthAndFlags.
     masm.lshiftPtr(Imm32(JSString::LENGTH_SHIFT), temp2);
     masm.orPtr(Imm32(JSString::FIXED_FLAGS), temp2);
     masm.storePtr(temp2, Address(output, JSString::offsetOfLengthAndFlags()));
 
     // Set chars pointer, keep in temp2 for copy loop below.
@@ -5724,17 +5724,17 @@ CodeGenerator::addGetPropertyCache(LInst
         GetPropertyIC cache(liveRegs, objReg, name, output, allowGetters);
         return addCache(ins, allocateCache(cache));
       }
       case ParallelExecution: {
         ParallelGetPropertyIC cache(objReg, name, output);
         return addCache(ins, allocateCache(cache));
       }
       default:
-        JS_NOT_REACHED("Bad execution mode");
+        MOZ_ASSUME_NOT_REACHED("Bad execution mode");
     }
 }
 
 bool
 CodeGenerator::visitGetPropertyCacheV(LGetPropertyCacheV *ins)
 {
     RegisterSet liveRegs = ins->safepoint()->liveRegs();
     Register objReg = ToRegister(ins->getOperand(0));
@@ -6067,17 +6067,17 @@ CodeGenerator::visitBitOpV(LBitOpV *lir)
         return callVM(BitXorInfo, lir);
       case JSOP_LSH:
         return callVM(BitLhsInfo, lir);
       case JSOP_RSH:
         return callVM(BitRhsInfo, lir);
       default:
         break;
     }
-    JS_NOT_REACHED("unexpected bitop");
+    MOZ_ASSUME_NOT_REACHED("unexpected bitop");
     return false;
 }
 
 class OutOfLineTypeOfV : public OutOfLineCodeBase<CodeGenerator>
 {
     LTypeOfV *ins_;
 
   public:
@@ -6912,17 +6912,17 @@ CodeGenerator::visitFunctionBoundary(LFu
                 restoreLive(lir);
                 return true;
             }
 
             sps_.pop(masm, temp);
             return true;
 
         default:
-            JS_NOT_REACHED("invalid LFunctionBoundary type");
+            MOZ_ASSUME_NOT_REACHED("invalid LFunctionBoundary type");
     }
 }
 
 bool
 CodeGenerator::visitOutOfLineParallelAbort(OutOfLineParallelAbort *ool)
 {
     ParallelBailoutCause cause = ool->cause();
     jsbytecode *bytecode = ool->bytecode();
--- a/js/src/ion/CompactBuffer.h
+++ b/js/src/ion/CompactBuffer.h
@@ -37,17 +37,17 @@ class CompactBufferReader
         while (true) {
             JS_ASSERT(shift < 32);
             byte = readByte();
             val |= (uint32_t(byte) >> 1) << shift;
             shift += 7;
             if (!(byte & 1))
                 return val;
         }
-        JS_NOT_REACHED("unreachable");
+        MOZ_ASSUME_NOT_REACHED("unreachable");
         return 0;
     }
 
   public:
     CompactBufferReader(const uint8_t *start, const uint8_t *end)
       : buffer_(start),
         end_(end)
     { }
--- a/js/src/ion/ExecutionModeInlines.h
+++ b/js/src/ion/ExecutionModeInlines.h
@@ -14,98 +14,98 @@ namespace ion {
 
 static inline bool
 HasIonScript(JSScript *script, ExecutionMode cmode)
 {
     switch (cmode) {
       case SequentialExecution: return script->hasIonScript();
       case ParallelExecution: return script->hasParallelIonScript();
     }
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
     return false;
 }
 
 static inline IonScript *
 GetIonScript(JSScript *script, ExecutionMode cmode)
 {
     switch (cmode) {
       case SequentialExecution: return script->maybeIonScript();
       case ParallelExecution: return script->maybeParallelIonScript();
     }
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
     return NULL;
 }
 
 static inline void
 SetIonScript(JSScript *script, ExecutionMode cmode, IonScript *ionScript)
 {
     switch (cmode) {
       case SequentialExecution: script->setIonScript(ionScript); return;
       case ParallelExecution: script->setParallelIonScript(ionScript); return;
     }
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
 }
 
 static inline size_t
 OffsetOfIonInJSScript(ExecutionMode cmode)
 {
     switch (cmode) {
       case SequentialExecution: return JSScript::offsetOfIonScript();
       case ParallelExecution: return JSScript::offsetOfParallelIonScript();
     }
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
 }
 
 static inline bool
 CanIonCompile(JSScript *script, ExecutionMode cmode)
 {
     switch (cmode) {
       case SequentialExecution: return script->canIonCompile();
       case ParallelExecution: return script->canParallelIonCompile();
     }
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
     return false;
 }
 
 static inline bool
 CanIonCompile(JSFunction *fun, ExecutionMode cmode)
 {
     return fun->isInterpreted() && CanIonCompile(fun->nonLazyScript(), cmode);
 }
 
 static inline bool
 CompilingOffThread(JSScript *script, ExecutionMode cmode)
 {
     switch (cmode) {
       case SequentialExecution: return script->isIonCompilingOffThread();
       case ParallelExecution: return script->isParallelIonCompilingOffThread();
     }
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
     return false;
 }
 
 static inline bool
 CompilingOffThread(HandleScript script, ExecutionMode cmode)
 {
     switch (cmode) {
       case SequentialExecution: return script->isIonCompilingOffThread();
       case ParallelExecution: return script->isParallelIonCompilingOffThread();
     }
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
     return false;
 }
 
 static inline types::CompilerOutput::Kind
 CompilerOutputKind(ExecutionMode cmode)
 {
     switch (cmode) {
       case SequentialExecution: return types::CompilerOutput::Ion;
       case ParallelExecution: return types::CompilerOutput::ParallelIon;
     }
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
     return types::CompilerOutput::Ion;
 }
 
 } // namespace ion
 } // namespace js
 
 #endif  // JS_ION
 
--- a/js/src/ion/FixedArityList.h
+++ b/js/src/ion/FixedArityList.h
@@ -30,22 +30,22 @@ class FixedArityList
     }
 };
 
 template <typename T>
 class FixedArityList<T, 0>
 {
   public:
     T &operator [](size_t index) {
-        JS_NOT_REACHED("no items");
+        MOZ_ASSUME_NOT_REACHED("no items");
         static T *operand = NULL;
         return *operand;
     }
     const T &operator [](size_t index) const {
-        JS_NOT_REACHED("no items");
+        MOZ_ASSUME_NOT_REACHED("no items");
         static T *operand = NULL;
         return *operand;
     }
 };
 
 } // namespace ion
 } // namespace js
 
--- a/js/src/ion/Ion.cpp
+++ b/js/src/ion/Ion.cpp
@@ -814,32 +814,32 @@ IonScript::getSafepointIndex(uint32_t di
         while (++guess <= maxEntry) {
             guessDisp = table[guess].displacement();
             JS_ASSERT(guessDisp <= disp);
             if (guessDisp == disp)
                 return &table[guess];
         }
     }
 
-    JS_NOT_REACHED("displacement not found.");
+    MOZ_ASSUME_NOT_REACHED("displacement not found.");
     return NULL;
 }
 
 const OsiIndex *
 IonScript::getOsiIndex(uint32_t disp) const
 {
     for (const OsiIndex *it = osiIndices(), *end = osiIndices() + osiIndexEntries_;
          it != end;
          ++it)
     {
         if (it->returnPointDisplacement() == disp)
             return it;
     }
 
-    JS_NOT_REACHED("Failed to find OSI point return address");
+    MOZ_ASSUME_NOT_REACHED("Failed to find OSI point return address");
     return NULL;
 }
 
 const OsiIndex *
 IonScript::getOsiIndex(uint8_t *retAddr) const
 {
     IonSpew(IonSpew_Invalidate, "IonScript %p has method %p raw %p", (void *) this, (void *)
             method(), method()->raw());
@@ -1213,17 +1213,17 @@ GenerateLIR(MIRGenerator *mir)
             return NULL;
         if (!integrity.check(true))
             return NULL;
         IonSpewPass("Allocate Registers [Stupid]");
         break;
       }
 
       default:
-        JS_NOT_REACHED("Bad regalloc");
+        MOZ_ASSUME_NOT_REACHED("Bad regalloc");
     }
 
     if (mir->shouldCancel("Allocate Registers"))
         return NULL;
 
     // Now that all optimization and register allocation is done, re-introduce
     // critical edges to avoid unnecessary jumps.
     if (!UnsplitEdges(lir))
@@ -2000,17 +2000,17 @@ InvalidateActivation(FreeOp *fop, uint8_
           case IonFrame_BaselineStub:
             IonSpew(IonSpew_Invalidate, "#%d baseline stub frame @ %p", frameno, it.fp());
             break;
           case IonFrame_Rectifier:
             IonSpew(IonSpew_Invalidate, "#%d rectifier frame @ %p", frameno, it.fp());
             break;
           case IonFrame_Unwound_OptimizedJS:
           case IonFrame_Unwound_BaselineStub:
-            JS_NOT_REACHED("invalid");
+            MOZ_ASSUME_NOT_REACHED("invalid");
             break;
           case IonFrame_Unwound_Rectifier:
             IonSpew(IonSpew_Invalidate, "#%d unwound rectifier frame @ %p", frameno, it.fp());
             break;
           case IonFrame_Osr:
             IonSpew(IonSpew_Invalidate, "#%d osr frame @ %p", frameno, it.fp());
             break;
           case IonFrame_Entry:
@@ -2313,17 +2313,17 @@ ion::ForbidCompilation(JSContext *cx, JS
             if (!Invalidate(cx, script, mode, false))
                 return;
         }
 
         script->setParallelIonScript(ION_DISABLED_SCRIPT);
         return;
     }
 
-    JS_NOT_REACHED("No such execution mode");
+    MOZ_ASSUME_NOT_REACHED("No such execution mode");
 }
 
 uint32_t
 ion::UsesBeforeIonRecompile(JSScript *script, jsbytecode *pc)
 {
     JS_ASSERT(pc == script->code || JSOp(*pc) == JSOP_LOOPENTRY);
 
     uint32_t minUses = js_IonOptions.usesBeforeCompile;
--- a/js/src/ion/IonAnalysis.cpp
+++ b/js/src/ion/IonAnalysis.cpp
@@ -565,17 +565,17 @@ TypeAnalyzer::replaceRedundantPhi(MPhi *
         break;
       case MIRType_Null:
         v = NullValue();
         break;
       case MIRType_Magic:
         v = MagicValue(JS_OPTIMIZED_ARGUMENTS);
         break;
       default:
-        JS_NOT_REACHED("unexpected type");
+        MOZ_ASSUME_NOT_REACHED("unexpected type");
         return;
     }
     MConstant *c = MConstant::New(v);
     // The instruction pass will insert the box
     block->insertBefore(*(block->begin()), c);
     phi->replaceAllUsesWith(c);
 }
 
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -1099,29 +1099,29 @@ IonBuilder::snoopControlFlow(JSOp op)
 
           case SRC_WHILE:
           case SRC_FOR_IN:
             // while (cond) { }
             return whileOrForInLoop(sn);
 
           default:
             // Hard assert for now - make an error later.
-            JS_NOT_REACHED("unknown goto case");
+            MOZ_ASSUME_NOT_REACHED("unknown goto case");
             break;
         }
         break;
       }
 
       case JSOP_TABLESWITCH:
         return tableSwitch(op, info().getNote(cx, pc));
 
       case JSOP_IFNE:
         // We should never reach an IFNE, it's a stopAt point, which will
         // trigger closing the loop.
-        JS_NOT_REACHED("we should never reach an ifne!");
+        MOZ_ASSUME_NOT_REACHED("we should never reach an ifne!");
         return ControlStatus_Error;
 
       default:
         break;
     }
     return ControlStatus_None;
 }
 
@@ -1400,17 +1400,17 @@ IonBuilder::inspectOpcode(JSOp op)
       case JSOP_UINT24:
         return pushConstant(Int32Value(GET_UINT24(pc)));
 
       case JSOP_INT32:
         return pushConstant(Int32Value(GET_INT32(pc)));
 
       case JSOP_LOOPHEAD:
         // JSOP_LOOPHEAD is handled when processing the loop header.
-        JS_NOT_REACHED("JSOP_LOOPHEAD outside loop");
+        MOZ_ASSUME_NOT_REACHED("JSOP_LOOPHEAD outside loop");
         return true;
 
       case JSOP_GETELEM:
       case JSOP_CALLELEM:
         return jsop_getelem();
 
       case JSOP_SETELEM:
         return jsop_setelem();
@@ -1601,17 +1601,17 @@ IonBuilder::processCfgEntry(CFGState &st
 
       case CFGState::AND_OR:
         return processAndOrEnd(state);
 
       case CFGState::LABEL:
         return processLabelEnd(state);
 
       default:
-        JS_NOT_REACHED("unknown cfgstate");
+        MOZ_ASSUME_NOT_REACHED("unknown cfgstate");
     }
     return ControlStatus_Error;
 }
 
 IonBuilder::ControlStatus
 IonBuilder::processIfEnd(CFGState &state)
 {
     if (current) {
@@ -2250,17 +2250,17 @@ IonBuilder::processSwitchBreak(JSOp op)
     switch (state.state) {
       case CFGState::TABLE_SWITCH:
         breaks = &state.tableswitch.breaks;
         break;
       case CFGState::COND_SWITCH_BODY:
         breaks = &state.condswitch.breaks;
         break;
       default:
-        JS_NOT_REACHED("Unexpected switch state.");
+        MOZ_ASSUME_NOT_REACHED("Unexpected switch state.");
         return ControlStatus_Error;
     }
 
     *breaks = new DeferredEdge(current, *breaks);
 
     setCurrent(NULL);
     pc += js_CodeSpec[op].length;
     return processControlEnd();
@@ -2327,17 +2327,17 @@ IonBuilder::maybeLoop(JSOp op, jssrcnote
 
             // for (; ; update?)
             if (SN_TYPE(sn) == SRC_FOR)
                 return forLoop(op, sn);
         }
         break;
 
       default:
-        JS_NOT_REACHED("unexpected opcode");
+        MOZ_ASSUME_NOT_REACHED("unexpected opcode");
         return ControlStatus_Error;
     }
 
     return ControlStatus_None;
 }
 
 void
 IonBuilder::assertValidLoopHeadOp(jsbytecode *pc)
@@ -2358,17 +2358,17 @@ IonBuilder::assertValidLoopHeadOp(jsbyte
 
         jsbytecode *expected_ifne;
         switch (state.state) {
           case CFGState::DO_WHILE_LOOP_BODY:
             expected_ifne = state.loop.updateEnd;
             break;
 
           default:
-            JS_NOT_REACHED("JSOP_LOOPHEAD unexpected source note");
+            MOZ_ASSUME_NOT_REACHED("JSOP_LOOPHEAD unexpected source note");
             return;
         }
 
         // Make sure this loop goes to the same ifne as the loop header's
         // source notes or GOTO.
         JS_ASSERT(ifne == expected_ifne);
     } else {
         JS_ASSERT(state.state != CFGState::DO_WHILE_LOOP_BODY);
@@ -3141,17 +3141,17 @@ IonBuilder::jsop_ifeq(JSOp op)
         JS_ASSERT(falseEnd >= falseStart);
 
         if (!cfgStack_.append(CFGState::IfElse(trueEnd, falseEnd, ifFalse)))
             return false;
         break;
       }
 
       default:
-        JS_NOT_REACHED("unexpected source note type");
+        MOZ_ASSUME_NOT_REACHED("unexpected source note type");
         break;
     }
 
     // Switch to parsing the true branch. Note that no PC update is needed,
     // it's the next instruction.
     setCurrentAndSpecializePhis(ifTrue);
 
     return true;
@@ -3171,17 +3171,17 @@ IonBuilder::processReturn(JSOp op)
         MInstruction *ins = MConstant::New(UndefinedValue());
         current->add(ins);
         def = ins;
         break;
       }
 
       default:
         def = NULL;
-        JS_NOT_REACHED("unknown return op");
+        MOZ_ASSUME_NOT_REACHED("unknown return op");
         break;
     }
 
     if (instrumentedProfiling())
         current->add(MFunctionBoundary::New(script(), MFunctionBoundary::Exit));
     MReturn *ret = MReturn::New(def);
     current->end(ret);
 
@@ -3261,17 +3261,17 @@ IonBuilder::jsop_bitop(JSOp op)
         ins = MRsh::New(left, right);
         break;
 
       case JSOP_URSH:
         ins = MUrsh::New(left, right);
         break;
 
       default:
-        JS_NOT_REACHED("unexpected bitop");
+        MOZ_ASSUME_NOT_REACHED("unexpected bitop");
         return false;
     }
 
     current->add(ins);
     ins->infer(inspector, pc);
 
     current->push(ins);
     if (ins->isEffectful() && !resumeAfter(ins))
@@ -3319,17 +3319,17 @@ IonBuilder::jsop_binary(JSOp op, MDefini
         ins = MDiv::New(left, right);
         break;
 
       case JSOP_MOD:
         ins = MMod::New(left, right);
         break;
 
       default:
-        JS_NOT_REACHED("unexpected binary opcode");
+        MOZ_ASSUME_NOT_REACHED("unexpected binary opcode");
         return false;
     }
 
     bool overflowed = types::HasOperationOverflowed(script(), pc);
 
     current->add(ins);
     ins->infer(inspector, pc, overflowed);
     current->push(ins);
@@ -6082,17 +6082,17 @@ ion::TypeSetIncludes(types::TypeSet *typ
 
       case MIRType_Object:
         return types->unknownObject() || (inputTypes && inputTypes->isSubset(types));
 
       case MIRType_Value:
         return types->unknown() || (inputTypes && inputTypes->isSubset(types));
 
       default:
-        JS_NOT_REACHED("Bad input type");
+        MOZ_ASSUME_NOT_REACHED("Bad input type");
         return false;
     }
 }
 
 // Whether a write of the given value may need a post-write barrier for GC purposes.
 bool
 ion::NeedsPostBarrier(CompileInfo &info, MDefinition *value)
 {
@@ -6591,17 +6591,17 @@ IonBuilder::jsop_getelem_typed(int array
           case TypedArray::TYPE_UINT32:
             knownType = allowDouble ? MIRType_Double : MIRType_Int32;
             break;
           case TypedArray::TYPE_FLOAT32:
           case TypedArray::TYPE_FLOAT64:
             knownType = MIRType_Double;
             break;
           default:
-            JS_NOT_REACHED("Unknown typed array type");
+            MOZ_ASSUME_NOT_REACHED("Unknown typed array type");
             return false;
         }
 
         // Get the length.
         MInstruction *length = getTypedArrayLength(obj);
         current->add(length);
 
         // Bounds check.
@@ -6638,17 +6638,17 @@ IonBuilder::jsop_getelem_typed(int array
                 needsBarrier = false;
             break;
           case TypedArray::TYPE_FLOAT32:
           case TypedArray::TYPE_FLOAT64:
             if (allowDouble)
                 needsBarrier = false;
             break;
           default:
-            JS_NOT_REACHED("Unknown typed array type");
+            MOZ_ASSUME_NOT_REACHED("Unknown typed array type");
             return false;
         }
 
         // Assume we will read out-of-bound values. In this case the
         // bounds check will be part of the instruction, and the instruction
         // will always return a Value.
         MLoadTypedArrayElementHole *load =
             MLoadTypedArrayElementHole::New(obj, id, arrayType, allowDouble);
--- a/js/src/ion/IonCaches.cpp
+++ b/js/src/ion/IonCaches.cpp
@@ -2829,17 +2829,17 @@ IsCacheableScopeChain(JSObject *scopeCha
 
         scopeChain = &scopeChain->as<ScopeObject>().enclosingScope();
         if (!scopeChain) {
             IonSpew(IonSpew_InlineCaches, "Scope chain indirect hit");
             return false;
         }
     }
 
-    JS_NOT_REACHED("Shouldn't get here");
+    MOZ_ASSUME_NOT_REACHED("Shouldn't get here");
     return false;
 }
 
 JSObject *
 BindNameIC::update(JSContext *cx, size_t cacheIndex, HandleObject scopeChain)
 {
     AutoFlushCache afc ("BindNameCache");
 
--- a/js/src/ion/IonCaches.h
+++ b/js/src/ion/IonCaches.h
@@ -33,17 +33,17 @@ namespace ion {
 IONCACHE_KIND_LIST(FORWARD_DECLARE)
 #undef FORWARD_DECLARE
 
 class IonCacheVisitor
 {
   public:
 #define VISIT_INS(op)                                               \
     virtual bool visit##op##IC(CodeGenerator *codegen, op##IC *) {  \
-        JS_NOT_REACHED("NYI: " #op "IC");                           \
+        MOZ_ASSUME_NOT_REACHED("NYI: " #op "IC");                           \
         return false;                                               \
     }
 
     IONCACHE_KIND_LIST(VISIT_INS)
 #undef VISIT_INS
 };
 
 // Common shared temporary state needed during codegen between the different
--- a/js/src/ion/IonCompartment.h
+++ b/js/src/ion/IonCompartment.h
@@ -285,17 +285,17 @@ class IonCompartment
     }
 
     IonCode *getBailoutTable(const FrameSizeClass &frameClass);
 
     IonCode *getArgumentsRectifier(ExecutionMode mode) {
         switch (mode) {
           case SequentialExecution: return rt->argumentsRectifier_;
           case ParallelExecution:   return rt->parallelArgumentsRectifier_;
-          default:                  JS_NOT_REACHED("No such execution mode");
+          default:                  MOZ_ASSUME_NOT_REACHED("No such execution mode");
         }
     }
 
     void *getArgumentsRectifierReturnAddr() {
         return rt->argumentsRectifierReturnAddr_;
     }
 
     IonCode *getInvalidationThunk() {
@@ -321,17 +321,17 @@ class IonCompartment
     IonCode *debugTrapHandler(JSContext *cx) {
         return rt->debugTrapHandler(cx);
     }
 
     IonCode *stringConcatStub(ExecutionMode mode) {
         switch (mode) {
           case SequentialExecution: return stringConcatStub_;
           case ParallelExecution:   return parallelStringConcatStub_;
-          default:                  JS_NOT_REACHED("No such execution mode");
+          default:                  MOZ_ASSUME_NOT_REACHED("No such execution mode");
         }
     }
 
     AutoFlushCache *flusher() {
         return rt->flusher();
     }
     void setFlusher(AutoFlushCache *fl) {
         rt->setFlusher(fl);
--- a/js/src/ion/IonFrames-inl.h
+++ b/js/src/ion/IonFrames-inl.h
@@ -42,17 +42,17 @@ SizeOfFramePrefix(FrameType type)
         return IonRectifierFrameLayout::Size();
       case IonFrame_Unwound_Rectifier:
         return IonUnwoundRectifierFrameLayout::Size();
       case IonFrame_Exit:
         return IonExitFrameLayout::Size();
       case IonFrame_Osr:
         return IonOsrFrameLayout::Size();
       default:
-        JS_NOT_REACHED("unknown frame type");
+        MOZ_ASSUME_NOT_REACHED("unknown frame type");
     }
     return 0;
 }
 
 inline IonCommonFrameLayout *
 IonFrameIterator::current() const
 {
     return (IonCommonFrameLayout *)current_;
--- a/js/src/ion/IonFrames.cpp
+++ b/js/src/ion/IonFrames.cpp
@@ -389,17 +389,17 @@ HandleException(JSContext *cx, const Ion
                 return;
             }
 
             // DebugEpilogue threw an exception. Propagate to the caller frame.
             *calledDebugEpilogue = true;
             return;
 
           default:
-            JS_NOT_REACHED("Invalid trap status");
+            MOZ_ASSUME_NOT_REACHED("Invalid trap status");
         }
     }
 
     if (!script->hasTrynotes())
         return;
 
     JSTryNote *tn = script->trynotes()->vector;
     JSTryNote *tnEnd = tn + script->trynotes()->length;
@@ -451,17 +451,17 @@ HandleException(JSContext *cx, const Ion
                 UnwindIteratorForUncatchableException(cx, iterObject);
             break;
           }
 
           case JSTRY_LOOP:
             break;
 
           default:
-            JS_NOT_REACHED("Invalid try note");
+            MOZ_ASSUME_NOT_REACHED("Invalid try note");
         }
     }
 
 }
 
 void
 HandleException(ResumeFromException *rfe)
 {
@@ -622,17 +622,17 @@ MarkCalleeToken(JSTracer *trc, CalleeTok
       }
       case CalleeToken_Script:
       {
         JSScript *script = CalleeTokenToScript(token);
         MarkScriptRoot(trc, &script, "ion-entry");
         return CalleeToToken(script);
       }
       default:
-        JS_NOT_REACHED("unknown callee token type");
+        MOZ_ASSUME_NOT_REACHED("unknown callee token type");
     }
 }
 
 static inline uintptr_t
 ReadAllocation(const IonFrameIterator &frame, const LAllocation *a)
 {
     if (a->isGeneralReg()) {
         Register reg = a->toGeneralReg()->reg();
@@ -772,17 +772,17 @@ JitActivationIterator::jitStackRange(uin
         min = reinterpret_cast<uintptr_t *>(frames.fp());
     } else {
         IonExitFrameLayout *exitFrame = frames.exitFrame();
         IonExitFooterFrame *footer = exitFrame->footer();
         const VMFunction *f = footer->function();
         if (exitFrame->isWrapperExit() && f->outParam == Type_Handle) {
             switch (f->outParamRootType) {
               case VMFunction::RootNone:
-                JS_NOT_REACHED("Handle outparam must have root type");
+                MOZ_ASSUME_NOT_REACHED("Handle outparam must have root type");
                 break;
               case VMFunction::RootObject:
               case VMFunction::RootString:
               case VMFunction::RootPropertyName:
               case VMFunction::RootFunction:
               case VMFunction::RootCell:
                 // These are all handles to GCThing pointers.
                 min = reinterpret_cast<uintptr_t *>(footer->outParam<void *>());
@@ -915,17 +915,17 @@ MarkIonExitFrame(JSTracer *trc, const Io
             argBase += 2 * sizeof(void *);
             break;
         }
     }
 
     if (f->outParam == Type_Handle) {
         switch (f->outParamRootType) {
           case VMFunction::RootNone:
-            JS_NOT_REACHED("Handle outparam must have root type");
+            MOZ_ASSUME_NOT_REACHED("Handle outparam must have root type");
             break;
           case VMFunction::RootObject:
             gc::MarkObjectRoot(trc, footer->outParam<JSObject *>(), "ion-vm-out");
             break;
           case VMFunction::RootString:
           case VMFunction::RootPropertyName:
             gc::MarkStringRoot(trc, footer->outParam<JSString *>(), "ion-vm-out");
             break;
@@ -955,28 +955,28 @@ MarkJitActivation(JSTracer *trc, const J
             break;
           case IonFrame_BaselineStub:
             MarkBaselineStubFrame(trc, frames);
             break;
           case IonFrame_OptimizedJS:
             MarkIonJSFrame(trc, frames);
             break;
           case IonFrame_Unwound_OptimizedJS:
-            JS_NOT_REACHED("invalid");
+            MOZ_ASSUME_NOT_REACHED("invalid");
             break;
           case IonFrame_Rectifier:
           case IonFrame_Unwound_Rectifier:
             break;
           case IonFrame_Osr:
             // The callee token will be marked by the callee JS frame;
             // otherwise, it does not need to be marked, since the frame is
             // dead.
             break;
           default:
-            JS_NOT_REACHED("unexpected frame type");
+            MOZ_ASSUME_NOT_REACHED("unexpected frame type");
             break;
         }
     }
 }
 
 void
 MarkJitActivations(JSRuntime *rt, JSTracer *trc)
 {
@@ -1109,17 +1109,17 @@ SnapshotIterator::FromTypedPayload(JSVal
         return Int32Value(payload);
       case JSVAL_TYPE_BOOLEAN:
         return BooleanValue(!!payload);
       case JSVAL_TYPE_STRING:
         return StringValue(reinterpret_cast<JSString *>(payload));
       case JSVAL_TYPE_OBJECT:
         return ObjectValue(*reinterpret_cast<JSObject *>(payload));
       default:
-        JS_NOT_REACHED("unexpected type - needs payload");
+        MOZ_ASSUME_NOT_REACHED("unexpected type - needs payload");
         return UndefinedValue();
     }
 }
 
 bool
 SnapshotIterator::slotReadable(const Slot &slot)
 {
     switch (slot.mode()) {
@@ -1179,17 +1179,17 @@ SnapshotIterator::slotValue(const Slot &
 
       case SnapshotReader::JS_INT32:
         return Int32Value(slot.int32Value());
 
       case SnapshotReader::CONSTANT:
         return ionScript_->getConstant(slot.constantIndex());
 
       default:
-        JS_NOT_REACHED("huh?");
+        MOZ_ASSUME_NOT_REACHED("huh?");
         return UndefinedValue();
     }
 }
 
 IonScript *
 IonFrameIterator::ionScript() const
 {
     JS_ASSERT(type() == IonFrame_OptimizedJS);
@@ -1199,17 +1199,17 @@ IonFrameIterator::ionScript() const
         return ionScript;
     switch (GetCalleeTokenTag(calleeToken())) {
       case CalleeToken_Function:
       case CalleeToken_Script:
         return script()->ionScript();
       case CalleeToken_ParallelFunction:
         return script()->parallelIonScript();
       default:
-        JS_NOT_REACHED("unknown callee token type");
+        MOZ_ASSUME_NOT_REACHED("unknown callee token type");
     }
 }
 
 const SafepointIndex *
 IonFrameIterator::safepoint() const
 {
     if (!cachedSafepointIndex_)
         cachedSafepointIndex_ = ionScript()->getSafepointIndex(returnAddressToFp());
--- a/js/src/ion/IonFrames.h
+++ b/js/src/ion/IonFrames.h
@@ -85,17 +85,17 @@ ScriptFromCalleeToken(CalleeToken token)
     switch (GetCalleeTokenTag(token)) {
       case CalleeToken_Script:
         return CalleeTokenToScript(token);
       case CalleeToken_Function:
         return CalleeTokenToFunction(token)->nonLazyScript();
       case CalleeToken_ParallelFunction:
         return CalleeTokenToParallelFunction(token)->nonLazyScript();
     }
-    JS_NOT_REACHED("invalid callee token tag");
+    MOZ_ASSUME_NOT_REACHED("invalid callee token tag");
     return NULL;
 }
 
 // In between every two frames lies a small header describing both frames. This
 // header, minimally, contains a returnAddress word and a descriptor word. The
 // descriptor describes the size and type of the previous frame, whereas the
 // returnAddress describes the address the newer frame (the callee) will return
 // to. The exact mechanism in which frames are laid out is architecture
--- a/js/src/ion/IonMacroAssembler.cpp
+++ b/js/src/ion/IonMacroAssembler.cpp
@@ -302,17 +302,17 @@ MacroAssembler::loadFromTypedArray(int a
       case TypedArray::TYPE_FLOAT64:
         if (arrayType == js::TypedArray::TYPE_FLOAT32)
             loadFloatAsDouble(src, dest.fpu());
         else
             loadDouble(src, dest.fpu());
         canonicalizeDouble(dest.fpu());
         break;
       default:
-        JS_NOT_REACHED("Invalid typed array type");
+        MOZ_ASSUME_NOT_REACHED("Invalid typed array type");
         break;
     }
 }
 
 template void MacroAssembler::loadFromTypedArray(int arrayType, const Address &src, AnyRegister dest,
                                                  Register temp, Label *fail);
 template void MacroAssembler::loadFromTypedArray(int arrayType, const BaseIndex &src, AnyRegister dest,
                                                  Register temp, Label *fail);
@@ -358,17 +358,17 @@ MacroAssembler::loadFromTypedArray(int a
         }
         break;
       case TypedArray::TYPE_FLOAT32:
       case TypedArray::TYPE_FLOAT64:
         loadFromTypedArray(arrayType, src, AnyRegister(ScratchFloatReg), dest.scratchReg(), NULL);
         boxDouble(ScratchFloatReg, dest);
         break;
       default:
-        JS_NOT_REACHED("Invalid typed array type");
+        MOZ_ASSUME_NOT_REACHED("Invalid typed array type");
         break;
     }
 }
 
 template void MacroAssembler::loadFromTypedArray(int arrayType, const Address &src, const ValueOperand &dest,
                                                  bool allowDouble, Register temp, Label *fail);
 template void MacroAssembler::loadFromTypedArray(int arrayType, const BaseIndex &src, const ValueOperand &dest,
                                                  bool allowDouble, Register temp, Label *fail);
@@ -1046,17 +1046,17 @@ MacroAssembler::enterExitFrameAndLoadCon
         // The scratch register is not used for sequential execution.
         enterExitFrame(f);
         loadJSContext(cxReg);
         break;
       case ParallelExecution:
         enterParallelExitFrameAndLoadSlice(f, cxReg, scratch);
         break;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
 }
 
 void
 MacroAssembler::handleFailure(ExecutionMode executionMode)
 {
     // Re-entry code is irrelevant because the exception will leave the
     // running function and never come back
@@ -1068,17 +1068,17 @@ MacroAssembler::handleFailure(ExecutionM
     switch (executionMode) {
       case SequentialExecution:
         handler = JS_FUNC_TO_DATA_PTR(void *, ion::HandleException);
         break;
       case ParallelExecution:
         handler = JS_FUNC_TO_DATA_PTR(void *, ion::HandleParallelFailure);
         break;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
     MacroAssemblerSpecific::handleFailureWithHandler(handler);
 
     // Doesn't actually emit code, but balances the leave()
     if (sps_)
         sps_->reenter(*this, InvalidReg);
 }
 
@@ -1088,32 +1088,32 @@ MacroAssembler::tagCallee(Register calle
     switch (mode) {
       case SequentialExecution:
         // CalleeToken_Function is untagged, so we don't need to do anything.
         return;
       case ParallelExecution:
         orPtr(Imm32(CalleeToken_ParallelFunction), callee);
         return;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
 }
 
 void
 MacroAssembler::clearCalleeTag(Register callee, ExecutionMode mode)
 {
     switch (mode) {
       case SequentialExecution:
         // CalleeToken_Function is untagged, so we don't need to do anything.
         return;
       case ParallelExecution:
         andPtr(Imm32(~0x3), callee);
         return;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
 }
 
 void printf0_(const char *output) {
     printf("%s", output);
 }
 
 void
@@ -1252,17 +1252,17 @@ MacroAssembler::convertValueToInt32(Valu
     bind(&done);
 }
 
 void
 MacroAssembler::PushEmptyRooted(VMFunction::RootType rootType)
 {
     switch (rootType) {
       case VMFunction::RootNone:
-        JS_NOT_REACHED("Handle must have root type");
+        MOZ_ASSUME_NOT_REACHED("Handle must have root type");
         break;
       case VMFunction::RootObject:
       case VMFunction::RootString:
       case VMFunction::RootPropertyName:
       case VMFunction::RootFunction:
       case VMFunction::RootCell:
         Push(ImmWord((void *)NULL));
         break;
@@ -1273,17 +1273,17 @@ MacroAssembler::PushEmptyRooted(VMFuncti
 }
 
 void
 MacroAssembler::popRooted(VMFunction::RootType rootType, Register cellReg,
                           const ValueOperand &valueReg)
 {
     switch (rootType) {
       case VMFunction::RootNone:
-        JS_NOT_REACHED("Handle must have root type");
+        MOZ_ASSUME_NOT_REACHED("Handle must have root type");
         break;
       case VMFunction::RootObject:
       case VMFunction::RootString:
       case VMFunction::RootPropertyName:
       case VMFunction::RootFunction:
       case VMFunction::RootCell:
         Pop(cellReg);
         break;
--- a/js/src/ion/IonMacroAssembler.h
+++ b/js/src/ion/IonMacroAssembler.h
@@ -184,17 +184,17 @@ class MacroAssembler : public MacroAssem
           case MIRType_Null:        return testNull(cond, val);
           case MIRType_Undefined:   return testUndefined(cond, val);
           case MIRType_Boolean:     return testBoolean(cond, val);
           case MIRType_Int32:       return testInt32(cond, val);
           case MIRType_String:      return testString(cond, val);
           case MIRType_Object:      return testObject(cond, val);
           case MIRType_Double:      return testDouble(cond, val);
           default:
-            JS_NOT_REACHED("Bad MIRType");
+            MOZ_ASSUME_NOT_REACHED("Bad MIRType");
         }
     }
 
     template <typename Value>
     void branchTestMIRType(Condition cond, const Value &val, MIRType type, Label *label) {
         cond = testMIRType(cond, val, type);
         j(cond, label);
     }
@@ -541,33 +541,33 @@ class MacroAssembler : public MacroAssem
           case TypedArray::TYPE_UINT16:
             store16(value, dest);
             break;
           case TypedArray::TYPE_INT32:
           case TypedArray::TYPE_UINT32:
             store32(value, dest);
             break;
           default:
-            JS_NOT_REACHED("Invalid typed array type");
+            MOZ_ASSUME_NOT_REACHED("Invalid typed array type");
             break;
         }
     }
 
     template<typename S, typename T>
     void storeToTypedFloatArray(int arrayType, const S &value, const T &dest) {
         switch (arrayType) {
           case TypedArray::TYPE_FLOAT32:
             convertDoubleToFloat(value, ScratchFloatReg);
             storeFloat(ScratchFloatReg, dest);
             break;
           case TypedArray::TYPE_FLOAT64:
             storeDouble(value, dest);
             break;
           default:
-            JS_NOT_REACHED("Invalid typed array type");
+            MOZ_ASSUME_NOT_REACHED("Invalid typed array type");
             break;
         }
     }
 
     Register extractString(const Address &address, Register scratch) {
         return extractObject(address, scratch);
     }
     Register extractString(const ValueOperand &value, Register scratch) {
@@ -941,17 +941,17 @@ JSOpToDoubleCondition(JSOp op)
         return Assembler::DoubleLessThan;
       case JSOP_LE:
         return Assembler::DoubleLessThanOrEqual;
       case JSOP_GT:
         return Assembler::DoubleGreaterThan;
       case JSOP_GE:
         return Assembler::DoubleGreaterThanOrEqual;
       default:
-        JS_NOT_REACHED("Unexpected comparison operation");
+        MOZ_ASSUME_NOT_REACHED("Unexpected comparison operation");
         return Assembler::DoubleEqual;
     }
 }
 
 // Note: the op may have been inverted during lowering (to put constants in a
 // position where they can be immediates), so it is important to use the
 // lir->jsop() instead of the mir->jsop() when it is present.
 static inline Assembler::Condition
@@ -969,17 +969,17 @@ JSOpToCondition(JSOp op, bool isSigned)
             return Assembler::LessThan;
           case JSOP_LE:
             return Assembler::LessThanOrEqual;
           case JSOP_GT:
             return Assembler::GreaterThan;
           case JSOP_GE:
             return Assembler::GreaterThanOrEqual;
           default:
-            JS_NOT_REACHED("Unrecognized comparison operation");
+            MOZ_ASSUME_NOT_REACHED("Unrecognized comparison operation");
             return Assembler::Equal;
         }
     } else {
         switch (op) {
           case JSOP_EQ:
           case JSOP_STRICTEQ:
             return Assembler::Equal;
           case JSOP_NE:
@@ -989,17 +989,17 @@ JSOpToCondition(JSOp op, bool isSigned)
             return Assembler::Below;
           case JSOP_LE:
             return Assembler::BelowOrEqual;
           case JSOP_GT:
             return Assembler::Above;
           case JSOP_GE:
             return Assembler::AboveOrEqual;
           default:
-            JS_NOT_REACHED("Unrecognized comparison operation");
+            MOZ_ASSUME_NOT_REACHED("Unrecognized comparison operation");
             return Assembler::Equal;
         }
     }
 }
 
 typedef Vector<MIRType, 8> MIRTypeVector;
 
 class ABIArgIter
--- a/js/src/ion/IonTypes.h
+++ b/js/src/ion/IonTypes.h
@@ -62,17 +62,17 @@ BailoutKindString(BailoutKind kind)
         return "Bailout_Monitor";
       case Bailout_BoundsCheck:
         return "Bailout_BoundsCheck";
       case Bailout_ShapeGuard:
         return "Bailout_ShapeGuard";
       case Bailout_CachedShapeGuard:
         return "Bailout_CachedShapeGuard";
       default:
-        JS_NOT_REACHED("Invalid BailoutKind");
+        MOZ_ASSUME_NOT_REACHED("Invalid BailoutKind");
     }
     return "INVALID_BAILOUT_KIND";
 }
 #endif
 
 // The ordering of this enumeration is important: Anything < Value is a
 // specialized type. Furthermore, anything < String has trivial conversion to
 // a number.
@@ -113,17 +113,17 @@ MIRTypeFromValueType(JSValueType type)
         return MIRType_Null;
       case JSVAL_TYPE_OBJECT:
         return MIRType_Object;
       case JSVAL_TYPE_MAGIC:
         return MIRType_Magic;
       case JSVAL_TYPE_UNKNOWN:
         return MIRType_Value;
       default:
-        JS_NOT_REACHED("unexpected jsval type");
+        MOZ_ASSUME_NOT_REACHED("unexpected jsval type");
         return MIRType_None;
     }
 }
 
 static inline JSValueType
 ValueTypeFromMIRType(MIRType type)
 {
   switch (type) {
@@ -181,17 +181,17 @@ StringFromMIRType(MIRType type)
       return "Slots";
     case MIRType_Elements:
       return "Elements";
     case MIRType_Pointer:
       return "Pointer";
     case MIRType_ForkJoinSlice:
       return "ForkJoinSlice";
     default:
-      JS_NOT_REACHED("Unknown MIRType.");
+      MOZ_ASSUME_NOT_REACHED("Unknown MIRType.");
       return "";
   }
 }
 
 static inline bool
 IsNumberType(MIRType type)
 {
     return type == MIRType_Int32 || type == MIRType_Double;
--- a/js/src/ion/LIR-Common.h
+++ b/js/src/ion/LIR-Common.h
@@ -4475,31 +4475,31 @@ class LPhi : public LInstruction
     void setOperand(size_t index, const LAllocation &a) {
         JS_ASSERT(index < numOperands());
         inputs_[index] = a;
     }
     size_t numTemps() const {
         return 0;
     }
     LDefinition *getTemp(size_t index) {
-        JS_NOT_REACHED("no temps");
+        MOZ_ASSUME_NOT_REACHED("no temps");
         return NULL;
     }
     void setTemp(size_t index, const LDefinition &temp) {
-        JS_NOT_REACHED("no temps");
+        MOZ_ASSUME_NOT_REACHED("no temps");
     }
     size_t numSuccessors() const {
         return 0;
     }
     MBasicBlock *getSuccessor(size_t i) const {
-        JS_NOT_REACHED("no successors");
+        MOZ_ASSUME_NOT_REACHED("no successors");
         return NULL;
     }
     void setSuccessor(size_t i, MBasicBlock *) {
-        JS_NOT_REACHED("no successors");
+        MOZ_ASSUME_NOT_REACHED("no successors");
     }
 
     virtual void printInfo(FILE *fp) {
         printOperands(fp);
     }
 };
 
 class LIn : public LCallInstructionHelper<1, BOX_PIECES+1, 0>
@@ -4788,30 +4788,30 @@ class LAsmJSCall : public LInstruction
     void setOperand(size_t index, const LAllocation &a) {
         JS_ASSERT(index < numOperands_);
         operands_[index] = a;
     }
     size_t numTemps() const {
         return 0;
     }
     LDefinition *getTemp(size_t index) {
-        JS_NOT_REACHED("no temps");
+        MOZ_ASSUME_NOT_REACHED("no temps");
     }
     void setTemp(size_t index, const LDefinition &a) {
-        JS_NOT_REACHED("no temps");
+        MOZ_ASSUME_NOT_REACHED("no temps");
     }
     size_t numSuccessors() const {
         return 0;
     }
     MBasicBlock *getSuccessor(size_t i) const {
-        JS_NOT_REACHED("no successors");
+        MOZ_ASSUME_NOT_REACHED("no successors");
         return NULL;
     }
     void setSuccessor(size_t i, MBasicBlock *) {
-        JS_NOT_REACHED("no successors");
+        MOZ_ASSUME_NOT_REACHED("no successors");
     }
 };
 
 class LAsmJSCheckOverRecursed : public LInstructionHelper<0, 0, 0>
 {
   public:
     LIR_HEADER(AsmJSCheckOverRecursed)
 
--- a/js/src/ion/LIR.cpp
+++ b/js/src/ion/LIR.cpp
@@ -265,17 +265,17 @@ LAllocation::toString() const
         return buf;
       case LAllocation::DOUBLE_ARGUMENT:
         JS_snprintf(buf, sizeof(buf), "arg:%d", toArgument()->index());
         return buf;
       case LAllocation::USE:
         PrintUse(buf, sizeof(buf), toUse());
         return buf;
       default:
-        JS_NOT_REACHED("what?");
+        MOZ_ASSUME_NOT_REACHED("what?");
         return "???";
     }
 }
 #endif // DEBUG
 
 void
 LInstruction::printOperands(FILE *fp)
 {
--- a/js/src/ion/LIR.h
+++ b/js/src/ion/LIR.h
@@ -545,17 +545,17 @@ class LDefinition
             // When we begin allocating slots vectors from the GC, this will
             // need to change to ::OBJECT.
             return LDefinition::GENERAL;
           case MIRType_Pointer:
             return LDefinition::GENERAL;
           case MIRType_ForkJoinSlice:
             return LDefinition::GENERAL;
           default:
-            JS_NOT_REACHED("unexpected type");
+            MOZ_ASSUME_NOT_REACHED("unexpected type");
             return LDefinition::GENERAL;
         }
     }
 };
 
 // Forward declarations of LIR types.
 #define LIROP(op) class L##op;
     LIR_OPCODE_LIST(LIROP)
@@ -712,17 +712,17 @@ class LInstructionVisitor
     }
 
     LInstructionVisitor()
       : ins_(NULL),
         lastPC_(NULL)
     {}
 
   public:
-#define VISIT_INS(op) virtual bool visit##op(L##op *) { JS_NOT_REACHED("NYI: " #op); return false; }
+#define VISIT_INS(op) virtual bool visit##op(L##op *) { MOZ_ASSUME_NOT_REACHED("NYI: " #op); return false; }
     LIR_OPCODE_LIST(VISIT_INS)
 #undef VISIT_INS
 };
 
 typedef InlineList<LInstruction>::iterator LInstructionIterator;
 typedef InlineList<LInstruction>::reverse_iterator LInstructionReverseIterator;
 
 class LPhi;
--- a/js/src/ion/LiveRangeAllocator.cpp
+++ b/js/src/ion/LiveRangeAllocator.cpp
@@ -25,17 +25,17 @@ Requirement::priority() const
 
       case Requirement::REGISTER:
         return 1;
 
       case Requirement::NONE:
         return 2;
 
       default:
-        JS_NOT_REACHED("Unknown requirement kind.");
+        MOZ_ASSUME_NOT_REACHED("Unknown requirement kind.");
         return -1;
     }
 }
 
 bool
 LiveInterval::Range::contains(const Range *other) const
 {
     Range pre, inside, post;
--- a/js/src/ion/LiveRangeAllocator.h
+++ b/js/src/ion/LiveRangeAllocator.h
@@ -112,17 +112,17 @@ UseCompatibleWith(const LUse *use, LAllo
         return alloc.isRegister() || alloc.isMemory();
       case LUse::REGISTER:
         return alloc.isRegister();
       case LUse::FIXED:
           // Fixed uses are handled using fixed intervals. The
           // UsePosition is only used as hint.
         return alloc.isRegister();
       default:
-        JS_NOT_REACHED("Unknown use policy");
+        MOZ_ASSUME_NOT_REACHED("Unknown use policy");
     }
     return false;
 }
 
 #ifdef DEBUG
 
 static inline bool
 DefinitionCompatibleWith(LInstruction *ins, const LDefinition *def, LAllocation alloc)
@@ -142,17 +142,17 @@ DefinitionCompatibleWith(LInstruction *i
         return alloc == *def->output();
       case LDefinition::MUST_REUSE_INPUT:
         if (!alloc.isRegister() || !ins->numOperands())
             return false;
         return alloc == *ins->getOperand(def->getReusedInput());
       case LDefinition::PASSTHROUGH:
         return true;
       default:
-        JS_NOT_REACHED("Unknown definition policy");
+        MOZ_ASSUME_NOT_REACHED("Unknown definition policy");
     }
     return false;
 }
 
 #endif // DEBUG
 
 static inline LDefinition *
 FindReusingDefinition(LInstruction *ins, LAllocation *alloc)
--- a/js/src/ion/Lowering.cpp
+++ b/js/src/ion/Lowering.cpp
@@ -838,17 +838,17 @@ LIRGenerator::visitCompare(MCompare *com
         LCompareV *lir = new LCompareV();
         if (!useBoxAtStart(lir, LCompareV::LhsInput, left))
             return false;
         if (!useBoxAtStart(lir, LCompareV::RhsInput, right))
             return false;
         return define(lir, comp);
     }
 
-    JS_NOT_REACHED("Unrecognized compare type.");
+    MOZ_ASSUME_NOT_REACHED("Unrecognized compare type.");
     return false;
 }
 
 static void
 ReorderCommutative(MDefinition **lhsp, MDefinition **rhsp)
 {
     MDefinition *lhs = *lhsp;
     MDefinition *rhs = *rhsp;
@@ -1447,17 +1447,17 @@ LIRGenerator::visitToDouble(MToDouble *c
       }
 
       case MIRType_Double:
         return redefine(convert, opd);
 
       default:
         // Objects might be effectful.
         // Strings are complicated - we don't handle them yet.
-        JS_NOT_REACHED("unexpected type");
+        MOZ_ASSUME_NOT_REACHED("unexpected type");
         return false;
     }
 }
 
 bool
 LIRGenerator::visitToInt32(MToInt32 *convert)
 {
     MDefinition *opd = convert->input();
@@ -1494,17 +1494,17 @@ LIRGenerator::visitToInt32(MToInt32 *con
         IonSpew(IonSpew_Abort, "Object to Int32 not supported yet.");
         return false;
 
       case MIRType_Undefined:
         IonSpew(IonSpew_Abort, "Undefined coerces to NaN, not int32_t.");
         return false;
 
       default:
-        JS_NOT_REACHED("unexpected type");
+        MOZ_ASSUME_NOT_REACHED("unexpected type");
         return false;
     }
 }
 
 bool
 LIRGenerator::visitTruncateToInt32(MTruncateToInt32 *truncate)
 {
     MDefinition *opd = truncate->input();
@@ -1527,31 +1527,31 @@ LIRGenerator::visitTruncateToInt32(MTrun
         return redefine(truncate, opd);
 
       case MIRType_Double:
         return lowerTruncateDToInt32(truncate);
 
       default:
         // Objects might be effectful.
         // Strings are complicated - we don't handle them yet.
-        JS_NOT_REACHED("unexpected type");
+        MOZ_ASSUME_NOT_REACHED("unexpected type");
         return false;
     }
 }
 
 bool
 LIRGenerator::visitToString(MToString *ins)
 {
     MDefinition *opd = ins->input();
 
     switch (opd->type()) {
       case MIRType_Null:
       case MIRType_Undefined:
       case MIRType_Boolean:
-        JS_NOT_REACHED("NYI: Lower MToString");
+        MOZ_ASSUME_NOT_REACHED("NYI: Lower MToString");
         return false;
 
       case MIRType_Double: {
         LDoubleToString *lir = new LDoubleToString(useRegister(opd), temp());
 
         if (!define(lir, ins))
             return false;
         return assignSafepoint(lir, ins);
@@ -1562,17 +1562,17 @@ LIRGenerator::visitToString(MToString *i
 
         if (!define(lir, ins))
             return false;
         return assignSafepoint(lir, ins);
       }
 
       default:
         // Objects might be effectful. (see ToPrimitive)
-        JS_NOT_REACHED("unexpected type");
+        MOZ_ASSUME_NOT_REACHED("unexpected type");
         return false;
     }
 }
 
 bool
 LIRGenerator::visitRegExp(MRegExp *ins)
 {
     LRegExp *lir = new LRegExp();
@@ -1656,17 +1656,17 @@ bool
 LIRGenerator::visitLoadSlot(MLoadSlot *ins)
 {
     switch (ins->type()) {
       case MIRType_Value:
         return defineBox(new LLoadSlotV(useRegister(ins->slots())), ins);
 
       case MIRType_Undefined:
       case MIRType_Null:
-        JS_NOT_REACHED("typed load must have a payload");
+        MOZ_ASSUME_NOT_REACHED("typed load must have a payload");
         return false;
 
       default:
         return define(new LLoadSlotT(useRegister(ins->slots())), ins);
     }
 }
 
 bool
@@ -1902,17 +1902,17 @@ LIRGenerator::visitNot(MNot *ins)
 
         LNotV *lir = new LNotV(tempFloat(), temp0, temp1);
         if (!useBox(lir, LNotV::Input, op))
             return false;
         return define(lir, ins);
       }
 
       default:
-        JS_NOT_REACHED("Unexpected MIRType.");
+        MOZ_ASSUME_NOT_REACHED("Unexpected MIRType.");
         return false;
     }
 }
 
 bool
 LIRGenerator::visitBoundsCheck(MBoundsCheck *ins)
 {
     LInstruction *check;
@@ -1971,17 +1971,17 @@ LIRGenerator::visitLoadElement(MLoadElem
         LLoadElementV *lir = new LLoadElementV(useRegister(ins->elements()),
                                                useRegisterOrConstant(ins->index()));
         if (ins->fallible() && !assignSnapshot(lir))
             return false;
         return defineBox(lir, ins);
       }
       case MIRType_Undefined:
       case MIRType_Null:
-        JS_NOT_REACHED("typed load must have a payload");
+        MOZ_ASSUME_NOT_REACHED("typed load must have a payload");
         return false;
 
       default:
       {
         LLoadElementT *lir = new LLoadElementT(useRegister(ins->elements()),
                                                useRegisterOrConstant(ins->index()));
         if (ins->fallible() && !assignSnapshot(lir))
             return false;
@@ -2078,17 +2078,17 @@ LIRGenerator::visitArrayPopShift(MArrayP
     switch (ins->type()) {
       case MIRType_Value:
       {
         LArrayPopShiftV *lir = new LArrayPopShiftV(object, temp(), temp());
         return defineBox(lir, ins) && assignSafepoint(lir, ins);
       }
       case MIRType_Undefined:
       case MIRType_Null:
-        JS_NOT_REACHED("typed load must have a payload");
+        MOZ_ASSUME_NOT_REACHED("typed load must have a payload");
         return false;
 
       default:
       {
         LArrayPopShiftT *lir = new LArrayPopShiftT(object, temp(), temp());
         return define(lir, ins) && assignSafepoint(lir, ins);
       }
     }
@@ -2174,17 +2174,17 @@ LIRGenerator::visitClampToUint8(MClampTo
       {
         LClampVToUint8 *lir = new LClampVToUint8(tempFloat());
         if (!useBox(lir, LClampVToUint8::Input, in))
             return false;
         return assignSnapshot(lir) && define(lir, ins);
       }
 
       default:
-        JS_NOT_REACHED("unexpected type");
+        MOZ_ASSUME_NOT_REACHED("unexpected type");
         return false;
     }
 }
 
 bool
 LIRGenerator::visitLoadTypedArrayElementHole(MLoadTypedArrayElementHole *ins)
 {
     JS_ASSERT(ins->object()->type() == MIRType_Object);
@@ -2721,17 +2721,17 @@ LIRGenerator::visitAsmJSReturn(MAsmJSRet
 {
     MDefinition *rval = ins->getOperand(0);
     LAsmJSReturn *lir = new LAsmJSReturn;
     if (rval->type() == MIRType_Double)
         lir->setOperand(0, useFixed(rval, ReturnFloatReg));
     else if (rval->type() == MIRType_Int32)
         lir->setOperand(0, useFixed(rval, ReturnReg));
     else
-        JS_NOT_REACHED("Unexpected asm.js return type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected asm.js return type");
     return add(lir);
 }
 
 bool
 LIRGenerator::visitAsmJSVoidReturn(MAsmJSVoidReturn *ins)
 {
     return add(new LAsmJSVoidReturn);
 }
--- a/js/src/ion/MCallOptimize.cpp
+++ b/js/src/ion/MCallOptimize.cpp
@@ -1012,17 +1012,17 @@ IonBuilder::inlineUnsafeSetElement(CallI
 
         int arrayType;
         if (ElementAccessIsTypedArray(obj, id, &arrayType)) {
             if (!inlineUnsafeSetTypedArrayElement(callInfo, base, arrayType))
                 return InliningStatus_Error;
             continue;
         }
 
-        JS_NOT_REACHED("Element access not dense array nor typed array");
+        MOZ_ASSUME_NOT_REACHED("Element access not dense array nor typed array");
     }
 
     return InliningStatus_Inlined;
 }
 
 bool
 IonBuilder::inlineUnsafeSetDenseArrayElement(CallInfo &callInfo, uint32_t base)
 {
@@ -1083,17 +1083,17 @@ IonBuilder::inlineForceSequentialOrInPar
         // entire path as dead, which is important.
         callInfo.unwrapArgs();
         MConstant *ins = MConstant::New(BooleanValue(true));
         current->add(ins);
         current->push(ins);
         return InliningStatus_Inlined;
     }
 
-    JS_NOT_REACHED("Invalid execution mode");
+    MOZ_ASSUME_NOT_REACHED("Invalid execution mode");
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineNewParallelArray(CallInfo &callInfo)
 {
     // Rewrites a call like
     //
     //    NewParallelArray(ParallelArrayView, arg0, ..., argN)
@@ -1257,17 +1257,17 @@ IonBuilder::inlineNewDenseArray(CallInfo
     ExecutionMode executionMode = info().executionMode();
     switch (executionMode) {
       case SequentialExecution:
         return inlineNewDenseArrayForSequentialExecution(callInfo);
       case ParallelExecution:
         return inlineNewDenseArrayForParallelExecution(callInfo);
     }
 
-    JS_NOT_REACHED("unknown ExecutionMode");
+    MOZ_ASSUME_NOT_REACHED("unknown ExecutionMode");
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineNewDenseArrayForSequentialExecution(CallInfo &callInfo)
 {
     // not yet implemented; in seq. mode the C function is not so bad
     return InliningStatus_NotInlined;
 }
--- a/js/src/ion/MIR.cpp
+++ b/js/src/ion/MIR.cpp
@@ -111,17 +111,17 @@ EvaluateConstantOperands(MBinaryInstruct
         break;
       case MDefinition::Op_Div:
         ret.setNumber(NumberDiv(lhs.toNumber(), rhs.toNumber()));
         break;
       case MDefinition::Op_Mod:
         ret.setNumber(NumberMod(lhs.toNumber(), rhs.toNumber()));
         break;
       default:
-        JS_NOT_REACHED("NYI");
+        MOZ_ASSUME_NOT_REACHED("NYI");
         return NULL;
     }
 
     if (ins->type() != MIRTypeFromValue(ret)) {
         if (ptypeChange)
             *ptypeChange = true;
         return NULL;
     }
@@ -432,17 +432,17 @@ MConstant::printOpcode(FILE *fp)
         break;
       case MIRType_String:
         fprintf(fp, "string %p", (void *)value().toString());
         break;
       case MIRType_Magic:
         fprintf(fp, "magic");
         break;
       default:
-        JS_NOT_REACHED("unexpected type");
+        MOZ_ASSUME_NOT_REACHED("unexpected type");
         break;
     }
 }
 
 void
 MControlInstruction::printOpcode(FILE *fp)
 {
     MDefinition::printOpcode(fp);
@@ -1481,17 +1481,17 @@ MCompare::inputType()
       case Compare_StrictString:
         return MIRType_String;
       case Compare_Object:
         return MIRType_Object;
       case Compare_Unknown:
       case Compare_Value:
         return MIRType_Value;
       default:
-        JS_NOT_REACHED("No known conversion");
+        MOZ_ASSUME_NOT_REACHED("No known conversion");
         return MIRType_None;
     }
 }
 
 static inline bool
 MustBeUInt32(MDefinition *def, MDefinition **pwrapped)
 {
     if (def->isUrsh()) {
@@ -1932,17 +1932,17 @@ MCompare::tryFold(bool *result)
             /* FALL THROUGH */
           case MIRType_Int32:
           case MIRType_Double:
           case MIRType_String:
           case MIRType_Boolean:
             *result = (op == JSOP_NE || op == JSOP_STRICTNE);
             return true;
           default:
-            JS_NOT_REACHED("Unexpected type");
+            MOZ_ASSUME_NOT_REACHED("Unexpected type");
             return false;
         }
     }
 
     if (compareType_ == Compare_Boolean) {
         JS_ASSERT(op == JSOP_STRICTEQ || op == JSOP_STRICTNE);
         JS_ASSERT(rhs()->type() == MIRType_Boolean);
 
@@ -1954,20 +1954,20 @@ MCompare::tryFold(bool *result)
           case MIRType_String:
           case MIRType_Object:
           case MIRType_Null:
           case MIRType_Undefined:
             *result = (op == JSOP_STRICTNE);
             return true;
           case MIRType_Boolean:
             // Int32 specialization should handle this.
-            JS_NOT_REACHED("Wrong specialization");
+            MOZ_ASSUME_NOT_REACHED("Wrong specialization");
             return false;
           default:
-            JS_NOT_REACHED("Unexpected type");
+            MOZ_ASSUME_NOT_REACHED("Unexpected type");
             return false;
         }
     }
 
     if (compareType_ == Compare_StrictString) {
         JS_ASSERT(op == JSOP_STRICTEQ || op == JSOP_STRICTNE);
         JS_ASSERT(rhs()->type() == MIRType_String);
 
@@ -1979,20 +1979,20 @@ MCompare::tryFold(bool *result)
           case MIRType_Double:
           case MIRType_Object:
           case MIRType_Null:
           case MIRType_Undefined:
             *result = (op == JSOP_STRICTNE);
             return true;
           case MIRType_String:
             // Compare_String specialization should handle this.
-            JS_NOT_REACHED("Wrong specialization");
+            MOZ_ASSUME_NOT_REACHED("Wrong specialization");
             return false;
           default:
-            JS_NOT_REACHED("Unexpected type");
+            MOZ_ASSUME_NOT_REACHED("Unexpected type");
             return false;
         }
     }
 
     return false;
 }
 
 bool
@@ -2035,17 +2035,17 @@ MCompare::evaluateConstantOperands(bool 
           case JSOP_EQ:
             *result = (comp == 0);
             break;
           case JSOP_STRICTNE: // Fall through.
           case JSOP_NE:
             *result = (comp != 0);
             break;
           default:
-            JS_NOT_REACHED("Unexpected op.");
+            MOZ_ASSUME_NOT_REACHED("Unexpected op.");
             return false;
         }
 
         return true;
     }
 
     if (compareType_ == Compare_UInt32) {
         uint32_t lhsUint = uint32_t(lhs.toInt32());
@@ -2068,17 +2068,17 @@ MCompare::evaluateConstantOperands(bool 
           case JSOP_STRICTEQ:
             *result = (lhsUint == rhsUint);
             break;
           case JSOP_NE:
           case JSOP_STRICTNE:
             *result = (lhsUint != rhsUint);
             break;
           default:
-            JS_NOT_REACHED("Unexpected op.");
+            MOZ_ASSUME_NOT_REACHED("Unexpected op.");
             return false;
         }
 
         return true;
     }
 
     if (!lhs.isNumber() || !rhs.isNumber())
         return false;
--- a/js/src/ion/MIR.h
+++ b/js/src/ion/MIR.h
@@ -3454,17 +3454,17 @@ class MDiv : public MBinaryArithInstruct
         return div;
     }
 
     MDefinition *foldsTo(bool useValueNumbers);
     void analyzeEdgeCasesForward();
     void analyzeEdgeCasesBackward();
 
     double getIdentity() {
-        JS_NOT_REACHED("not used");
+        MOZ_ASSUME_NOT_REACHED("not used");
         return 1;
     }
 
     bool canBeNegativeZero() {
         return canBeNegativeZero_;
     }
     void setCanBeNegativeZero(bool negativeZero) {
         canBeNegativeZero_ = negativeZero;
@@ -3502,17 +3502,17 @@ class MMod : public MBinaryArithInstruct
         if (type == MIRType_Int32)
             mod->setTruncated(true);
         return mod;
     }
 
     MDefinition *foldsTo(bool useValueNumbers);
 
     double getIdentity() {
-        JS_NOT_REACHED("not used");
+        MOZ_ASSUME_NOT_REACHED("not used");
         return 1;
     }
 
     bool fallible();
 
     void computeRange();
     bool truncate();
 };
@@ -5919,17 +5919,17 @@ class MPolyInlineDispatch : public MCont
         return dispatchTable_[i].block;
     }
 
     MBasicBlock *getFunctionBlock(JSFunction *func) const {
         for (size_t i = 0; i < numCallees(); i++) {
             if (getFunction(i) == func)
                 return getFunctionBlock(i);
         }
-        JS_NOT_REACHED("Bad function lookup!");
+        MOZ_ASSUME_NOT_REACHED("Bad function lookup!");
     }
 
     InlinePropertyTable *propTable() const {
         return inlinePropertyTable_;
     }
 
     MBasicBlock *fallbackPrepBlock() const {
         JS_ASSERT(inlinePropertyTable_ != NULL);
--- a/js/src/ion/MIRGraph.cpp
+++ b/js/src/ion/MIRGraph.cpp
@@ -916,17 +916,17 @@ MBasicBlock::getSuccessor(size_t index) 
 size_t
 MBasicBlock::getSuccessorIndex(MBasicBlock *block) const
 {
     JS_ASSERT(lastIns());
     for (size_t i = 0; i < numSuccessors(); i++) {
         if (getSuccessor(i) == block)
             return i;
     }
-    JS_NOT_REACHED("Invalid successor");
+    MOZ_ASSUME_NOT_REACHED("Invalid successor");
 }
 
 void
 MBasicBlock::replaceSuccessor(size_t pos, MBasicBlock *split)
 {
     JS_ASSERT(lastIns());
 
     // Note, during split-critical-edges, successors-with-phis is not yet set.
@@ -948,17 +948,17 @@ MBasicBlock::replacePredecessor(MBasicBl
             for (size_t j = i; j < numPredecessors(); j++)
                 JS_ASSERT(predecessors_[j] != old);
 #endif
 
             return;
         }
     }
 
-    JS_NOT_REACHED("predecessor was not found");
+    MOZ_ASSUME_NOT_REACHED("predecessor was not found");
 }
 
 void
 MBasicBlock::clearDominatorInfo()
 {
     setImmediateDominator(NULL);
     immediatelyDominated_.clear();
     numDominated_ = 0;
@@ -985,17 +985,17 @@ MBasicBlock::removePredecessor(MBasicBlo
         }
 
         // Remove from pred list.
         MBasicBlock **ptr = predecessors_.begin() + i;
         predecessors_.erase(ptr);
         return;
     }
 
-    JS_NOT_REACHED("predecessor was not found");
+    MOZ_ASSUME_NOT_REACHED("predecessor was not found");
 }
 
 void
 MBasicBlock::inheritPhis(MBasicBlock *header)
 {
     for (MPhiIterator iter = header->phisBegin(); iter != header->phisEnd(); iter++) {
         MPhi *phi = *iter;
         JS_ASSERT(phi->numOperands() == 2);
--- a/js/src/ion/MOpcodes.h
+++ b/js/src/ion/MOpcodes.h
@@ -208,17 +208,17 @@ class MInstructionVisitor // interface i
 #define VISIT_INS(op) virtual bool visit##op(M##op *) = 0;
     MIR_OPCODE_LIST(VISIT_INS)
 #undef VISIT_INS
 };
 
 class MInstructionVisitorWithDefaults : public MInstructionVisitor
 {
   public:
-#define VISIT_INS(op) virtual bool visit##op(M##op *) { JS_NOT_REACHED("NYI: " #op); return false; }
+#define VISIT_INS(op) virtual bool visit##op(M##op *) { MOZ_ASSUME_NOT_REACHED("NYI: " #op); return false; }
     MIR_OPCODE_LIST(VISIT_INS)
 #undef VISIT_INS
 };
 
 } // namespace ion
 } // namespace js
 
 #endif /* ion_MOpcodes_h */
--- a/js/src/ion/Snapshots.cpp
+++ b/js/src/ion/Snapshots.cpp
@@ -263,17 +263,17 @@ SnapshotReader::readSlot()
             JS_ASSERT(code == ESC_REG_FIELD_INDEX);
             slot.unknown_type_.value = Location::From(reader_.readSigned());
         }
         return slot;
 #endif
       }
     }
 
-    JS_NOT_REACHED("huh?");
+    MOZ_ASSUME_NOT_REACHED("huh?");
     return Slot(JS_UNDEFINED);
 }
 
 SnapshotOffset
 SnapshotWriter::startSnapshot(uint32_t frameCount, BailoutKind kind, bool resumeAfter)
 {
     nframes_ = frameCount;
     framesWritten_ = 0;
@@ -373,17 +373,17 @@ ValTypeToString(JSValueType type)
         return "string";
       case JSVAL_TYPE_BOOLEAN:
         return "boolean";
       case JSVAL_TYPE_OBJECT:
         return "object";
       case JSVAL_TYPE_MAGIC:
         return "magic";
       default:
-        JS_NOT_REACHED("no payload");
+        MOZ_ASSUME_NOT_REACHED("no payload");
         return "";
     }
 }
 
 void
 SnapshotWriter::addSlot(JSValueType type, const Register &reg)
 {
     IonSpew(IonSpew_Snapshots, "    slot %u: %s (%s)",
--- a/js/src/ion/StupidAllocator.cpp
+++ b/js/src/ion/StupidAllocator.cpp
@@ -31,17 +31,17 @@ StupidAllocator::stackLocation(uint32_t 
 
 StupidAllocator::RegisterIndex
 StupidAllocator::registerIndex(AnyRegister reg)
 {
     for (size_t i = 0; i < registerCount; i++) {
         if (reg == registers[i].reg)
             return i;
     }
-    JS_NOT_REACHED("Bad register");
+    MOZ_ASSUME_NOT_REACHED("Bad register");
     return UINT32_MAX;
 }
 
 bool
 StupidAllocator::init()
 {
     if (!RegisterAllocator::init())
         return false;
--- a/js/src/ion/TypePolicy.cpp
+++ b/js/src/ion/TypePolicy.cpp
@@ -204,17 +204,17 @@ ComparePolicy::adjustInputs(MInstruction
             break;
           case MIRType_Object:
             replace = MUnbox::New(in, MIRType_Object, MUnbox::Infallible);
             break;
           case MIRType_String:
             replace = MUnbox::New(in, MIRType_String, MUnbox::Infallible);
             break;
           default:
-            JS_NOT_REACHED("Unknown compare specialization");
+            MOZ_ASSUME_NOT_REACHED("Unknown compare specialization");
             return false;
         }
 
         def->block()->insertBefore(def, replace);
         def->replaceOperand(i, replace);
     }
 
     return true;
@@ -486,17 +486,17 @@ StoreTypedArrayPolicy::adjustValueInput(
         value->setFoldedUnchecked();
         value = MConstant::New(DoubleValue(js_NaN));
         ins->block()->insertBefore(ins, value->toInstruction());
         break;
       case MIRType_String:
         value = boxAt(ins, value);
         break;
       default:
-        JS_NOT_REACHED("Unexpected type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected type");
         break;
     }
 
     if (value != curValue) {
         ins->replaceOperand(valueOperand, value);
         curValue = value;
     }
 
@@ -524,17 +524,17 @@ StoreTypedArrayPolicy::adjustValueInput(
       case TypedArray::TYPE_FLOAT32:
       case TypedArray::TYPE_FLOAT64:
         if (value->type() != MIRType_Double) {
             value = MToDouble::New(value);
             ins->block()->insertBefore(ins, value->toInstruction());
         }
         break;
       default:
-        JS_NOT_REACHED("Invalid array type");
+        MOZ_ASSUME_NOT_REACHED("Invalid array type");
         break;
     }
 
     if (value != curValue) {
         ins->replaceOperand(valueOperand, value);
         curValue = value;
     }
     return true;
--- a/js/src/ion/VMFunctions.cpp
+++ b/js/src/ion/VMFunctions.cpp
@@ -628,17 +628,17 @@ DebugPrologue(JSContext *cx, BaselineFra
         *mustReturn = true;
         return ion::DebugEpilogue(cx, frame, true);
 
       case JSTRAP_THROW:
       case JSTRAP_ERROR:
         return false;
 
       default:
-        JS_NOT_REACHED("Invalid trap status");
+        MOZ_ASSUME_NOT_REACHED("Invalid trap status");
     }
 }
 
 bool
 DebugEpilogue(JSContext *cx, BaselineFrame *frame, JSBool ok)
 {
     // Unwind scope chain to stack depth 0.
     UnwindScope(cx, frame, 0);
@@ -762,17 +762,17 @@ HandleDebugTrap(JSContext *cx, BaselineF
         frame->setReturnValue(rval);
         return ion::DebugEpilogue(cx, frame, true);
 
       case JSTRAP_THROW:
         cx->setPendingException(rval);
         return false;
 
       default:
-        JS_NOT_REACHED("Invalid trap status");
+        MOZ_ASSUME_NOT_REACHED("Invalid trap status");
     }
 
     return true;
 }
 
 bool
 OnDebuggerStatement(JSContext *cx, BaselineFrame *frame, jsbytecode *pc, JSBool *mustReturn)
 {
@@ -800,17 +800,17 @@ OnDebuggerStatement(JSContext *cx, Basel
         *mustReturn = true;
         return ion::DebugEpilogue(cx, frame, true);
 
       case JSTRAP_THROW:
         cx->setPendingException(rval);
         return false;
 
       default:
-        JS_NOT_REACHED("Invalid trap status");
+        MOZ_ASSUME_NOT_REACHED("Invalid trap status");
     }
 }
 
 bool
 EnterBlock(JSContext *cx, BaselineFrame *frame, Handle<StaticBlockObject *> block)
 {
     return frame->pushBlock(cx, block);
 }
--- a/js/src/ion/arm/Assembler-arm.cpp
+++ b/js/src/ion/arm/Assembler-arm.cpp
@@ -50,17 +50,17 @@ ABIArgGenerator::next(MIRType type)
             current_ = ABIArg(stackOffset_);
             stackOffset_ += sizeof(uint64_t);
             break;
         }
         current_ = ABIArg(FloatRegister::FromCode(floatRegIndex_));
         floatRegIndex_++;
         break;
       default:
-        JS_NOT_REACHED("Unexpected argument type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected argument type");
     }
     return current_;
 #else
     switch (type) {
       case MIRType_Int32:
       case MIRType_Pointer:
         if (argRegIndex_ == NumIntArgRegs) {
             current_ = ABIArg(stackOffset_);
@@ -82,17 +82,17 @@ ABIArgGenerator::next(MIRType type)
         }
         argRegIndex_ = alignedArgRegIndex_;
         current_ = ABIArg(FloatRegister::FromCode(argRegIndex_ >> 1));
 
         argRegIndex_+=2;
       }
         break;
       default:
-        JS_NOT_REACHED("Unexpected argument type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected argument type");
     }
     return current_;
 #endif
 }
 const Register ABIArgGenerator::NonArgReturnVolatileReg0 = r4;
 const Register ABIArgGenerator::NonArgReturnVolatileReg1 = r5;
 
 // Encode a standard register when it is being used as src1, the dest, and
@@ -725,17 +725,17 @@ Assembler::getCF32Target(Iter *iter)
         if (iu != IsUp) {
             offset = - offset;
         }
         uint32_t **ptr = (uint32_t **)&dataInst[offset + 8];
         return *ptr;
 
     }
 
-    JS_NOT_REACHED("unsupported branch relocation");
+    MOZ_ASSUME_NOT_REACHED("unsupported branch relocation");
     return NULL;
 }
 
 uintptr_t
 Assembler::getPointer(uint8_t *instPtr)
 {
     InstructionIterator iter((Instruction*)instPtr);
     uintptr_t ret = (uintptr_t)getPtr32Target(&iter, NULL, NULL);
@@ -789,17 +789,17 @@ Assembler::getPtr32Target(Iter *start, R
             offset = - offset;
         if (dest)
             *dest = toRD(*load);
         if (style)
             *style = L_LDR;
         uint32_t **ptr = (uint32_t **)&dataInst[offset + 8];
         return *ptr;
     }
-    JS_NOT_REACHED("unsupported relocation");
+    MOZ_ASSUME_NOT_REACHED("unsupported relocation");
     return NULL;
 }
 
 static IonCode *
 CodeFromJump(InstructionIterator *jump)
 {
     uint8_t *target = (uint8_t *)Assembler::getCF32Target(jump);
     return IonCode::FromExecutable(target);
@@ -1676,17 +1676,17 @@ Assembler::as_extdtr(LoadStore ls, int s
             extra_bits2 |= 0x2;
         }
         break;
       case 64:
         extra_bits2 = (ls == IsStore) ? 0x3 : 0x2;
         extra_bits1 = 0;
         break;
       default:
-        JS_NOT_REACHED("SAY WHAT?");
+        MOZ_ASSUME_NOT_REACHED("SAY WHAT?");
     }
     return writeInst(extra_bits2 << 5 | extra_bits1 << 20 | 0x90 |
                      addr.encode() | RT(rt) | mode | c, dest);
 }
 
 BufferOffset
 Assembler::as_dtm(LoadStore ls, Register rn, uint32_t mask,
                 DTMMode mode, DTMWriteBack wb, Condition c)
@@ -1760,17 +1760,17 @@ Assembler::insertTokenIntoTag(uint32_t i
 bool
 Assembler::patchConstantPoolLoad(void* loadAddr, void* constPoolAddr)
 {
     PoolHintData data = *(PoolHintData*)loadAddr;
     uint32_t *instAddr = (uint32_t*) loadAddr;
     int offset = (char *)constPoolAddr - (char *)loadAddr;
     switch(data.getLoadType()) {
       case PoolHintData::poolBOGUS:
-        JS_NOT_REACHED("bogus load type!");
+        MOZ_ASSUME_NOT_REACHED("bogus load type!");
       case PoolHintData::poolDTR:
         dummy->as_dtr(IsLoad, 32, Offset, data.getReg(),
                       DTRAddr(pc, DtrOffImm(offset+4*data.getIndex() - 8)), data.getCond(), instAddr);
         break;
       case PoolHintData::poolBranch:
         // Either this used to be a poolBranch, and the label was already bound, so it was
         // replaced with a real branch, or this may happen in the future.
         // If this is going to happen in the future, then the actual bits that are written here
@@ -1798,23 +1798,22 @@ Assembler::patchConstantPoolLoad(void* l
 }
 
 uint32_t
 Assembler::placeConstantPoolBarrier(int offset)
 {
     // BUG: 700526
     // this is still an active path, however, we do not hit it in the test
     // suite at all.
-    JS_NOT_REACHED("ARMAssembler holdover");
+    MOZ_NOT_REACHED("ARMAssembler holdover");
 #if 0
     offset = (offset - sizeof(ARMWord)) >> 2;
     ASSERT((offset <= BOFFSET_MAX && offset >= BOFFSET_MIN));
     return AL | B | (offset & BRANCH_MASK);
 #endif
-    return -1;
 }
 
 // Control flow stuff:
 
 // bx can *only* branch to a register
 // never to an immediate.
 BufferOffset
 Assembler::as_bx(Register r, Condition c, bool isPatchable)
@@ -1999,32 +1998,32 @@ Assembler::as_vmul(VFPRegister vd, VFPRe
     return as_vfp_float(vd, vn, vm, opv_mul, c);
 }
 
 BufferOffset
 Assembler::as_vnmul(VFPRegister vd, VFPRegister vn, VFPRegister vm,
                   Condition c)
 {
     return as_vfp_float(vd, vn, vm, opv_mul, c);
-    JS_NOT_REACHED("Feature NYI");
+    MOZ_ASSUME_NOT_REACHED("Feature NYI");
 }
 
 BufferOffset
 Assembler::as_vnmla(VFPRegister vd, VFPRegister vn, VFPRegister vm,
                   Condition c)
 {
-    JS_NOT_REACHED("Feature NYI");
+    MOZ_ASSUME_NOT_REACHED("Feature NYI");
     return BufferOffset();
 }
 
 BufferOffset
 Assembler::as_vnmls(VFPRegister vd, VFPRegister vn, VFPRegister vm,
                   Condition c)
 {
-    JS_NOT_REACHED("Feature NYI");
+    MOZ_ASSUME_NOT_REACHED("Feature NYI");
     return BufferOffset();
 }
 
 BufferOffset
 Assembler::as_vneg(VFPRegister vd, VFPRegister vm, Condition c)
 {
     return as_vfp_float(vd, NoVFPRegister, vm, opv_neg, c);
 }
@@ -2202,17 +2201,17 @@ Assembler::as_vdtm(LoadStore st, Registe
 
 BufferOffset
 Assembler::as_vimm(VFPRegister vd, VFPImm imm, Condition c)
 {
     vfp_size sz = vd.isDouble() ? isDouble : isSingle;
 
     // Don't know how to handle this right now.
     if (!vd.isDouble())
-        JS_NOT_REACHED("non-double immediate");
+        MOZ_ASSUME_NOT_REACHED("non-double immediate");
 
     return writeVFPInst(sz,  c | imm.encode() | VD(vd) | 0x02B00000);
 
 }
 BufferOffset
 Assembler::as_vmrs(Register r, Condition c)
 {
     return writeInst(c | 0x0ef10a10 | RT(r));
@@ -2257,17 +2256,17 @@ Assembler::bind(Label *label, BufferOffs
             Instruction branch = *editSrc(b);
             Condition c;
             branch.extractCond(&c);
             if (branch.is<InstBImm>())
                 as_b(dest.diffB<BOffImm>(b), c, b);
             else if (branch.is<InstBLImm>())
                 as_bl(dest.diffB<BOffImm>(b), c, b);
             else
-                JS_NOT_REACHED("crazy fixup!");
+                MOZ_ASSUME_NOT_REACHED("crazy fixup!");
             b = next;
         } while (more);
     }
     label->bind(nextOffset().getOffset());
 }
 
 void
 Assembler::bind(RepatchLabel *label)
@@ -2315,17 +2314,17 @@ Assembler::retarget(Label *label, Label 
             Condition c;
             branch.extractCond(&c);
             int32_t prev = target->use(label->offset());
             if (branch.is<InstBImm>())
                 as_b(BOffImm(prev), c, labelBranchOffset);
             else if (branch.is<InstBLImm>())
                 as_bl(BOffImm(prev), c, labelBranchOffset);
             else
-                JS_NOT_REACHED("crazy fixup!");
+                MOZ_ASSUME_NOT_REACHED("crazy fixup!");
         } else {
             // The target is unbound and unused.  We can just take the head of
             // the list hanging off of label, and dump that into target.
             DebugOnly<uint32_t> prev = target->use(label->offset());
             JS_ASSERT((int32_t)prev == Label::INVALID_OFFSET);
         }
     }
     label->reset();
--- a/js/src/ion/arm/BaselineIC-arm.cpp
+++ b/js/src/ion/arm/BaselineIC-arm.cpp
@@ -191,17 +191,17 @@ ICBinaryArith_Int32::Compiler::generateS
             masm.boxDouble(ScratchFloatReg, R0);
         } else {
             masm.j(Assembler::LessThan, &failure);
             // Move result for return.
             masm.mov(scratchReg, R0.payloadReg());
         }
         break;
       default:
-        JS_NOT_REACHED("Unhandled op for BinaryArith_Int32.");
+        MOZ_ASSUME_NOT_REACHED("Unhandled op for BinaryArith_Int32.");
         return false;
     }
 
     EmitReturnFromIC(masm);
 
     switch (op_) {
       case JSOP_MUL:
         masm.bind(&maybeNegZero);
@@ -243,17 +243,17 @@ ICUnaryArith_Int32::Compiler::generateSt
       case JSOP_NEG:
         // Guard against 0 and MIN_INT, both result in a double.
         masm.branchTest32(Assembler::Zero, R0.payloadReg(), Imm32(0x7fffffff), &failure);
 
         // Compile -x as 0 - x.
         masm.ma_rsb(R0.payloadReg(), Imm32(0), R0.payloadReg());
         break;
       default:
-        JS_NOT_REACHED("Unexpected op");
+        MOZ_ASSUME_NOT_REACHED("Unexpected op");
         return false;
     }
 
     EmitReturnFromIC(masm);
 
     masm.bind(&failure);
     EmitStubGuardFailure(masm);
     return true;
--- a/js/src/ion/arm/CodeGenerator-arm.cpp
+++ b/js/src/ion/arm/CodeGenerator-arm.cpp
@@ -210,17 +210,17 @@ CodeGeneratorARM::bailoutFrom(Label *lab
                                                        snapshot->mir()->block(),
                                                        snapshot->mir()->pc());
         masm.retarget(label, ool->entry());
         return true;
       }
       case SequentialExecution:
         break;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
 
     if (!encode(snapshot))
         return false;
 
     // Though the assembler doesn't track all frame pushes, at least make sure
     // the known value makes sense. We can't use bailout tables if the stack
     // isn't properly aligned to the static frame size.
@@ -798,17 +798,17 @@ CodeGeneratorARM::visitBitOpI(LBitOpI *i
         break;
       case JSOP_BITAND:
         if (rhs->isConstant())
             masm.ma_and(Imm32(ToInt32(rhs)), ToRegister(lhs), ToRegister(dest));
         else
             masm.ma_and(ToRegister(rhs), ToRegister(lhs), ToRegister(dest));
         break;
       default:
-        JS_NOT_REACHED("unexpected binary opcode");
+        MOZ_ASSUME_NOT_REACHED("unexpected binary opcode");
     }
 
     return true;
 }
 
 bool
 CodeGeneratorARM::visitShiftI(LShiftI *ins)
 {
@@ -840,17 +840,17 @@ CodeGeneratorARM::visitShiftI(LShiftI *i
                 if (ins->mir()->toUrsh()->canOverflow()) {
                     masm.ma_cmp(dest, Imm32(0));
                     if (!bailoutIf(Assembler::LessThan, ins->snapshot()))
                         return false;
                 }
             }
             break;
           default:
-            JS_NOT_REACHED("Unexpected shift op");
+            MOZ_ASSUME_NOT_REACHED("Unexpected shift op");
         }
     } else {
         // The shift amounts should be AND'ed into the 0-31 range since arm
         // shifts by the lower byte of the register (it will attempt to shift
         // by 250 if you ask it to).
         masm.ma_and(Imm32(0x1F), ToRegister(rhs), dest);
 
         switch (ins->bitop()) {
@@ -865,17 +865,17 @@ CodeGeneratorARM::visitShiftI(LShiftI *i
             if (ins->mir()->toUrsh()->canOverflow()) {
                 // x >>> 0 can overflow.
                 masm.ma_cmp(dest, Imm32(0));
                 if (!bailoutIf(Assembler::LessThan, ins->snapshot()))
                     return false;
             }
             break;
           default:
-            JS_NOT_REACHED("Unexpected shift op");
+            MOZ_ASSUME_NOT_REACHED("Unexpected shift op");
         }
     }
 
     return true;
 }
 
 bool
 CodeGeneratorARM::visitUrshD(LUrshD *ins)
@@ -1064,17 +1064,17 @@ CodeGeneratorARM::visitMathD(LMathD *mat
         break;
       case JSOP_MUL:
         masm.ma_vmul(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
         break;
       case JSOP_DIV:
         masm.ma_vdiv(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
         break;
       default:
-        JS_NOT_REACHED("unexpected opcode");
+        MOZ_ASSUME_NOT_REACHED("unexpected opcode");
         return false;
     }
     return true;
 }
 
 bool
 CodeGeneratorARM::visitFloor(LFloor *lir)
 {
@@ -1698,24 +1698,24 @@ getBase(U *mir)
       case U::Global: return GlobalReg;
     }
     return InvalidReg;
 }
 
 bool
 CodeGeneratorARM::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins)
 {
-    JS_NOT_REACHED("NYI");
+    MOZ_ASSUME_NOT_REACHED("NYI");
     return true;
 }
 
 bool
 CodeGeneratorARM::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins)
 {
-    JS_NOT_REACHED("NYI");
+    MOZ_ASSUME_NOT_REACHED("NYI");
     return true;
 }
 
 bool
 CodeGeneratorARM::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
 {
     const MAsmJSLoadHeap *mir = ins->mir();
     bool isSigned;
@@ -1728,17 +1728,17 @@ CodeGeneratorARM::visitAsmJSLoadHeap(LAs
       case ArrayBufferView::TYPE_UINT16:  isSigned = false; size = 16; break;
       case ArrayBufferView::TYPE_INT32:
       case ArrayBufferView::TYPE_UINT32:  isSigned = true;  size = 32; break;
       case ArrayBufferView::TYPE_FLOAT64: isFloat = true;   size = 64; break;
       case ArrayBufferView::TYPE_FLOAT32:
         isFloat = true;
         size = 32;
         break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
     Register index = ToRegister(ins->ptr());
     BufferOffset bo = masm.ma_BoundsCheck(index);
     if (isFloat) {
         VFPRegister vd(ToFloatRegister(ins->output()));
         if (size == 32) {
             masm.ma_vldr(vd.singleOverlay(), HeapReg, index, 0, Assembler::Zero);
             masm.as_vcvt(vd, vd.singleOverlay(), false, Assembler::Zero);
@@ -1768,17 +1768,17 @@ CodeGeneratorARM::visitAsmJSStoreHeap(LA
       case ArrayBufferView::TYPE_UINT16:  isSigned = false; size = 16; break;
       case ArrayBufferView::TYPE_INT32:
       case ArrayBufferView::TYPE_UINT32:  isSigned = true;  size = 32; break;
       case ArrayBufferView::TYPE_FLOAT64: isFloat = true;   size = 64; break;
       case ArrayBufferView::TYPE_FLOAT32:
         isFloat = true;
         size = 32;
         break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
     Register index = ToRegister(ins->ptr());
 
     BufferOffset bo = masm.ma_BoundsCheck(index);
     if (isFloat) {
         VFPRegister vd(ToFloatRegister(ins->value()));
         if (size == 32) {
             masm.storeFloat(vd, HeapReg, index, Assembler::Zero);
--- a/js/src/ion/arm/Lowering-arm.cpp
+++ b/js/src/ion/arm/Lowering-arm.cpp
@@ -459,17 +459,17 @@ LIRGeneratorARM::visitAsmJSStoreHeap(MAs
         lir = new LAsmJSStoreHeap(useRegisterAtStart(ins->ptr()),
                                   useRegisterAtStart(ins->value()));
         break;
       case ArrayBufferView::TYPE_FLOAT32:
       case ArrayBufferView::TYPE_FLOAT64:
         lir = new LAsmJSStoreHeap(useRegisterAtStart(ins->ptr()),
                                   useRegisterAtStart(ins->value()));
         break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
 
     return add(lir, ins);
 }
 
 bool
 LIRGeneratorARM::visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr *ins)
 {
@@ -483,13 +483,13 @@ LIRGeneratorARM::lowerTruncateDToInt32(M
     JS_ASSERT(opd->type() == MIRType_Double);
 
     return define(new LTruncateDToInt32(useRegister(opd), LDefinition::BogusTemp()), ins);
 }
 
 bool
 LIRGeneratorARM::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins)
 {
-    JS_NOT_REACHED("NYI");
+    MOZ_ASSUME_NOT_REACHED("NYI");
     return true;
 }
 
 //__aeabi_uidiv
--- a/js/src/ion/arm/MacroAssembler-arm.cpp
+++ b/js/src/ion/arm/MacroAssembler-arm.cpp
@@ -690,17 +690,17 @@ MacroAssemblerARM::ma_cmn(Register src1,
 void
 MacroAssemblerARM::ma_cmn(Register src1, Register src2, Condition c)
 {
     as_alu(InvalidReg, src2, O2Reg(src1), op_cmn, SetCond, c);
 }
 void
 MacroAssemblerARM::ma_cmn(Register src1, Operand op, Condition c)
 {
-    JS_NOT_REACHED("Feature NYI");
+    MOZ_ASSUME_NOT_REACHED("Feature NYI");
 }
 
 // Compare (src - src2).
 void
 MacroAssemblerARM::ma_cmp(Register src1, Imm32 imm, Condition c)
 {
     ma_alu(src1, imm, InvalidReg, op_cmp, SetCond, c);
 }
@@ -724,17 +724,17 @@ MacroAssemblerARM::ma_cmp(Register src1,
       case Operand::OP2:
         as_cmp(src1, op.toOp2(), c);
         break;
       case Operand::MEM:
         ma_ldr(op, ScratchRegister);
         as_cmp(src1, O2Reg(ScratchRegister), c);
         break;
       default:
-        JS_NOT_REACHED("trying to compare FP and integer registers");
+        MOZ_ASSUME_NOT_REACHED("trying to compare FP and integer registers");
         break;
     }
 }
 void
 MacroAssemblerARM::ma_cmp(Register src1, Register src2, Condition c)
 {
     as_cmp(src1, O2Reg(src2), c);
 }
@@ -798,17 +798,17 @@ MacroAssemblerARM::ma_check_mul(Register
     }
     
     if (cond == Overflow) {
         as_smull(ScratchRegister, dest, src1, src2);
         as_cmp(ScratchRegister, asr(dest, 31));
         return NotEqual;
     }
 
-    JS_NOT_REACHED("Condition NYI");
+    MOZ_ASSUME_NOT_REACHED("Condition NYI");
     return Always;
 
 }
 
 Assembler::Condition
 MacroAssemblerARM::ma_check_mul(Register src1, Imm32 imm, Register dest, Condition cond)
 {
     ma_mov(imm, ScratchRegister);
@@ -818,17 +818,17 @@ MacroAssemblerARM::ma_check_mul(Register
     }
     
     if (cond == Overflow) {
         as_smull(ScratchRegister, dest, ScratchRegister, src1);
         as_cmp(ScratchRegister, asr(dest, 31));
         return NotEqual;
     }
 
-    JS_NOT_REACHED("Condition NYI");
+    MOZ_ASSUME_NOT_REACHED("Condition NYI");
     return Always;
 }
 
 void
 MacroAssemblerARM::ma_mod_mask(Register src, Register dest, Register hold, int32_t shift)
 {
     // MATH:
     // We wish to compute x % (1<<y) - 1 for a known constant, y.
@@ -901,17 +901,17 @@ MacroAssemblerARM::ma_dtr(LoadStore ls, 
 {
     ma_dataTransferN(ls, 32, true, rn, offset, rt, mode, cc);
 }
 
 void
 MacroAssemblerARM::ma_dtr(LoadStore ls, Register rn, Register rm, Register rt,
                           Index mode, Assembler::Condition cc)
 {
-    JS_NOT_REACHED("Feature NYI");
+    MOZ_ASSUME_NOT_REACHED("Feature NYI");
 }
 
 void
 MacroAssemblerARM::ma_str(Register rt, DTRAddr addr, Index mode, Condition cc)
 {
     as_dtr(IsStore, 32, mode, rt, addr, cc);
 }
 
@@ -1215,17 +1215,17 @@ MacroAssemblerARM::ma_b(void *target, Re
         as_bx(ScratchRegister, c);
         break;
       case Assembler::B_LDR:
         as_Imm32Pool(pc, trg, NULL, c);
         if (c == Always)
             m_buffer.markGuard();
         break;
       default:
-        JS_NOT_REACHED("Other methods of generating tracable jumps NYI");
+        MOZ_ASSUME_NOT_REACHED("Other methods of generating tracable jumps NYI");
     }
 }
 
 // This is almost NEVER necessary: we'll basically never be calling a label,
 // except possibly in the crazy bailout-table case.
 void
 MacroAssemblerARM::ma_bl(Label *dest, Assembler::Condition c)
 {
@@ -2765,17 +2765,17 @@ MacroAssemblerARMCompat::loadValue(Addre
                 break;
               case 0:
                 mode = IA;
                 break;
               case 4:
                 mode = IB;
                 break;
               default:
-                JS_NOT_REACHED("Bogus Offset for LoadValue as DTM");
+                MOZ_ASSUME_NOT_REACHED("Bogus Offset for LoadValue as DTM");
             }
             startDataTransferM(IsLoad, Register::FromCode(srcOp.base()), mode);
             transferReg(val.payloadReg());
             transferReg(val.typeReg());
             finishDataTransfer();
             return;
         }
     }
@@ -2835,17 +2835,17 @@ MacroAssemblerARMCompat::storePayload(co
 }
 void
 MacroAssemblerARMCompat::storePayload(Register src, Operand dest)
 {
     if (dest.getTag() == Operand::MEM) {
         ma_str(src, ToPayload(dest));
         return;
     }
-    JS_NOT_REACHED("why do we do all of these things?");
+    MOZ_ASSUME_NOT_REACHED("why do we do all of these things?");
 
 }
 
 void
 MacroAssemblerARMCompat::storePayload(const Value &val, Register base, Register index, int32_t shift)
 {
     jsval_layout jv = JSVAL_TO_IMPL(val);
     if (val.isMarkable())
@@ -2872,17 +2872,17 @@ MacroAssemblerARMCompat::storePayload(Re
 void
 MacroAssemblerARMCompat::storeTypeTag(ImmTag tag, Operand dest) {
     if (dest.getTag() == Operand::MEM) {
         ma_mov(tag, secondScratchReg_);
         ma_str(secondScratchReg_, ToType(dest));
         return;
     }
 
-    JS_NOT_REACHED("why do we do all of these things?");
+    MOZ_ASSUME_NOT_REACHED("why do we do all of these things?");
 
 }
 
 void
 MacroAssemblerARMCompat::storeTypeTag(ImmTag tag, Register base, Register index, int32_t shift) {
     JS_ASSERT(base != ScratchRegister);
     JS_ASSERT(index != ScratchRegister);
     // A value needs to be store a value int base + index << shift + 4.
--- a/js/src/ion/arm/MacroAssembler-arm.h
+++ b/js/src/ion/arm/MacroAssembler-arm.h
@@ -357,17 +357,17 @@ class MacroAssemblerARM : public Assembl
         if (mode == IA) {
             return transferMultipleByRunsImpl
                 <FloatRegisterForwardIterator>(set, ls, rm, mode, 1);
         }
         if (mode == DB) {
             return transferMultipleByRunsImpl
                 <FloatRegisterBackwardIterator>(set, ls, rm, mode, -1);
         }
-        JS_NOT_REACHED("Invalid data transfer addressing mode");
+        MOZ_ASSUME_NOT_REACHED("Invalid data transfer addressing mode");
     }
 
 private:
     // Implementation for transferMultipleByRuns so we can use different
     // iterators for forward/backward traversals.
     // The sign argument should be 1 if we traverse forwards, -1 if we
     // traverse backwards.
     template<typename RegisterIterator> int32_t
@@ -478,20 +478,20 @@ class MacroAssemblerARMCompat : public M
     }
     void mov(Imm32 imm, Register dest) {
         ma_mov(imm, dest);
     }
     void mov(ImmWord imm, Register dest) {
         ma_mov(Imm32(imm.value), dest);
     }
     void mov(Register src, Address dest) {
-        JS_NOT_REACHED("NYI-IC");
+        MOZ_ASSUME_NOT_REACHED("NYI-IC");
     }
     void mov(Address src, Register dest) {
-        JS_NOT_REACHED("NYI-IC");
+        MOZ_ASSUME_NOT_REACHED("NYI-IC");
     }
 
     void call(const Register reg) {
         as_blx(reg);
     }
 
     void call(Label *label) {
         // for now, assume that it'll be nearby?
--- a/js/src/ion/arm/MoveEmitter-arm.cpp
+++ b/js/src/ion/arm/MoveEmitter-arm.cpp
@@ -185,17 +185,17 @@ MoveEmitterARM::emitMove(const MoveOpera
           case Operand::OP2:
             // secretly must be a register
             masm.ma_mov(from.reg(), to.reg());
             break;
           case Operand::MEM:
             masm.ma_str(from.reg(), toOperand(to, false));
             break;
           default:
-            JS_NOT_REACHED("strange move!");
+            MOZ_ASSUME_NOT_REACHED("strange move!");
         }
     } else if (to.isGeneralReg()) {
         JS_ASSERT(from.isMemory() || from.isEffectiveAddress());
         if (from.isMemory())
             masm.ma_ldr(toOperand(from, false), to.reg());
         else
             masm.ma_add(from.base(), Imm32(from.disp()), to.reg());
     } else {
--- a/js/src/ion/arm/Trampoline-arm.cpp
+++ b/js/src/ion/arm/Trampoline-arm.cpp
@@ -690,17 +690,17 @@ IonRuntime::generateVMWrapper(JSContext 
       case Type_Bool:
         // Called functions return bools, which are 0/false and non-zero/true
         masm.branch32(Assembler::Equal, r0, Imm32(0), &failure);
         break;
       case Type_ParallelResult:
         masm.branch32(Assembler::NotEqual, r0, Imm32(TP_SUCCESS), &failure);
         break;
       default:
-        JS_NOT_REACHED("unknown failure kind");
+        MOZ_ASSUME_NOT_REACHED("unknown failure kind");
         break;
     }
 
     // Load the outparam and free any allocated stack.
     switch (f.outParam) {
       case Type_Handle:
         masm.popRooted(f.outParamRootType, ReturnReg, JSReturnOperand);
         break;
--- a/js/src/ion/shared/Assembler-shared.h
+++ b/js/src/ion/shared/Assembler-shared.h
@@ -58,17 +58,17 @@ ScaleFromElemWidth(int shift)
       case 2:
         return TimesTwo;
       case 4:
         return TimesFour;
       case 8:
         return TimesEight;
     }
 
-    JS_NOT_REACHED("Invalid scale");
+    MOZ_ASSUME_NOT_REACHED("Invalid scale");
     return TimesOne;
 }
 
 // Used for 32-bit immediates which do not require relocation.
 struct Imm32
 {
     int32_t value;
 
@@ -81,17 +81,17 @@ struct Imm32
             return Imm32(0);
           case TimesTwo:
             return Imm32(1);
           case TimesFour:
             return Imm32(2);
           case TimesEight:
             return Imm32(3);
         };
-        JS_NOT_REACHED("Invalid scale");
+        MOZ_ASSUME_NOT_REACHED("Invalid scale");
         return Imm32(-1);
     }
 
     static inline Imm32 FactorOf(enum Scale s) {
         return Imm32(1 << ShiftOf(s).value);
     }
 };
 
--- a/js/src/ion/shared/Assembler-x86-shared.cpp
+++ b/js/src/ion/shared/Assembler-x86-shared.cpp
@@ -118,17 +118,17 @@ AssemblerX86Shared::InvertCondition(Cond
         return BelowOrEqual;
       case AboveOrEqual:
         return Below;
       case Below:
         return AboveOrEqual;
       case BelowOrEqual:
         return Above;
       default:
-        JS_NOT_REACHED("unexpected condition");
+        MOZ_ASSUME_NOT_REACHED("unexpected condition");
         return Equal;
     }
 }
 
 void
 AutoFlushCache::update(uintptr_t newStart, size_t len)
 {
 }
--- a/js/src/ion/shared/Assembler-x86-shared.h
+++ b/js/src/ion/shared/Assembler-x86-shared.h
@@ -129,17 +129,17 @@ class AssemblerX86Shared
           case DoubleLessThanOrEqualOrUnordered:
             return NaN_HandledByCond;
           case DoubleEqual:
             return NaN_IsFalse;
           case DoubleNotEqualOrUnordered:
             return NaN_IsTrue;
         }
 
-        JS_NOT_REACHED("Unknown double condition");
+        MOZ_ASSUME_NOT_REACHED("Unknown double condition");
         return NaN_HandledByCond;
     }
 
     static void staticAsserts() {
         // DoubleConditionBits should not interfere with x86 condition codes.
         JS_STATIC_ASSERT(!((Equal | NotEqual | Above | AboveOrEqual | Below |
                             BelowOrEqual | Parity | NoParity) & DoubleConditionBits));
     }
@@ -243,17 +243,17 @@ class AssemblerX86Shared
             masm.movl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
 #ifdef JS_CPU_X86
           case Operand::ADDRESS:
             masm.movl_mr(src.address(), dest.code());
             break;
 #endif
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movl(const Register &src, const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG:
             masm.movl_rr(src.code(), dest.reg());
             break;
           case Operand::REG_DISP:
@@ -263,32 +263,32 @@ class AssemblerX86Shared
             masm.movl_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
 #ifdef JS_CPU_X86
           case Operand::ADDRESS:
             masm.movl_rm(src.code(), dest.address());
             break;
 #endif
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movl(const Imm32 &imm32, const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG:
             masm.movl_i32r(imm32.value, dest.reg());
             break;
           case Operand::REG_DISP:
             masm.movl_i32m(imm32.value, dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movl_i32m(imm32.value, dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
 
     void xchgl(const Register &src, const Register &dest) {
         masm.xchgl_rr(src.code(), dest.code());
     }
 
     void movsd(const FloatRegister &src, const FloatRegister &dest) {
@@ -303,85 +303,85 @@ class AssemblerX86Shared
             break;
           case Operand::REG_DISP:
             masm.movsd_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.movsd_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movsd(const FloatRegister &src, const Operand &dest) {
         JS_ASSERT(HasSSE2());
         switch (dest.kind()) {
           case Operand::FPREG:
             masm.movsd_rr(src.code(), dest.fpu());
             break;
           case Operand::REG_DISP:
             masm.movsd_rm(src.code(), dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movsd_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movss(const Operand &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.movss_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.movss_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movss(const FloatRegister &src, const Operand &dest) {
         JS_ASSERT(HasSSE2());
         switch (dest.kind()) {
           case Operand::REG_DISP:
             masm.movss_rm(src.code(), dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movss_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movdqa(const Operand &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.movdqa_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.movdqa_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movdqa(const FloatRegister &src, const Operand &dest) {
         JS_ASSERT(HasSSE2());
         switch (dest.kind()) {
           case Operand::REG_DISP:
             masm.movdqa_rm(src.code(), dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movdqa_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cvtss2sd(const FloatRegister &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         masm.cvtss2sd_rr(src.code(), dest.code());
     }
     void cvtsd2ss(const FloatRegister &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
@@ -391,114 +391,114 @@ class AssemblerX86Shared
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.movzbl_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.movzbl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movsbl(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.movsbl_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.movsbl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movb(const Register &src, const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG_DISP:
             masm.movb_rm(src.code(), dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movb_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movb(const Imm32 &src, const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG_DISP:
             masm.movb_i8m(src.value, dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movb_i8m(src.value, dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movzwl(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.movzwl_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.movzwl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
 
     void movw(const Register &src, const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG_DISP:
             masm.movw_rm(src.code(), dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movw_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movw(const Imm32 &src, const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG_DISP:
             masm.movw_i16m(src.value, dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movw_i16m(src.value, dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movswl(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.movswl_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.movswl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void leal(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.leal_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.leal_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
 
   protected:
     JmpSrc jSrc(Condition cond, Label *label) {
         JmpSrc j = masm.jCC(static_cast<JSC::X86Assembler::Condition>(cond));
         if (label->bound()) {
             // The jump can be immediately patched to the correct destination.
@@ -573,17 +573,17 @@ class AssemblerX86Shared
             break;
           case Operand::SCALE:
             masm.jmp_m(op.disp(), op.base(), op.index(), op.scale());
             break;
           case Operand::REG:
             masm.jmp_r(op.reg());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cmpEAX(Label *label) { cmpSrc(label); }
     void bind(Label *label) {
         JSC::MacroAssembler::Label jsclabel;
         JSC::X86Assembler::JmpDst dst(masm.label());
         if (label->used()) {
             bool more;
@@ -670,17 +670,17 @@ class AssemblerX86Shared
         switch (op.kind()) {
           case Operand::REG:
             masm.call(op.reg());
             break;
           case Operand::REG_DISP:
             masm.call_m(op.disp(), op.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
 
     void breakpoint() {
         masm.int3();
     }
 
     static bool HasSSE2() {
@@ -703,17 +703,17 @@ class AssemblerX86Shared
         switch (rhs.kind()) {
           case Operand::REG:
             masm.cmpl_rr(rhs.reg(), lhs.code());
             break;
           case Operand::REG_DISP:
             masm.cmpl_mr(rhs.disp(), rhs.base(), lhs.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cmpl(const Register &src, Imm32 imm) {
         masm.cmpl_ir(imm.value, src.code());
     }
     void cmpl(const Operand &op, Imm32 imm) {
         switch (op.kind()) {
           case Operand::REG:
@@ -726,51 +726,51 @@ class AssemblerX86Shared
             masm.cmpl_im(imm.value, op.disp(), op.base(), op.index(), op.scale());
             break;
 #ifdef JS_CPU_X86
           case Operand::ADDRESS:
             masm.cmpl_im(imm.value, op.address());
             break;
 #endif
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cmpl(const Operand &lhs, const Register &rhs) {
         switch (lhs.kind()) {
           case Operand::REG:
             masm.cmpl_rr(rhs.code(), lhs.reg());
             break;
           case Operand::REG_DISP:
             masm.cmpl_rm(rhs.code(), lhs.disp(), lhs.base());
             break;
 #ifdef JS_CPU_X86
           case Operand::ADDRESS:
             masm.cmpl_rm(rhs.code(), lhs.address());
             break;
 #endif
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cmpl(const Operand &op, ImmWord imm) {
         switch (op.kind()) {
           case Operand::REG:
             masm.cmpl_ir(imm.value, op.reg());
             break;
           case Operand::REG_DISP:
             masm.cmpl_im(imm.value, op.disp(), op.base());
             break;
 #ifdef JS_CPU_X86
           case Operand::ADDRESS:
             masm.cmpl_im(imm.value, op.address());
             break;
 #endif
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void setCC(Condition cond, const Register &r) {
         masm.setCC_r(static_cast<JSC::X86Assembler::Condition>(cond), r.code());
     }
     void testb(const Register &lhs, const Register &rhs) {
         JS_ASSERT(GeneralRegisterSet(Registers::SingleByteRegs).has(lhs));
         JS_ASSERT(GeneralRegisterSet(Registers::SingleByteRegs).has(rhs));
@@ -786,17 +786,17 @@ class AssemblerX86Shared
         switch (lhs.kind()) {
           case Operand::REG:
             masm.testl_i32r(rhs.value, lhs.reg());
             break;
           case Operand::REG_DISP:
             masm.testl_i32m(rhs.value, lhs.disp(), lhs.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
             break;
         }
     }
 
     void addl(Imm32 imm, const Register &dest) {
         masm.addl_ir(imm.value, dest.code());
     }
     void addl(Imm32 imm, const Operand &op) {
@@ -808,32 +808,32 @@ class AssemblerX86Shared
             masm.addl_im(imm.value, op.disp(), op.base());
             break;
 #ifdef JS_CPU_X86
           case Operand::ADDRESS:
             masm.addl_im(imm.value, op.address());
             break;
 #endif
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void subl(Imm32 imm, const Register &dest) {
         masm.subl_ir(imm.value, dest.code());
     }
     void subl(Imm32 imm, const Operand &op) {
         switch (op.kind()) {
           case Operand::REG:
             masm.subl_ir(imm.value, op.reg());
             break;
           case Operand::REG_DISP:
             masm.subl_im(imm.value, op.disp(), op.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void addl(const Register &src, const Register &dest) {
         masm.addl_rr(src.code(), dest.code());
     }
     void subl(const Register &src, const Register &dest) {
         masm.subl_rr(src.code(), dest.code());
     }
@@ -841,17 +841,17 @@ class AssemblerX86Shared
         switch (src.kind()) {
           case Operand::REG:
             masm.subl_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.subl_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void orl(const Register &reg, const Register &dest) {
         masm.orl_rr(reg.code(), dest.code());
     }
     void orl(Imm32 imm, const Register &reg) {
         masm.orl_ir(imm.value, reg.code());
     }
@@ -859,17 +859,17 @@ class AssemblerX86Shared
         switch (op.kind()) {
           case Operand::REG:
             masm.orl_ir(imm.value, op.reg());
             break;
           case Operand::REG_DISP:
             masm.orl_im(imm.value, op.disp(), op.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void xorl(const Register &src, const Register &dest) {
         masm.xorl_rr(src.code(), dest.code());
     }
     void xorl(Imm32 imm, const Register &reg) {
         masm.xorl_ir(imm.value, reg.code());
     }
@@ -877,17 +877,17 @@ class AssemblerX86Shared
         switch (op.kind()) {
           case Operand::REG:
             masm.xorl_ir(imm.value, op.reg());
             break;
           case Operand::REG_DISP:
             masm.xorl_im(imm.value, op.disp(), op.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void andl(const Register &src, const Register &dest) {
         masm.andl_rr(src.code(), dest.code());
     }
     void andl(Imm32 imm, const Register &dest) {
         masm.andl_ir(imm.value, dest.code());
     }
@@ -895,65 +895,65 @@ class AssemblerX86Shared
         switch (op.kind()) {
           case Operand::REG:
             masm.andl_ir(imm.value, op.reg());
             break;
           case Operand::REG_DISP:
             masm.andl_im(imm.value, op.disp(), op.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void addl(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG:
             masm.addl_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.addl_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void orl(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG:
             masm.orl_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.orl_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void xorl(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG:
             masm.xorl_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.xorl_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void andl(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG:
             masm.andl_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.andl_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void imull(Imm32 imm, const Register &dest) {
         masm.imull_i32r(dest.code(), imm.value, dest.code());
     }
     void imull(const Register &src, const Register &dest) {
         masm.imull_rr(src.code(), dest.code());
     }
@@ -961,44 +961,44 @@ class AssemblerX86Shared
         switch (src.kind()) {
           case Operand::REG:
             masm.imull_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.imull_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void negl(const Operand &src) {
         switch (src.kind()) {
           case Operand::REG:
             masm.negl_r(src.reg());
             break;
           case Operand::REG_DISP:
             masm.negl_m(src.disp(), src.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void negl(const Register &reg) {
         masm.negl_r(reg.code());
     }
     void notl(const Operand &src) {
         switch (src.kind()) {
           case Operand::REG:
             masm.notl_r(src.reg());
             break;
           case Operand::REG_DISP:
             masm.notl_m(src.disp(), src.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void notl(const Register &reg) {
         masm.notl_r(reg.code());
     }
     void shrl(const Imm32 imm, const Register &dest) {
         masm.shrl_i8r(imm.value, dest.code());
     }
@@ -1026,33 +1026,33 @@ class AssemblerX86Shared
         switch (src.kind()) {
           case Operand::REG:
             masm.push_r(src.reg());
             break;
           case Operand::REG_DISP:
             masm.push_m(src.disp(), src.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void push(const Register &src) {
         masm.push_r(src.code());
     }
 
     void pop(const Operand &src) {
         switch (src.kind()) {
           case Operand::REG:
             masm.pop_r(src.reg());
             break;
           case Operand::REG_DISP:
             masm.pop_m(src.disp(), src.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void pop(const Register &src) {
         masm.pop_r(src.code());
     }
 
     void pushFlags() {
         masm.push_flags();
@@ -1098,17 +1098,17 @@ class AssemblerX86Shared
         switch (src.kind()) {
           case Operand::REG:
             masm.pinsrd_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.pinsrd_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void psrldq(Imm32 shift, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         masm.psrldq_ir(shift.value, dest.code());
     }
     void psllq(Imm32 shift, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
@@ -1127,17 +1127,17 @@ class AssemblerX86Shared
             break;
           case Operand::REG_DISP:
             masm.cvtsi2sd_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.cvtsi2sd_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cvttsd2si(const FloatRegister &src, const Register &dest) {
         JS_ASSERT(HasSSE2());
         masm.cvttsd2si_rr(src.code(), dest.code());
     }
     void cvtsi2sd(const Register &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
@@ -1181,68 +1181,68 @@ class AssemblerX86Shared
             masm.addsd_mr(src.disp(), src.base(), dest.code());
             break;
 #ifdef JS_CPU_X86
           case Operand::ADDRESS:
             masm.addsd_mr(src.address(), dest.code());
             break;
 #endif
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void subsd(const FloatRegister &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         masm.subsd_rr(src.code(), dest.code());
     }
     void subsd(const Operand &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         switch (src.kind()) {
           case Operand::FPREG:
             masm.subsd_rr(src.fpu(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.subsd_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void mulsd(const FloatRegister &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         masm.mulsd_rr(src.code(), dest.code());
     }
     void mulsd(const Operand &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         switch (src.kind()) {
           case Operand::FPREG:
             masm.mulsd_rr(src.fpu(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.mulsd_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void divsd(const FloatRegister &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         masm.divsd_rr(src.code(), dest.code());
     }
     void divsd(const Operand &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         switch (src.kind()) {
           case Operand::FPREG:
             masm.divsd_rr(src.fpu(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.divsd_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void xorpd(const FloatRegister &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
         masm.xorpd_rr(src.code(), dest.code());
     }
     void orpd(const FloatRegister &src, const FloatRegister &dest) {
         JS_ASSERT(HasSSE2());
@@ -1264,35 +1264,35 @@ class AssemblerX86Shared
     }
     void fisttp(const Operand &dest) {
         JS_ASSERT(HasSSE3());
         switch (dest.kind()) {
           case Operand::REG_DISP:
             masm.fisttp_m(dest.disp(), dest.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void fld(const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG_DISP:
             masm.fld_m(dest.disp(), dest.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void fstp(const Operand &src) {
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.fstp_m(src.disp(), src.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
 
     // Defined for compatibility with ARM's assembler
     uint32_t actualOffset(uint32_t x) {
         return x;
     }
 
@@ -1332,17 +1332,17 @@ class AssemblerX86Shared
         uintptr_t *ptr = ((uintptr_t *) data.raw()) - 1;
         JS_ASSERT(*ptr == expectedData.value);
         *ptr = newData.value;
     }
     static uint32_t nopSize() {
         return 1;
     }
     static uint8_t *nextInstruction(uint8_t *cur, uint32_t *count) {
-        JS_NOT_REACHED("nextInstruction NYI on x86");
+        MOZ_ASSUME_NOT_REACHED("nextInstruction NYI on x86");
     }
 
     // Toggle a jmp or cmp emitted by toggledJump().
     static void ToggleToJmp(CodeLocationLabel inst) {
         uint8_t *ptr = (uint8_t *)inst.raw();
         JS_ASSERT(*ptr == 0x3D);
         *ptr = 0xE9;
     }
--- a/js/src/ion/shared/CodeGenerator-shared-inl.h
+++ b/js/src/ion/shared/CodeGenerator-shared-inl.h
@@ -12,17 +12,17 @@ namespace ion {
 
 static inline int32_t
 ToInt32(const LAllocation *a)
 {
     if (a->isConstantValue())
         return a->toConstant()->toInt32();
     if (a->isConstantIndex())
         return a->toConstantIndex()->index();
-    JS_NOT_REACHED("this is not a constant!");
+    MOZ_ASSUME_NOT_REACHED("this is not a constant!");
     return -1;
 }
 static inline double
 ToDouble(const LAllocation *a)
 {
     return a->toConstant()->toNumber();
 }
 
--- a/js/src/ion/shared/CodeGenerator-x86-shared.cpp
+++ b/js/src/ion/shared/CodeGenerator-x86-shared.cpp
@@ -287,17 +287,17 @@ CodeGeneratorX86Shared::bailout(const T 
                                                        snapshot->mir()->block(),
                                                        snapshot->mir()->pc());
         binder(masm, ool->entry());
         return true;
       }
       case SequentialExecution:
         break;
       default:
-        JS_NOT_REACHED("No such execution mode");
+        MOZ_ASSUME_NOT_REACHED("No such execution mode");
     }
 
     if (!encode(snapshot))
         return false;
 
     // Though the assembler doesn't track all frame pushes, at least make sure
     // the known value makes sense. We can't use bailout tables if the stack
     // isn't properly aligned to the static frame size.
@@ -933,17 +933,17 @@ CodeGeneratorX86Shared::visitBitOpI(LBit
             break;
         case JSOP_BITAND:
             if (rhs->isConstant())
                 masm.andl(Imm32(ToInt32(rhs)), ToOperand(lhs));
             else
                 masm.andl(ToOperand(rhs), ToRegister(lhs));
             break;
         default:
-            JS_NOT_REACHED("unexpected binary opcode");
+            MOZ_ASSUME_NOT_REACHED("unexpected binary opcode");
     }
 
     return true;
 }
 
 bool
 CodeGeneratorX86Shared::visitShiftI(LShiftI *ins)
 {
@@ -967,17 +967,17 @@ CodeGeneratorX86Shared::visitShiftI(LShi
             } else if (ins->mir()->toUrsh()->canOverflow()) {
                 // x >>> 0 can overflow.
                 masm.testl(lhs, lhs);
                 if (!bailoutIf(Assembler::Signed, ins->snapshot()))
                     return false;
             }
             break;
           default:
-            JS_NOT_REACHED("Unexpected shift op");
+            MOZ_ASSUME_NOT_REACHED("Unexpected shift op");
         }
     } else {
         JS_ASSERT(ToRegister(rhs) == ecx);
         switch (ins->bitop()) {
           case JSOP_LSH:
             masm.shll_cl(lhs);
             break;
           case JSOP_RSH:
@@ -988,17 +988,17 @@ CodeGeneratorX86Shared::visitShiftI(LShi
             if (ins->mir()->toUrsh()->canOverflow()) {
                 // x >>> 0 can overflow.
                 masm.testl(lhs, lhs);
                 if (!bailoutIf(Assembler::Signed, ins->snapshot()))
                     return false;
             }
             break;
           default:
-            JS_NOT_REACHED("Unexpected shift op");
+            MOZ_ASSUME_NOT_REACHED("Unexpected shift op");
         }
     }
 
     return true;
 }
 
 bool
 CodeGeneratorX86Shared::visitUrshD(LUrshD *ins)
@@ -1133,17 +1133,17 @@ CodeGeneratorX86Shared::visitMathD(LMath
         break;
       case JSOP_MUL:
         masm.mulsd(rhs, lhs);
         break;
       case JSOP_DIV:
         masm.divsd(rhs, lhs);
         break;
       default:
-        JS_NOT_REACHED("unexpected opcode");
+        MOZ_ASSUME_NOT_REACHED("unexpected opcode");
         return false;
     }
     return true;
 }
 
 bool
 CodeGeneratorX86Shared::visitFloor(LFloor *lir)
 {
--- a/js/src/ion/shared/IonAssemblerBuffer.h
+++ b/js/src/ion/shared/IonAssemblerBuffer.h
@@ -233,17 +233,17 @@ struct AssemblerBuffer
     }
     BufferOffset nextOffset() const {
         if (tail != NULL)
             return BufferOffset(bufferSize + tail->size());
         else
             return BufferOffset(bufferSize);
     }
     BufferOffset prevOffset() const {
-        JS_NOT_REACHED("Don't current record lastInstSize");
+        MOZ_ASSUME_NOT_REACHED("Don't current record lastInstSize");
         return BufferOffset(bufferSize + tail->nodeSize - lastInstSize);
     }
 
     // Break the instruction stream so we can go back and edit it at this point
     void perforate() {
         Slice *tmp = newSlice(LifoAlloc_);
         if (!tmp)
             m_oom = true;
--- a/js/src/ion/shared/IonAssemblerBufferWithConstantPools.h
+++ b/js/src/ion/shared/IonAssemblerBufferWithConstantPools.h
@@ -1125,17 +1125,17 @@ struct AssemblerBufferWithConstantPool :
             start = poolGroup[idx].addPoolSize(start);
         }
         for (int idx = numPoolKinds-1; idx >= 0; idx--) {
             if (poolGroup[idx].other == realPool) {
                 return start + offset;
             }
             start = poolGroup[idx].other->addPoolSize(start);
         }
-        JS_NOT_REACHED("Entry is not in a pool");
+        MOZ_ASSUME_NOT_REACHED("Entry is not in a pool");
         return -1;
     }
     void writePoolEntry(PoolEntry pe, uint8_t *buff) {
         size_t size = getPoolEntrySize(pe);
         uint8_t *entry = getPoolEntry(pe);
         memcpy(entry, buff, size);
     }
     void readPoolEntry(PoolEntry pe, uint8_t *buff) {
--- a/js/src/ion/x64/Assembler-x64.cpp
+++ b/js/src/ion/x64/Assembler-x64.cpp
@@ -40,17 +40,17 @@ ABIArgGenerator::next(MIRType type)
       case MIRType_Int32:
       case MIRType_Pointer:
         current_ = ABIArg(IntArgRegs[regIndex_++]);
         break;
       case MIRType_Double:
         current_ = ABIArg(FloatArgRegs[regIndex_++]);
         break;
       default:
-        JS_NOT_REACHED("Unexpected argument type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected argument type");
     }
     return current_;
 #else
     switch (type) {
       case MIRType_Int32:
       case MIRType_Pointer:
         if (intRegIndex_ == NumIntArgRegs) {
             current_ = ABIArg(stackOffset_);
@@ -63,17 +63,17 @@ ABIArgGenerator::next(MIRType type)
         if (floatRegIndex_ == NumFloatArgRegs) {
             current_ = ABIArg(stackOffset_);
             stackOffset_ += sizeof(uint64_t);
             break;
         }
         current_ = ABIArg(FloatArgRegs[floatRegIndex_++]);
         break;
       default:
-        JS_NOT_REACHED("Unexpected argument type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected argument type");
     }
     return current_;
 #endif
 }
 
 const Register ABIArgGenerator::NonArgReturnVolatileReg0 = r10;
 const Register ABIArgGenerator::NonArgReturnVolatileReg1 = r11;
 const Register ABIArgGenerator::NonVolatileReg = r12;
--- a/js/src/ion/x64/Assembler-x64.h
+++ b/js/src/ion/x64/Assembler-x64.h
@@ -380,47 +380,47 @@ class Assembler : public AssemblerX86Sha
             break;
           case Operand::REG_DISP:
             masm.movq_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.movq_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movq(const Register &src, const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG:
             masm.movq_rr(src.code(), dest.reg());
             break;
           case Operand::REG_DISP:
             masm.movq_rm(src.code(), dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movq_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movq(Imm32 imm32, const Operand &dest) {
         switch (dest.kind()) {
           case Operand::REG:
             masm.movl_i32r(imm32.value, dest.reg());
             break;
           case Operand::REG_DISP:
             masm.movq_i32m(imm32.value, dest.disp(), dest.base());
             break;
           case Operand::SCALE:
             masm.movq_i32m(imm32.value, dest.disp(), dest.base(), dest.index(), dest.scale());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movqsd(const Register &src, const FloatRegister &dest) {
         masm.movq_rr(src.code(), dest.code());
     }
     void movqsd(const FloatRegister &src, const Register &dest) {
         masm.movq_rr(src.code(), dest.code());
     }
@@ -446,32 +446,32 @@ class Assembler : public AssemblerX86Sha
         switch (dest.kind()) {
           case Operand::REG:
             masm.addq_ir(imm.value, dest.reg());
             break;
           case Operand::REG_DISP:
             masm.addq_im(imm.value, dest.disp(), dest.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void addq(const Register &src, const Register &dest) {
         masm.addq_rr(src.code(), dest.code());
     }
     void addq(const Operand &src, const Register &dest) {
         switch (src.kind()) {
           case Operand::REG:
             masm.addq_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.addq_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
 
     void subq(Imm32 imm, const Register &dest) {
         masm.subq_ir(imm.value, dest.code());
     }
     void subq(const Register &src, const Register &dest) {
         masm.subq_rr(src.code(), dest.code());
@@ -480,17 +480,17 @@ class Assembler : public AssemblerX86Sha
         switch (src.kind()) {
           case Operand::REG:
             masm.subq_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.subq_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void shlq(Imm32 imm, const Register &dest) {
         masm.shlq_i8r(imm.value, dest.code());
     }
     void shrq(Imm32 imm, const Register &dest) {
         masm.shrq_i8r(imm.value, dest.code());
     }
@@ -507,17 +507,17 @@ class Assembler : public AssemblerX86Sha
         switch (src.kind()) {
           case Operand::REG:
             masm.orq_rr(src.reg(), dest.code());
             break;
           case Operand::REG_DISP:
             masm.orq_mr(src.disp(), src.base(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void xorq(const Register &src, const Register &dest) {
         masm.xorq_rr(src.code(), dest.code());
     }
     void xorq(Imm32 imm, const Register &dest) {
         masm.xorq_ir(imm.value, dest.code());
     }
@@ -563,17 +563,17 @@ class Assembler : public AssemblerX86Sha
         switch (src.kind()) {
           case Operand::REG_DISP:
             masm.leaq_mr(src.disp(), src.base(), dest.code());
             break;
           case Operand::SCALE:
             masm.leaq_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
             break;
           default:
-            JS_NOT_REACHED("unexepcted operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexepcted operand kind");
         }
     }
 
     CodeOffsetLabel loadRipRelativeInt32(const Register &dest) {
         return CodeOffsetLabel(masm.movl_ripr(dest.code()).offset());
     }
     CodeOffsetLabel loadRipRelativeInt64(const Register &dest) {
         return CodeOffsetLabel(masm.movq_ripr(dest.code()).offset());
@@ -598,41 +598,41 @@ class Assembler : public AssemblerX86Sha
         switch (lhs.kind()) {
           case Operand::REG:
             masm.cmpq_rr(rhs.code(), lhs.reg());
             break;
           case Operand::REG_DISP:
             masm.cmpq_rm(rhs.code(), lhs.disp(), lhs.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cmpq(const Operand &lhs, Imm32 rhs) {
         switch (lhs.kind()) {
           case Operand::REG:
             masm.cmpq_ir(rhs.value, lhs.reg());
             break;
           case Operand::REG_DISP:
             masm.cmpq_im(rhs.value, lhs.disp(), lhs.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cmpq(const Register &lhs, const Operand &rhs) {
         switch (rhs.kind()) {
           case Operand::REG:
             masm.cmpq_rr(rhs.reg(), lhs.code());
             break;
           case Operand::REG_DISP:
             masm.cmpq_mr(rhs.disp(), rhs.base(), lhs.code());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void cmpq(const Register &lhs, const Register &rhs) {
         masm.cmpq_rr(rhs.code(), lhs.code());
     }
     void cmpq(const Register &lhs, Imm32 rhs) {
         masm.cmpq_ir(rhs.value, lhs.code());
     }
@@ -647,17 +647,17 @@ class Assembler : public AssemblerX86Sha
         switch (lhs.kind()) {
           case Operand::REG:
             masm.testq_i32r(rhs.value, lhs.reg());
             break;
           case Operand::REG_DISP:
             masm.testq_i32m(rhs.value, lhs.disp(), lhs.base());
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
             break;
         }
     }
 
     void jmp(void *target, Relocation::Kind reloc = Relocation::HARDCODED) {
         JmpSrc src = masm.jmp();
         addPendingJump(src, target, reloc);
     }
--- a/js/src/ion/x64/BaselineIC-x64.cpp
+++ b/js/src/ion/x64/BaselineIC-x64.cpp
@@ -175,17 +175,17 @@ ICBinaryArith_Int32::Compiler::generateS
             masm.convertUInt32ToDouble(ExtractTemp0, ScratchFloatReg);
             masm.boxDouble(ScratchFloatReg, R0);
         } else {
             masm.j(Assembler::Signed, &revertRegister);
             masm.boxValue(JSVAL_TYPE_INT32, ExtractTemp0, R0.valueReg());
         }
         break;
       default:
-        JS_NOT_REACHED("Unhandled op in BinaryArith_Int32");
+        MOZ_ASSUME_NOT_REACHED("Unhandled op in BinaryArith_Int32");
         return false;
     }
 
     // Return from stub.
     EmitReturnFromIC(masm);
 
     if (op_ == JSOP_MUL) {
         masm.bind(&maybeNegZero);
@@ -225,17 +225,17 @@ ICUnaryArith_Int32::Compiler::generateSt
         masm.notl(R0.valueReg());
         break;
       case JSOP_NEG:
         // Guard against 0 and MIN_INT, both result in a double.
         masm.branchTest32(Assembler::Zero, R0.valueReg(), Imm32(0x7fffffff), &failure);
         masm.negl(R0.valueReg());
         break;
       default:
-        JS_NOT_REACHED("Unexpected op");
+        MOZ_ASSUME_NOT_REACHED("Unexpected op");
         return false;
     }
 
     masm.tagValue(JSVAL_TYPE_INT32, R0.valueReg(), R0);
 
     EmitReturnFromIC(masm);
 
     masm.bind(&failure);
--- a/js/src/ion/x64/CodeGenerator-x64.cpp
+++ b/js/src/ion/x64/CodeGenerator-x64.cpp
@@ -52,17 +52,17 @@ FrameSizeClass
 FrameSizeClass::ClassLimit()
 {
     return FrameSizeClass(0);
 }
 
 uint32_t
 FrameSizeClass::frameSize() const
 {
-    JS_NOT_REACHED("x64 does not use frame size classes");
+    MOZ_ASSUME_NOT_REACHED("x64 does not use frame size classes");
     return 0;
 }
 
 bool
 CodeGeneratorX64::visitValue(LValue *value)
 {
     LDefinition *reg = value->getDef(0);
     masm.moveValue(value->value(), ToRegister(reg));
@@ -113,17 +113,17 @@ CodeGeneratorX64::visitUnbox(LUnbox *unb
             break;
           case MIRType_Object:
             cond = masm.testObject(Assembler::NotEqual, value);
             break;
           case MIRType_String:
             cond = masm.testString(Assembler::NotEqual, value);
             break;
           default:
-            JS_NOT_REACHED("Given MIRType cannot be unboxed.");
+            MOZ_ASSUME_NOT_REACHED("Given MIRType cannot be unboxed.");
             return false;
         }
         if (!bailoutIf(cond, unbox->snapshot()))
             return false;
     }
 
     switch (mir->type()) {
       case MIRType_Int32:
@@ -134,17 +134,17 @@ CodeGeneratorX64::visitUnbox(LUnbox *unb
         break;
       case MIRType_Object:
         masm.unboxObject(value, ToRegister(result));
         break;
       case MIRType_String:
         masm.unboxString(value, ToRegister(result));
         break;
       default:
-        JS_NOT_REACHED("Given MIRType cannot be unboxed.");
+        MOZ_ASSUME_NOT_REACHED("Given MIRType cannot be unboxed.");
         break;
     }
 
     return true;
 }
 
 bool
 CodeGeneratorX64::visitLoadSlotV(LLoadSlotV *load)
@@ -171,17 +171,17 @@ CodeGeneratorX64::loadUnboxedValue(Opera
         break;
 
       case MIRType_Int32:
       case MIRType_Boolean:
         masm.movl(source, ToRegister(dest));
         break;
 
       default:
-        JS_NOT_REACHED("unexpected type");
+        MOZ_ASSUME_NOT_REACHED("unexpected type");
     }
 }
 
 bool
 CodeGeneratorX64::visitLoadSlotT(LLoadSlotT *load)
 {
     Register base = ToRegister(load->input());
     int32_t offset = load->mir()->slot() * sizeof(js::Value);
@@ -384,24 +384,24 @@ CodeGeneratorX64::visitUInt32ToDouble(LU
 {
     masm.convertUInt32ToDouble(ToRegister(lir->input()), ToFloatRegister(lir->output()));
     return true;
 }
 
 bool
 CodeGeneratorX64::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins)
 {
-    JS_NOT_REACHED("NYI");
+    MOZ_ASSUME_NOT_REACHED("NYI");
     return true;
 }
 
 bool
 CodeGeneratorX64::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins)
 {
-    JS_NOT_REACHED("NYI");
+    MOZ_ASSUME_NOT_REACHED("NYI");
     return true;
 }
 
 bool
 CodeGeneratorX64::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
 {
     MAsmJSLoadHeap *mir = ins->mir();
     ArrayBufferView::ViewType vt = mir->viewType();
@@ -421,17 +421,17 @@ CodeGeneratorX64::visitAsmJSLoadHeap(LAs
     switch (vt) {
       case ArrayBufferView::TYPE_INT8:    masm.movsbl(srcAddr, ToRegister(ins->output())); break;
       case ArrayBufferView::TYPE_UINT8:   masm.movzbl(srcAddr, ToRegister(ins->output())); break;
       case ArrayBufferView::TYPE_INT16:   masm.movswl(srcAddr, ToRegister(ins->output())); break;
       case ArrayBufferView::TYPE_UINT16:  masm.movzwl(srcAddr, ToRegister(ins->output())); break;
       case ArrayBufferView::TYPE_INT32:   masm.movl(srcAddr, ToRegister(ins->output())); break;
       case ArrayBufferView::TYPE_UINT32:  masm.movl(srcAddr, ToRegister(ins->output())); break;
       case ArrayBufferView::TYPE_FLOAT64: masm.movsd(srcAddr, ToFloatRegister(ins->output())); break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
     uint32_t after = masm.size();
     return gen->noteHeapAccess(AsmJSHeapAccess(before, after, vt, ToAnyRegister(ins->output())));
 }
 
 bool
 CodeGeneratorX64::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
 {
@@ -452,28 +452,28 @@ CodeGeneratorX64::visitAsmJSStoreHeap(LA
     if (ins->value()->isConstant()) {
         switch (vt) {
           case ArrayBufferView::TYPE_INT8:    masm.movb(Imm32(ToInt32(ins->value())), dstAddr); break;
           case ArrayBufferView::TYPE_UINT8:   masm.movb(Imm32(ToInt32(ins->value())), dstAddr); break;
           case ArrayBufferView::TYPE_INT16:   masm.movw(Imm32(ToInt32(ins->value())), dstAddr); break;
           case ArrayBufferView::TYPE_UINT16:  masm.movw(Imm32(ToInt32(ins->value())), dstAddr); break;
           case ArrayBufferView::TYPE_INT32:   masm.movl(Imm32(ToInt32(ins->value())), dstAddr); break;
           case ArrayBufferView::TYPE_UINT32:  masm.movl(Imm32(ToInt32(ins->value())), dstAddr); break;
-          default: JS_NOT_REACHED("unexpected array type");
+          default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
         }
     } else {
         switch (vt) {
           case ArrayBufferView::TYPE_INT8:    masm.movb(ToRegister(ins->value()), dstAddr); break;
           case ArrayBufferView::TYPE_UINT8:   masm.movb(ToRegister(ins->value()), dstAddr); break;
           case ArrayBufferView::TYPE_INT16:   masm.movw(ToRegister(ins->value()), dstAddr); break;
           case ArrayBufferView::TYPE_UINT16:  masm.movw(ToRegister(ins->value()), dstAddr); break;
           case ArrayBufferView::TYPE_INT32:   masm.movl(ToRegister(ins->value()), dstAddr); break;
           case ArrayBufferView::TYPE_UINT32:  masm.movl(ToRegister(ins->value()), dstAddr); break;
           case ArrayBufferView::TYPE_FLOAT64: masm.movsd(ToFloatRegister(ins->value()), dstAddr); break;
-          default: JS_NOT_REACHED("unexpected array type");
+          default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
         }
     }
     uint32_t after = masm.size();
     return gen->noteHeapAccess(AsmJSHeapAccess(before, after));
 }
 
 bool
 CodeGeneratorX64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins)
--- a/js/src/ion/x64/Lowering-x64.cpp
+++ b/js/src/ion/x64/Lowering-x64.cpp
@@ -152,17 +152,17 @@ LIRGeneratorX64::visitAsmJSStoreHeap(MAs
         lir = new LAsmJSStoreHeap(useRegisterAtStart(ins->ptr()),
                                   useRegisterOrConstantAtStart(ins->value()));
         break;
       case ArrayBufferView::TYPE_FLOAT32:
       case ArrayBufferView::TYPE_FLOAT64:
         lir = new LAsmJSStoreHeap(useRegisterAtStart(ins->ptr()),
                                   useRegisterAtStart(ins->value()));
         break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
 
     return add(lir, ins);
 }
 
 bool
 LIRGeneratorX64::visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr *ins)
 {
@@ -173,11 +173,11 @@ LGetPropertyCacheT *
 LIRGeneratorX64::newLGetPropertyCacheT(MGetPropertyCache *ins)
 {
     return new LGetPropertyCacheT(useRegister(ins->object()), LDefinition::BogusTemp());
 }
 
 bool
 LIRGeneratorX64::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins)
 {
-    JS_NOT_REACHED("NYI");
+    MOZ_ASSUME_NOT_REACHED("NYI");
     return true;
 }
--- a/js/src/ion/x64/MacroAssembler-x64.h
+++ b/js/src/ion/x64/MacroAssembler-x64.h
@@ -90,17 +90,17 @@ class MacroAssemblerX64 : public MacroAs
           case Operand::REG_DISP:
             return Operand(Register::FromCode(base.base()), base.disp() + 4);
 
           case Operand::SCALE:
             return Operand(Register::FromCode(base.base()), Register::FromCode(base.index()),
                            base.scale(), base.disp() + 4);
 
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
             return base; // Silence GCC warning.
         }
     }
     static inline Operand ToUpper32(const Address &address) {
         return Operand(address.base, address.offset + 4);
     }
     static inline Operand ToUpper32(const BaseIndex &address) {
         return Operand(address.base, address.index, address.scale, address.offset + 4);
--- a/js/src/ion/x64/Trampoline-x64.cpp
+++ b/js/src/ion/x64/Trampoline-x64.cpp
@@ -445,17 +445,17 @@ GenerateBailoutThunk(JSContext *cx, Macr
     masm.lea(Operand(rsp, rcx, TimesOne, sizeof(void *)), rsp);
 
     masm.generateBailoutTail(rdx, r9);
 }
 
 IonCode *
 IonRuntime::generateBailoutTable(JSContext *cx, uint32_t frameClass)
 {
-    JS_NOT_REACHED("x64 does not use bailout tables");
+    MOZ_ASSUME_NOT_REACHED("x64 does not use bailout tables");
     return NULL;
 }
 
 IonCode *
 IonRuntime::generateBailoutHandler(JSContext *cx)
 {
     MacroAssembler masm;
 
@@ -557,17 +557,17 @@ IonRuntime::generateVMWrapper(JSContext 
                 argDisp += sizeof(void *);
                 break;
               case VMFunction::WordByRef:
                 masm.passABIArg(MoveOperand(argsBase, argDisp, MoveOperand::EFFECTIVE));
                 argDisp += sizeof(void *);
                 break;
               case VMFunction::DoubleByValue:
               case VMFunction::DoubleByRef:
-                JS_NOT_REACHED("NYI: x64 callVM should not be used with 128bits values.");
+                MOZ_ASSUME_NOT_REACHED("NYI: x64 callVM should not be used with 128bits values.");
                 break;
             }
         }
     }
 
     // Copy the implicit outparam, if any.
     if (outReg != InvalidReg)
         masm.passABIArg(outReg);
@@ -583,17 +583,17 @@ IonRuntime::generateVMWrapper(JSContext 
       case Type_Bool:
         masm.testb(rax, rax);
         masm.j(Assembler::Zero, &failure);
         break;
       case Type_ParallelResult:
         masm.branchPtr(Assembler::NotEqual, rax, Imm32(TP_SUCCESS), &failure);
         break;
       default:
-        JS_NOT_REACHED("unknown failure kind");
+        MOZ_ASSUME_NOT_REACHED("unknown failure kind");
         break;
     }
 
     // Load the outparam and free any allocated stack.
     switch (f.outParam) {
       case Type_Handle:
         masm.popRooted(f.outParamRootType, ReturnReg, JSReturnOperand);
         break;
--- a/js/src/ion/x86/Assembler-x86.cpp
+++ b/js/src/ion/x86/Assembler-x86.cpp
@@ -23,17 +23,17 @@ ABIArgGenerator::next(MIRType type)
       case MIRType_Int32:
       case MIRType_Pointer:
         stackOffset_ += sizeof(uint32_t);
         break;
       case MIRType_Double:
         stackOffset_ += sizeof(uint64_t);
         break;
       default:
-        JS_NOT_REACHED("Unexpected argument type");
+        MOZ_ASSUME_NOT_REACHED("Unexpected argument type");
     }
     return current_;
 }
 
 const Register ABIArgGenerator::NonArgReturnVolatileReg0 = ecx;
 const Register ABIArgGenerator::NonArgReturnVolatileReg1 = edx;
 const Register ABIArgGenerator::NonVolatileReg = ebx;
 
--- a/js/src/ion/x86/Assembler-x86.h
+++ b/js/src/ion/x86/Assembler-x86.h
@@ -307,17 +307,17 @@ class Assembler : public AssemblerX86Sha
             masm.movl_i32m(ptr.value, dest.disp(), dest.base());
             writeDataRelocation(ptr);
             break;
           case Operand::SCALE:
             masm.movl_i32m(ptr.value, dest.disp(), dest.base(), dest.index(), dest.scale());
             writeDataRelocation(ptr);
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     void movl(ImmWord imm, Register dest) {
         masm.movl_i32r(imm.value, dest.code());
     }
     void mov(ImmWord imm, Register dest) {
         movl(imm, dest);
     }
@@ -370,17 +370,17 @@ class Assembler : public AssemblerX86Sha
             masm.cmpl_im_force32(imm.value, op.disp(), op.base());
             writeDataRelocation(imm);
             break;
           case Operand::ADDRESS:
             masm.cmpl_im(imm.value, op.address());
             writeDataRelocation(imm);
             break;
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
         }
     }
     CodeOffsetLabel cmplWithPatch(const Register &lhs, Imm32 rhs) {
         masm.cmpl_ir_force32(rhs.value, lhs.code());
         return masm.currentOffset();
     }
 
     void jmp(void *target, Relocation::Kind reloc = Relocation::HARDCODED) {
--- a/js/src/ion/x86/BaselineIC-x86.cpp
+++ b/js/src/ion/x86/BaselineIC-x86.cpp
@@ -179,17 +179,17 @@ ICBinaryArith_Int32::Compiler::generateS
             masm.convertUInt32ToDouble(R0.payloadReg(), ScratchFloatReg);
             masm.boxDouble(ScratchFloatReg, R0);
         } else {
             masm.j(Assembler::Signed, &revertRegister);
             masm.tagValue(JSVAL_TYPE_INT32, R0.payloadReg(), R0);
         }
         break;
       default:
-       JS_NOT_REACHED("Unhandled op for BinaryArith_Int32.  ");
+       MOZ_ASSUME_NOT_REACHED("Unhandled op for BinaryArith_Int32.  ");
        return false;
     }
 
     // Return.
     EmitReturnFromIC(masm);
 
     switch(op_) {
       case JSOP_MUL:
@@ -241,17 +241,17 @@ ICUnaryArith_Int32::Compiler::generateSt
         masm.notl(R0.payloadReg());
         break;
       case JSOP_NEG:
         // Guard against 0 and MIN_INT, both result in a double.
         masm.branchTest32(Assembler::Zero, R0.payloadReg(), Imm32(0x7fffffff), &failure);
         masm.negl(R0.payloadReg());
         break;
       default:
-        JS_NOT_REACHED("Unexpected op");
+        MOZ_ASSUME_NOT_REACHED("Unexpected op");
         return false;
     }
 
     EmitReturnFromIC(masm);
 
     masm.bind(&failure);
     EmitStubGuardFailure(masm);
     return true;
--- a/js/src/ion/x86/CodeGenerator-x86.cpp
+++ b/js/src/ion/x86/CodeGenerator-x86.cpp
@@ -418,17 +418,17 @@ CodeGeneratorX86::loadViewTypeElement(Ar
       case ArrayBufferView::TYPE_INT8:    masm.movsblWithPatch(srcAddr, ToRegister(out)); break;
       case ArrayBufferView::TYPE_UINT8_CLAMPED:
       case ArrayBufferView::TYPE_UINT8:   masm.movzblWithPatch(srcAddr, ToRegister(out)); break;
       case ArrayBufferView::TYPE_INT16:   masm.movswlWithPatch(srcAddr, ToRegister(out)); break;
       case ArrayBufferView::TYPE_UINT16:  masm.movzwlWithPatch(srcAddr, ToRegister(out)); break;
       case ArrayBufferView::TYPE_INT32:   masm.movlWithPatch(srcAddr, ToRegister(out)); break;
       case ArrayBufferView::TYPE_UINT32:  masm.movlWithPatch(srcAddr, ToRegister(out)); break;
       case ArrayBufferView::TYPE_FLOAT64: masm.movsdWithPatch(srcAddr, ToFloatRegister(out)); break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
 }
 
 bool
 CodeGeneratorX86::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins)
 {
     const MLoadTypedArrayElementStatic *mir = ins->mir();
     ArrayBufferView::ViewType vt = mir->viewType();
@@ -521,17 +521,17 @@ CodeGeneratorX86::storeViewTypeElement(A
       case ArrayBufferView::TYPE_INT8:    masm.movbWithPatch(ToRegister(value), dstAddr); break;
       case ArrayBufferView::TYPE_UINT8_CLAMPED:
       case ArrayBufferView::TYPE_UINT8:   masm.movbWithPatch(ToRegister(value), dstAddr); break;
       case ArrayBufferView::TYPE_INT16:   masm.movwWithPatch(ToRegister(value), dstAddr); break;
       case ArrayBufferView::TYPE_UINT16:  masm.movwWithPatch(ToRegister(value), dstAddr); break;
       case ArrayBufferView::TYPE_INT32:   masm.movlWithPatch(ToRegister(value), dstAddr); break;
       case ArrayBufferView::TYPE_UINT32:  masm.movlWithPatch(ToRegister(value), dstAddr); break;
       case ArrayBufferView::TYPE_FLOAT64: masm.movsdWithPatch(ToFloatRegister(value), dstAddr); break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
 }
 
 bool
 CodeGeneratorX86::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins)
 {
     MStoreTypedArrayElementStatic *mir = ins->mir();
     ArrayBufferView::ViewType vt = mir->viewType();
--- a/js/src/ion/x86/Lowering-x86.cpp
+++ b/js/src/ion/x86/Lowering-x86.cpp
@@ -232,17 +232,17 @@ LIRGeneratorX86::visitAsmJSStoreHeap(MAs
       case ArrayBufferView::TYPE_INT16: case ArrayBufferView::TYPE_UINT16:
       case ArrayBufferView::TYPE_INT32: case ArrayBufferView::TYPE_UINT32:
       case ArrayBufferView::TYPE_FLOAT32: case ArrayBufferView::TYPE_FLOAT64:
         // For now, don't allow constants. The immediate operand affects
         // instruction layout which affects patching.
         lir = new LAsmJSStoreHeap(useRegisterAtStart(ins->ptr()),
                                   useRegisterAtStart(ins->value()));
         break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
 
     return add(lir, ins);
 }
 
 bool
 LIRGeneratorX86::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins)
 {
@@ -256,17 +256,17 @@ LIRGeneratorX86::visitStoreTypedArrayEle
                                                 useFixed(ins->value(), eax));
         break;
       case ArrayBufferView::TYPE_INT16: case ArrayBufferView::TYPE_UINT16:
       case ArrayBufferView::TYPE_INT32: case ArrayBufferView::TYPE_UINT32:
       case ArrayBufferView::TYPE_FLOAT32: case ArrayBufferView::TYPE_FLOAT64:
         lir = new LStoreTypedArrayElementStatic(useRegisterAtStart(ins->ptr()),
                                                 useRegisterAtStart(ins->value()));
         break;
-      default: JS_NOT_REACHED("unexpected array type");
+      default: MOZ_ASSUME_NOT_REACHED("unexpected array type");
     }
 
     return add(lir, ins);
 }
 
 bool
 LIRGeneratorX86::visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr *ins)
 {
--- a/js/src/ion/x86/MacroAssembler-x86.h
+++ b/js/src/ion/x86/MacroAssembler-x86.h
@@ -93,17 +93,17 @@ class MacroAssemblerX86 : public MacroAs
           case Operand::REG_DISP:
             return Operand(Register::FromCode(base.base()), base.disp() + sizeof(void *));
 
           case Operand::SCALE:
             return Operand(Register::FromCode(base.base()), Register::FromCode(base.index()),
                            base.scale(), base.disp() + sizeof(void *));
 
           default:
-            JS_NOT_REACHED("unexpected operand kind");
+            MOZ_ASSUME_NOT_REACHED("unexpected operand kind");
             return base; // Silence GCC warning.
         }
     }
     void moveValue(const Value &val, Register type, Register data) {
         jsval_layout jv = JSVAL_TO_IMPL(val);
         movl(Imm32(jv.s.tag), type);
         if (val.isMarkable())
             movl(ImmGCPtr(reinterpret_cast<gc::Cell *>(val.toGCThing())), data);
--- a/js/src/ion/x86/Trampoline-x86.cpp
+++ b/js/src/ion/x86/Trampoline-x86.cpp
@@ -604,17 +604,17 @@ IonRuntime::generateVMWrapper(JSContext 
       case Type_Bool:
         masm.testb(eax, eax);
         masm.j(Assembler::Zero, &failure);
         break;
       case Type_ParallelResult:
         masm.branchPtr(Assembler::NotEqual, eax, Imm32(TP_SUCCESS), &failure);
         break;
       default:
-        JS_NOT_REACHED("unknown failure kind");
+        MOZ_ASSUME_NOT_REACHED("unknown failure kind");
         break;
     }
 
     // Load the outparam and free any allocated stack.
     switch (f.outParam) {
       case Type_Handle:
         masm.popRooted(f.outParamRootType, ReturnReg, JSReturnOperand);
         break;
--- a/js/src/jsanalyze.cpp
+++ b/js/src/jsanalyze.cpp
@@ -2017,17 +2017,17 @@ SSAValue::print() const
             printf("write:%05u", varOffset());
         break;
 
       case PHI:
         printf("phi:%05u#%u", phiOffset(), phiSlot());
         break;
 
       default:
-        JS_NOT_REACHED("Bad kind");
+        MOZ_NOT_REACHED("Bad kind");
     }
 }
 
 void
 ScriptAnalysis::assertMatchingDebugMode()
 {
     JS_ASSERT(!!script_->compartment()->debugMode() == !!originalDebugMode_);
 }
--- a/js/src/jsanalyze.h
+++ b/js/src/jsanalyze.h
@@ -201,17 +201,17 @@ ReverseCompareOp(JSOp op)
       case JSOP_LE:
         return JSOP_GE;
       case JSOP_EQ:
       case JSOP_NE:
       case JSOP_STRICTEQ:
       case JSOP_STRICTNE:
         return op;
       default:
-        JS_NOT_REACHED("unrecognized op");
+        MOZ_ASSUME_NOT_REACHED("unrecognized op");
         return op;
     }
 }
 
 static inline JSOp
 NegateCompareOp(JSOp op)
 {
     switch (op) {
@@ -227,17 +227,17 @@ NegateCompareOp(JSOp op)
         return JSOP_NE;
       case JSOP_NE:
         return JSOP_EQ;
       case JSOP_STRICTNE:
         return JSOP_STRICTEQ;
       case JSOP_STRICTEQ:
         return JSOP_STRICTNE;
       default:
-        JS_NOT_REACHED("unrecognized op");
+        MOZ_ASSUME_NOT_REACHED("unrecognized op");
         return op;
     }
 }
 
 static inline unsigned
 FollowBranch(JSContext *cx, JSScript *script, unsigned offset)
 {
     /*
@@ -290,17 +290,17 @@ static inline uint32_t GetBytecodeSlot(J
       case JSOP_CALLLOCAL:
       case JSOP_SETLOCAL:
         return LocalSlot(script, GET_SLOTNO(pc));
 
       case JSOP_THIS:
         return ThisSlot();
 
       default:
-        JS_NOT_REACHED("Bad slot opcode");
+        MOZ_ASSUME_NOT_REACHED("Bad slot opcode");
         return 0;
     }
 }
 
 /* Slot opcodes which update SSA information. */
 static inline bool
 BytecodeUpdatesSlot(JSOp op)
 {
--- a/js/src/jsanalyzeinlines.h
+++ b/js/src/jsanalyzeinlines.h
@@ -66,17 +66,17 @@ ScriptAnalysis::getValueTypes(const SSAV
              * post-inc/dec ops.
              */
             return pushedTypes(v.varOffset(), 0);
         }
       case SSAValue::PHI:
         return &v.phiNode()->types;
       default:
         /* Cannot compute types for empty SSA values. */
-        JS_NOT_REACHED("Bad SSA value");
+        MOZ_ASSUME_NOT_REACHED("Bad SSA value");
         return NULL;
     }
 }
 
 inline types::StackTypeSet *
 ScriptAnalysis::poppedTypes(uint32_t offset, uint32_t which)
 {
     return getValueTypes(poppedValue(offset, which));
--- a/js/src/jsclone.cpp
+++ b/js/src/jsclone.cpp
@@ -922,17 +922,17 @@ JSStructuredCloneReader::readTypedArray(
         break;
       case TypedArray::TYPE_FLOAT64:
         obj = JS_NewFloat64ArrayWithBuffer(context(), buffer, byteOffset, nelems);
         break;
       case TypedArray::TYPE_UINT8_CLAMPED:
         obj = JS_NewUint8ClampedArrayWithBuffer(context(), buffer, byteOffset, nelems);
         break;
       default:
-        JS_NOT_REACHED("unknown TypedArray type");
+        MOZ_ASSUME_NOT_REACHED("unknown TypedArray type");
         return false;
     }
 
     if (!obj)
         return false;
     vp->setObject(*obj);
 
     allObjs[placeholderIndex] = *vp;
@@ -965,17 +965,17 @@ bytesPerTypedArrayElement(uint32_t array
         return sizeof(uint16_t);
       case TypedArray::TYPE_INT32:
       case TypedArray::TYPE_UINT32:
       case TypedArray::TYPE_FLOAT32:
         return sizeof(uint32_t);
       case TypedArray::TYPE_FLOAT64:
         return sizeof(uint64_t);
       default:
-        JS_NOT_REACHED("unknown TypedArray type");
+        MOZ_ASSUME_NOT_REACHED("unknown TypedArray type");
         return 0;
     }
 }
 
 /*
  * Read in the data for a structured clone version 1 ArrayBuffer, performing
  * endianness-conversion while reading.
  */
@@ -1002,17 +1002,17 @@ JSStructuredCloneReader::readV1ArrayBuff
         return in.readArray((uint16_t*) buffer.dataPointer(), nelems);
       case TypedArray::TYPE_INT32:
       case TypedArray::TYPE_UINT32:
       case TypedArray::TYPE_FLOAT32:
         return in.readArray((uint32_t*) buffer.dataPointer(), nelems);
       case TypedArray::TYPE_FLOAT64:
         return in.readArray((uint64_t*) buffer.dataPointer(), nelems);
       default:
-        JS_NOT_REACHED("unknown TypedArray type");
+        MOZ_ASSUME_NOT_REACHED("unknown TypedArray type");
         return false;
     }
 }
 
 bool
 JSStructuredCloneReader::startRead(Value *vp)
 {
     uint32_t tag, data;
--- a/js/src/jscntxtinlines.h
+++ b/js/src/jscntxtinlines.h
@@ -611,14 +611,14 @@ js::ThreadSafeContext::allowGC() const
 {
     switch (contextKind_) {
       case Context_JS:
         return CanGC;
       case Context_ForkJoin:
         return NoGC;
       default:
         /* Silence warnings. */
-        JS_NOT_REACHED("Bad context kind");
+        MOZ_ASSUME_NOT_REACHED("Bad context kind");
         return NoGC;
     }
 }
 
 #endif /* jscntxtinlines_h */
--- a/js/src/jsdbgapi.cpp
+++ b/js/src/jsdbgapi.cpp
@@ -100,17 +100,17 @@ js::ScriptDebugPrologue(JSContext *cx, A
         break;
       case JSTRAP_ERROR:
         cx->clearPendingException();
         break;
       case JSTRAP_RETURN:
         frame.setReturnValue(rval);
         break;
       default:
-        JS_NOT_REACHED("bad Debugger::onEnterFrame JSTrapStatus value");
+        MOZ_ASSUME_NOT_REACHED("bad Debugger::onEnterFrame JSTrapStatus value");
     }
     return status;
 }
 
 bool
 js::ScriptDebugEpilogue(JSContext *cx, AbstractFramePtr frame, bool okArg)
 {
     JS_ASSERT_IF(frame.isStackFrame(), frame.asStackFrame() == cx->interpreterFrame());
@@ -162,17 +162,17 @@ js::DebugExceptionUnwind(JSContext *cx, 
       case JSTRAP_THROW:
         cx->setPendingException(rval);
         break;
 
       case JSTRAP_CONTINUE:
         break;
 
       default:
-        JS_NOT_REACHED("Invalid trap status");
+        MOZ_ASSUME_NOT_REACHED("Invalid trap status");
     }
 
     return status;
 }
 
 JS_FRIEND_API(JSBool)
 JS_SetDebugModeForAllCompartments(JSContext *cx, JSBool debug)
 {
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -943,17 +943,17 @@ JS::IncrementalReferenceBarrier(void *pt
         LazyScript::writeBarrierPre(static_cast<LazyScript*>(cell));
     else if (kind == JSTRACE_SHAPE)
         Shape::writeBarrierPre(static_cast<Shape*>(cell));
     else if (kind == JSTRACE_BASE_SHAPE)
         BaseShape::writeBarrierPre(static_cast<BaseShape*>(cell));
     else if (kind == JSTRACE_TYPE_OBJECT)
         types::TypeObject::writeBarrierPre((types::TypeObject *) ptr);
     else
-        JS_NOT_REACHED("invalid trace kind");
+        MOZ_ASSUME_NOT_REACHED("invalid trace kind");
 }
 
 JS_FRIEND_API(void)
 JS::IncrementalValueBarrier(const Value &v)
 {
     js::HeapValue::writeBarrierPre(v);
 }
 
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -138,17 +138,17 @@ fun_getProperty(JSContext *cx, HandleObj
                                              JSMSG_CALLER_IS_STRICT);
                 return false;
             }
         }
 
         return true;
     }
 
-    JS_NOT_REACHED("fun_getProperty");
+    MOZ_ASSUME_NOT_REACHED("fun_getProperty");
     return false;
 }
 
 
 
 /* NB: no sentinels at ends -- use ArrayLength to bound loops.
  * Properties censored into [[ThrowTypeError]] in strict mode. */
 static const uint16_t poisonPillProps[] = {
@@ -1746,12 +1746,12 @@ JSObject::hasIdempotentProtoChain() cons
         if (obj->getOps()->lookupProperty || obj->getOps()->lookupGeneric || obj->getOps()->lookupElement)
             return false;
 
         obj = obj->getProto();
         if (!obj)
             return true;
     }
 
-    JS_NOT_REACHED("Should not get here");
+    MOZ_ASSUME_NOT_REACHED("Should not get here");
     return false;
 }
 
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -454,17 +454,17 @@ FinalizeArenas(FreeOp *fop,
         return FinalizeTypedArenas<JSShortString>(fop, src, dest, thingKind, budget);
       case FINALIZE_EXTERNAL_STRING:
         return FinalizeTypedArenas<JSExternalString>(fop, src, dest, thingKind, budget);
       case FINALIZE_IONCODE:
 #ifdef JS_ION
         return FinalizeTypedArenas<ion::IonCode>(fop, src, dest, thingKind, budget);
 #endif
       default:
-        JS_NOT_REACHED("Invalid alloc kind");
+        MOZ_ASSUME_NOT_REACHED("Invalid alloc kind");
         return true;
     }
 }
 
 static inline Chunk *
 AllocChunk(JSRuntime *rt)
 {
     return static_cast<Chunk *>(MapAlignedPages(rt, ChunkSize, ChunkSize));
@@ -720,17 +720,17 @@ Chunk::findDecommittedArenaOffset()
 {
     /* Note: lastFreeArenaOffset can be past the end of the list. */
     for (unsigned i = info.lastDecommittedArenaOffset; i < ArenasPerChunk; i++)
         if (decommittedArenas.get(i))
             return i;
     for (unsigned i = 0; i < info.lastDecommittedArenaOffset; i++)
         if (decommittedArenas.get(i))
             return i;
-    JS_NOT_REACHED("No decommitted arenas found.");
+    MOZ_ASSUME_NOT_REACHED("No decommitted arenas found.");
     return -1;
 }
 
 ArenaHeader *
 Chunk::fetchNextDecommittedArena()
 {
     JS_ASSERT(info.numArenasFreeCommitted == 0);
     JS_ASSERT(info.numArenasFree > 0);
@@ -2345,17 +2345,17 @@ GCHelperThread::startBackgroundShrink()
       case ALLOCATING:
       case CANCEL_ALLOCATION:
         /*
          * If we have started background allocation there is nothing to
          * shrink.
          */
         break;
       case SHUTDOWN:
-        JS_NOT_REACHED("No shrink on shutdown");
+        MOZ_ASSUME_NOT_REACHED("No shrink on shutdown");
     }
 #endif /* JS_THREADSAFE */
 }
 
 void
 GCHelperThread::waitBackgroundSweepEnd()
 {
     if (!rt->useHelperThreads()) {
@@ -3505,17 +3505,17 @@ RemoveFromGrayList(JSObject *wrapper)
         JSObject *next = obj->getReservedSlot(slot).toObjectOrNull();
         if (next == wrapper) {
             obj->setCrossCompartmentSlot(slot, ObjectOrNullValue(tail));
             return true;
         }
         obj = next;
     }
 
-    JS_NOT_REACHED("object not found in gray link list");
+    MOZ_ASSUME_NOT_REACHED("object not found in gray link list");
     return false;
 }
 
 static void
 ResetGrayList(JSCompartment *comp)
 {
     JSObject *src = comp->gcIncomingGrayPointers;
     while (src)
@@ -4108,17 +4108,17 @@ ResetIncrementalGC(JSRuntime *rt, const 
 
         {
             gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_WAIT_BACKGROUND_THREAD);
             rt->gcHelperThread.waitBackgroundSweepOrAllocEnd();
         }
         break;
 
       default:
-        JS_NOT_REACHED("Invalid incremental GC state");
+        MOZ_ASSUME_NOT_REACHED("Invalid incremental GC state");
     }
 
     rt->gcStats.reset(reason);
 
 #ifdef DEBUG
     for (CompartmentsIter c(rt); !c.done(); c.next())
         JS_ASSERT(!c->gcLiveArrayBuffers);
 
--- a/js/src/jsgcinlines.h
+++ b/js/src/jsgcinlines.h
@@ -146,17 +146,17 @@ GetGCKindSlots(AllocKind thingKind)
         return 8;
       case FINALIZE_OBJECT12:
       case FINALIZE_OBJECT12_BACKGROUND:
         return 12;
       case FINALIZE_OBJECT16:
       case FINALIZE_OBJECT16_BACKGROUND:
         return 16;
       default:
-        JS_NOT_REACHED("Bad object finalize kind");
+        MOZ_ASSUME_NOT_REACHED("Bad object finalize kind");
         return 0;
     }
 }
 
 static inline size_t
 GetGCKindSlots(AllocKind thingKind, Class *clasp)
 {
     size_t nslots = GetGCKindSlots(thingKind);
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -185,17 +185,17 @@ types::TypeString(Type type)
             return "int";
           case JSVAL_TYPE_DOUBLE:
             return "float";
           case JSVAL_TYPE_STRING:
             return "string";
           case JSVAL_TYPE_MAGIC:
             return "lazyargs";
           default:
-            JS_NOT_REACHED("Bad type");
+            MOZ_ASSUME_NOT_REACHED("Bad type");
             return "";
         }
     }
     if (type.isUnknown())
         return "unknown";
     if (type.isAnyObject())
         return " object";
 
--- a/js/src/jsinferinlines.h
+++ b/js/src/jsinferinlines.h
@@ -108,17 +108,17 @@ CompilerOutput::ion() const
 {
 #ifdef JS_ION
     JS_ASSERT(isValid());
     switch (kind()) {
       case Ion: return script->ionScript();
       case ParallelIon: return script->parallelIonScript();
     }
 #endif
-    JS_NOT_REACHED("Invalid kind of CompilerOutput");
+    MOZ_ASSUME_NOT_REACHED("Invalid kind of CompilerOutput");
     return NULL;
 }
 
 inline bool
 CompilerOutput::isValid() const
 {
     if (!script)
         return false;
@@ -218,17 +218,17 @@ PrimitiveTypeFlag(JSValueType type)
         return TYPE_FLAG_INT32;
       case JSVAL_TYPE_DOUBLE:
         return TYPE_FLAG_DOUBLE;
       case JSVAL_TYPE_STRING:
         return TYPE_FLAG_STRING;
       case JSVAL_TYPE_MAGIC:
         return TYPE_FLAG_LAZYARGS;
       default:
-        JS_NOT_REACHED("Bad type");
+        MOZ_ASSUME_NOT_REACHED("Bad type");
         return 0;
     }
 }
 
 inline JSValueType
 TypeFlagPrimitive(TypeFlags flags)
 {
     switch (flags) {
@@ -242,17 +242,17 @@ TypeFlagPrimitive(TypeFlags flags)
         return JSVAL_TYPE_INT32;
       case TYPE_FLAG_DOUBLE:
         return JSVAL_TYPE_DOUBLE;
       case TYPE_FLAG_STRING:
         return JSVAL_TYPE_STRING;
       case TYPE_FLAG_LAZYARGS:
         return JSVAL_TYPE_MAGIC;
       default:
-        JS_NOT_REACHED("Bad type");
+        MOZ_ASSUME_NOT_REACHED("Bad type");
         return (JSValueType) 0;
     }
 }
 
 /*
  * Get the canonical representation of an id to use when doing inference.  This
  * maintains the constraint that if two different jsids map to the same property
  * in JS (e.g. 3 and "3"), they have the same type representation.
@@ -493,17 +493,17 @@ GetClassForProtoKey(JSProtoKey key)
 
       case JSProto_DataView:
         return &DataViewObject::class_;
 
       case JSProto_ParallelArray:
         return &ParallelArrayObject::class_;
 
       default:
-        JS_NOT_REACHED("Bad proto key");
+        MOZ_ASSUME_NOT_REACHED("Bad proto key");
         return NULL;
     }
 }
 
 /*
  * Get the default 'new' object for a given standard class, per the currently
  * active global.
  */
@@ -1586,17 +1586,17 @@ TypeObject::getProperty(JSContext *cx, j
              * type and are treated as configured.
              */
             unsigned count = getPropertyCount();
             for (unsigned i = 0; i < count; i++) {
                 if (Property *prop = getProperty(i))
                     return &prop->types;
             }
 
-            JS_NOT_REACHED("Missing property");
+            MOZ_ASSUME_NOT_REACHED("Missing property");
             return NULL;
         }
     }
 
     HeapTypeSet *types = &(*pprop)->types;
     if (own)
         types->setOwnProperty(cx, false);
 
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -1261,17 +1261,17 @@ ObjectClassIs(HandleObject obj, ESClassV
       case ESClass_Array: return obj->is<ArrayObject>();
       case ESClass_Number: return obj->is<NumberObject>();
       case ESClass_String: return obj->is<StringObject>();
       case ESClass_Boolean: return obj->is<BooleanObject>();
       case ESClass_RegExp: return obj->is<RegExpObject>();
       case ESClass_ArrayBuffer: return obj->is<ArrayBufferObject>();
       case ESClass_Date: return obj->is<DateObject>();
     }
-    JS_NOT_REACHED("bad classValue");
+    MOZ_ASSUME_NOT_REACHED("bad classValue");
     return false;
 }
 
 inline bool
 IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx)
 {
     if (!v.isObject())
         return false;
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -112,17 +112,17 @@ js_GetVariableBytecodeLength(jsbytecode 
         pc += JUMP_OFFSET_LEN;
         int32_t low = GET_JUMP_OFFSET(pc);
         pc += JUMP_OFFSET_LEN;
         int32_t high = GET_JUMP_OFFSET(pc);
         unsigned ncases = unsigned(high - low + 1);
         return 1 + 3 * JUMP_OFFSET_LEN + ncases * JUMP_OFFSET_LEN;
       }
       default:
-        JS_NOT_REACHED("Unexpected op");
+        MOZ_ASSUME_NOT_REACHED("Unexpected op");
         return 0;
     }
 }
 
 static uint32_t
 NumBlockSlots(JSScript *script, jsbytecode *pc)
 {
     JS_ASSERT(*pc == JSOP_ENTERBLOCK || *pc == JSOP_ENTERLET0 || *pc == JSOP_ENTERLET1);
@@ -245,24 +245,24 @@ PCCounts::countName(JSOp op, size_t whic
 
     if (accessOp(op)) {
         if (which < ACCESS_LIMIT)
             return countAccessNames[which - BASE_LIMIT];
         if (elementOp(op))
             return countElementNames[which - ACCESS_LIMIT];
         if (propertyOp(op))
             return countPropertyNames[which - ACCESS_LIMIT];
-        JS_NOT_REACHED("bad op");
+        MOZ_ASSUME_NOT_REACHED("bad op");
         return NULL;
     }
 
     if (arithOp(op))
         return countArithNames[which - BASE_LIMIT];
 
-    JS_NOT_REACHED("bad op");
+    MOZ_ASSUME_NOT_REACHED("bad op");
     return NULL;
 }
 
 #ifdef DEBUG
 
 #ifdef JS_ION
 void
 js::DumpIonScriptCounts(Sprinter *sp, ion::IonScriptCounts *ionCounts)
@@ -2161,21 +2161,21 @@ js::GetPCCountScriptSummary(JSContext *c
             } else if (PCCounts::accessOp(op)) {
                 if (j < PCCounts::ACCESS_LIMIT)
                     accessTotals[j - PCCounts::BASE_LIMIT] += value;
                 else if (PCCounts::elementOp(op))
                     elementTotals[j - PCCounts::ACCESS_LIMIT] += value;
                 else if (PCCounts::propertyOp(op))
                     propertyTotals[j - PCCounts::ACCESS_LIMIT] += value;
                 else
-                    JS_NOT_REACHED("Bad opcode");
+                    MOZ_ASSUME_NOT_REACHED("Bad opcode");
             } else if (PCCounts::arithOp(op)) {
                 arithTotals[j - PCCounts::BASE_LIMIT] += value;
             } else {
-                JS_NOT_REACHED("Bad opcode");
+                MOZ_ASSUME_NOT_REACHED("Bad opcode");
             }
         }
     }
 
     AppendJSONProperty(buf, "totals");
     buf.append('{');
 
     MaybeComma comma = NO_COMMA;
--- a/js/src/jsopcode.h
+++ b/js/src/jsopcode.h
@@ -510,17 +510,17 @@ GetBytecodeInteger(jsbytecode *pc)
     switch (JSOp(*pc)) {
       case JSOP_ZERO:   return 0;
       case JSOP_ONE:    return 1;
       case JSOP_UINT16: return GET_UINT16(pc);
       case JSOP_UINT24: return GET_UINT24(pc);
       case JSOP_INT8:   return GET_INT8(pc);
       case JSOP_INT32:  return GET_INT32(pc);
       default:
-        JS_NOT_REACHED("Bad op");
+        MOZ_ASSUME_NOT_REACHED("Bad op");
         return 0;
     }
 }
 
 /*
  * Counts accumulated for a single opcode in a script. The counts tracked vary
  * between opcodes, and this structure ensures that counts are accessed in a
  * coherent fashion.
--- a/js/src/jsproxy.cpp
+++ b/js/src/jsproxy.cpp
@@ -304,46 +304,42 @@ BaseProxyHandler::iterate(JSContext *cx,
     }
 
     return EnumeratedIdVectorToIterator(cx, proxy, flags, props, vp);
 }
 
 bool
 BaseProxyHandler::call(JSContext *cx, HandleObject proxy, const CallArgs &args)
 {
-    JS_NOT_REACHED("callable proxies should implement call trap");
-    return false;
+    MOZ_NOT_REACHED("callable proxies should implement call trap");
 }
 
 bool
 BaseProxyHandler::construct(JSContext *cx, HandleObject proxy, const CallArgs &args)
 {
-    JS_NOT_REACHED("callable proxies should implement construct trap");
-    return false;
+    MOZ_NOT_REACHED("callable proxies should implement construct trap");
 }
 
 const char *
 BaseProxyHandler::className(JSContext *cx, HandleObject proxy)
 {
     return IsFunctionProxy(proxy) ? "Function" : "Object";
 }
 
 JSString *
 BaseProxyHandler::fun_toString(JSContext *cx, HandleObject proxy, unsigned indent)
 {
-    JS_NOT_REACHED("callable proxies should implement fun_toString trap");
-    return NULL;
+    MOZ_NOT_REACHED("callable proxies should implement fun_toString trap");
 }
 
 bool
 BaseProxyHandler::regexp_toShared(JSContext *cx, HandleObject proxy,
                                   RegExpGuard *g)
 {
-    JS_NOT_REACHED("This should have been a wrapped regexp");
-    return false;
+    MOZ_NOT_REACHED("This should have been a wrapped regexp");
 }
 
 bool
 BaseProxyHandler::defaultValue(JSContext *cx, HandleObject proxy, JSType hint,
                                MutableHandleValue vp)
 {
     return DefaultValue(cx, proxy, hint, vp);
 }
--- a/js/src/jsreflect.cpp
+++ b/js/src/jsreflect.cpp
@@ -109,17 +109,17 @@ typedef AutoValueVector NodeVector;
         if (!(expr)) {                                                                 \
             JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_PARSE_NODE);  \
             return false;                                                              \
         }                                                                              \
     JS_END_MACRO
 
 #define LOCAL_NOT_REACHED(expr)                                                        \
     JS_BEGIN_MACRO                                                                     \
-        JS_NOT_REACHED(expr);                                                          \
+        MOZ_ASSUME_NOT_REACHED(expr);                                                          \
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_PARSE_NODE);      \
         return false;                                                                  \
     JS_END_MACRO
 
 /*
  * Builder class that constructs JavaScript AST node objects. See:
  *
  *     https://developer.mozilla.org/en/SpiderMonkey/Parser_API
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -375,17 +375,17 @@ FindBlockIndex(JSScript *script, StaticB
     ObjectArray *objects = script->objects();
     HeapPtrObject *vector = objects->vector;
     unsigned length = objects->length;
     for (unsigned i = 0; i < length; ++i) {
         if (vector[i] == &block)
             return i;
     }
 
-    JS_NOT_REACHED("Block not found");
+    MOZ_ASSUME_NOT_REACHED("Block not found");
     return UINT32_MAX;
 }
 
 template<XDRMode mode>
 bool
 js::XDRScript(XDRState<mode> *xdr, HandleObject enclosingScope, HandleScript enclosingScript,
               HandleFunction fun, MutableHandleScript scriptp)
 {
--- a/js/src/jstypedarray.cpp
+++ b/js/src/jstypedarray.cpp
@@ -2447,18 +2447,17 @@ class TypedArrayTemplate
           }
           case TypedArray::TYPE_FLOAT64: {
             double *src = static_cast<double*>(viewData(tarray));
             for (unsigned i = 0; i < srclen; ++i)
                 *dest++ = NativeType(*src++);
             break;
           }
           default:
-            JS_NOT_REACHED("copyFrom with a TypedArray of unknown type");
-            break;
+            MOZ_NOT_REACHED("copyFrom with a TypedArray of unknown type");
         }
 
         return true;
     }
 
     static bool
     copyFromWithOverlap(JSContext *cx, JSObject *self, JSObject *tarray, uint32_t offset)
     {
@@ -2525,17 +2524,17 @@ class TypedArrayTemplate
           }
           case TypedArray::TYPE_FLOAT64: {
             double *src = (double*) srcbuf;
             for (unsigned i = 0; i < length(tarray); ++i)
                 *dest++ = NativeType(*src++);
             break;
           }
           default:
-            JS_NOT_REACHED("copyFromWithOverlap with a TypedArray of unknown type");
+            MOZ_ASSUME_NOT_REACHED("copyFromWithOverlap with a TypedArray of unknown type");
             break;
         }
 
         js_free(srcbuf);
         return true;
     }
 
     static JSObject *
@@ -3869,17 +3868,17 @@ js::IsTypedArrayConstructor(const Value 
         return IsNativeFunction(v, Uint32Array::class_constructor);
       case TypedArray::TYPE_FLOAT32:
         return IsNativeFunction(v, Float32Array::class_constructor);
       case TypedArray::TYPE_FLOAT64:
         return IsNativeFunction(v, Float64Array::class_constructor);
       case TypedArray::TYPE_UINT8_CLAMPED:
         return IsNativeFunction(v, Uint8ClampedArray::class_constructor);
     }
-    JS_NOT_REACHED("unexpected typed array type");
+    MOZ_ASSUME_NOT_REACHED("unexpected typed array type");
     return false;
 }
 
 bool
 js::IsTypedArrayBuffer(const Value &v)
 {
     return v.isObject() && v.toObject().is<ArrayBufferObject>();
 }
@@ -4027,17 +4026,17 @@ JS_GetArrayBufferViewType(JSObject *obj)
     obj = CheckedUnwrap(obj);
     if (!obj)
         return ArrayBufferView::TYPE_MAX;
 
     if (obj->isTypedArray())
         return static_cast<JSArrayBufferViewType>(TypedArray::type(obj));
     else if (obj->is<DataViewObject>())
         return ArrayBufferView::TYPE_DATAVIEW;
-    JS_NOT_REACHED("invalid ArrayBufferView type");
+    MOZ_ASSUME_NOT_REACHED("invalid ArrayBufferView type");
     return ArrayBufferView::TYPE_MAX;
 }
 
 JS_FRIEND_API(int8_t *)
 JS_GetInt8ArrayData(JSObject *obj)
 {
     obj = CheckedUnwrap(obj);
     if (!obj)
--- a/js/src/jstypedarray.h
+++ b/js/src/jstypedarray.h
@@ -332,17 +332,17 @@ TypedArrayShift(ArrayBufferView::ViewTyp
       case ArrayBufferView::TYPE_INT32:
       case ArrayBufferView::TYPE_UINT32:
       case ArrayBufferView::TYPE_FLOAT32:
         return 2;
       case ArrayBufferView::TYPE_FLOAT64:
         return 3;
       default:;
     }
-    JS_NOT_REACHED("Unexpected array type");
+    MOZ_ASSUME_NOT_REACHED("Unexpected array type");
     return 0;
 }
 
 class DataViewObject : public JSObject, public BufferView
 {
 public:
     static Class class_;
 
--- a/js/src/jstypedarrayinlines.h
+++ b/js/src/jstypedarrayinlines.h
@@ -151,17 +151,17 @@ TypedArray::slotWidth(int atype) {
         return 2;
     case js::TypedArray::TYPE_INT32:
     case js::TypedArray::TYPE_UINT32:
     case js::TypedArray::TYPE_FLOAT32:
         return 4;
     case js::TypedArray::TYPE_FLOAT64:
         return 8;
     default:
-        JS_NOT_REACHED("invalid typed array type");
+        MOZ_ASSUME_NOT_REACHED("invalid typed array type");
         return 0;
     }
 }
 
 inline int
 TypedArray::slotWidth(JSObject *obj) {
     return slotWidth(type(obj));
 }
--- a/js/src/jsworkers.cpp
+++ b/js/src/jsworkers.cpp
@@ -439,25 +439,23 @@ WorkerThread::threadLoop()
     }
 }
 
 #else /* JS_PARALLEL_COMPILATION */
 
 bool
 js::StartOffThreadAsmJSCompile(JSContext *cx, AsmJSParallelTask *asmData)
 {
-    JS_NOT_REACHED("Off thread compilation not available in non-THREADSAFE builds");
-    return false;
+    MOZ_NOT_REACHED("Off thread compilation not available in non-THREADSAFE builds");
 }
 
 bool
 js::StartOffThreadIonCompile(JSContext *cx, ion::IonBuilder *builder)
 {
-    JS_NOT_REACHED("Off thread compilation not available in non-THREADSAFE builds");
-    return false;
+    MOZ_NOT_REACHED("Off thread compilation not available in non-THREADSAFE builds");
 }
 
 void
 js::CancelOffThreadIonCompile(JSCompartment *compartment, JSScript *script)
 {
 }
 
 #endif /* JS_PARALLEL_COMPILATION */
--- a/js/src/shell/jsoptparse.cpp
+++ b/js/src/shell/jsoptparse.cpp
@@ -130,17 +130,17 @@ PrintParagraph(const char *text, unsigne
             /* Could also have line-leading spaces. */
             while (*it == ' ') {
                 putchar(' ');
                 ++colno;
                 ++it;
             }
             break;
           default:
-            JS_NOT_REACHED("unhandled token splitting character in text");
+            MOZ_ASSUME_NOT_REACHED("unhandled token splitting character in text");
         }
     }
 }
 
 static const char *
 OptionFlagsToFormatInfo(char shortflag, bool isValued, size_t *length)
 {
     static const char * const fmt[4] = { "  -%c --%s ",
@@ -304,17 +304,17 @@ OptionParser::handleOption(Option *opt, 
       {
         char *value = NULL;
         if (Result r = extractValue(argc, argv, i, &value))
             return r;
         StringArg arg(value, *i);
         return opt->asMultiStringOption()->strings.append(arg) ? Okay : Fail;
       }
       default:
-        JS_NOT_REACHED("unhandled option kind");
+        MOZ_ASSUME_NOT_REACHED("unhandled option kind");
         return Fail;
     }
 }
 
 OptionParser::Result
 OptionParser::handleArg(size_t argc, char **argv, size_t *i, bool *optionsAllowed)
 {
     if (nextArgument >= arguments.length())
@@ -332,17 +332,17 @@ OptionParser::handleArg(size_t argc, cha
         return Okay;
       case OptionKindMultiString:
       {
         /* Don't advance the next argument -- there can only be one (final) variadic argument. */
         StringArg value(argv[*i], *i);
         return arg->asMultiStringOption()->strings.append(value) ? Okay : Fail;
       }
       default:
-        JS_NOT_REACHED("unhandled argument kind");
+        MOZ_ASSUME_NOT_REACHED("unhandled argument kind");
         return Fail;
     }
 }
 
 OptionParser::Result
 OptionParser::parseArgs(int inputArgc, char **argv)
 {
     JS_ASSERT(inputArgc >= 0);
--- a/js/src/tests/js1_8_1/regress/regress-452498-053.js
+++ b/js/src/tests/js1_8_1/regress/regress-452498-053.js
@@ -28,17 +28,17 @@ function test()
 // at ../jsobj.cpp:5559
 // On the last line of BindLet, we have
 //    JS_SetReservedSlot(cx, blockObj, index, PRIVATE_TO_JSVAL(pn));
 // but this uses reserved slots as though they were unlimited.
 // blockObj only has 2.
   let (a=0, b=1, c=2) {}
 
 // In RecycleTree at ../jsparse.cpp:315, we hit
-//     JS_NOT_REACHED("RecycleUseDefKids");
+//     MOZ_ASSUME_NOT_REACHED("RecycleUseDefKids");
 // pn->pn_type is TOK_UNARYOP
 // pn->pn_op   is JSOP_XMLNAME
 // pn->pn_defn is 1
 // pn->pn_used is 1
   try
   {
     true; 0;
   }
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -626,17 +626,17 @@ Debugger::slowPathOnLeaveFrame(JSContext
         cx->setPendingException(value);
         return false;
 
       case JSTRAP_ERROR:
         JS_ASSERT(!cx->isExceptionPending());
         return false;
 
       default:
-        JS_NOT_REACHED("bad final trap status");
+        MOZ_ASSUME_NOT_REACHED("bad final trap status");
     }
 }
 
 bool
 Debugger::wrapEnvironment(JSContext *cx, Handle<Env*> env, MutableHandleValue rval)
 {
     if (!env) {
         rval.setNull();
@@ -824,17 +824,17 @@ Debugger::newCompletionValue(JSContext *
         key = NameToId(cx->names().throw_);
         break;
 
       case JSTRAP_ERROR:
         result.setNull();
         return true;
 
       default:
-        JS_NOT_REACHED("bad status passed to Debugger::newCompletionValue");
+        MOZ_ASSUME_NOT_REACHED("bad status passed to Debugger::newCompletionValue");
     }
 
     /* Common tail for JSTRAP_RETURN and JSTRAP_THROW. */
     RootedObject obj(cx, NewBuiltinClassInstance(cx, &ObjectClass));
     if (!obj ||
         !wrapDebuggeeValue(cx, &value) ||
         !DefineNativeProperty(cx, obj, key, value, JS_PropertyStub, JS_StrictPropertyStub,
                               JSPROP_ENUMERATE, 0, 0))
@@ -1360,17 +1360,17 @@ Debugger::slowPathOnNewGlobalObject(JSCo
         JS_ASSERT(!cx->isExceptionPending());
         return false;
 
       case JSTRAP_THROW:
         cx->setPendingException(value);
         return false;
 
       default:
-        JS_NOT_REACHED("bad status from Debugger::fireNewGlobalObject");
+        MOZ_ASSUME_NOT_REACHED("bad status from Debugger::fireNewGlobalObject");
     }
 }
 
 
 /*** Debugger JSObjects **************************************************************************/
 
 void
 Debugger::markKeysInCompartment(JSTracer *tracer)
--- a/js/src/vm/ForkJoin.cpp
+++ b/js/src/vm/ForkJoin.cpp
@@ -77,52 +77,51 @@ bool
 ForkJoinSlice::InitializeTLS()
 {
     return true;
 }
 
 JSRuntime *
 ForkJoinSlice::runtime()
 {
-    JS_NOT_REACHED("Not THREADSAFE build");
+    MOZ_NOT_REACHED("Not THREADSAFE build");
 }
 
 bool
 ForkJoinSlice::check()
 {
-    JS_NOT_REACHED("Not THREADSAFE build");
-    return true;
+    MOZ_NOT_REACHED("Not THREADSAFE build");
 }
 
 void
 ForkJoinSlice::requestGC(JS::gcreason::Reason reason)
 {
-    JS_NOT_REACHED("Not THREADSAFE build");
+    MOZ_NOT_REACHED("Not THREADSAFE build");
 }
 
 void
 ForkJoinSlice::requestZoneGC(JS::Zone *zone, JS::gcreason::Reason reason)
 {
-    JS_NOT_REACHED("Not THREADSAFE build");
+    MOZ_NOT_REACHED("Not THREADSAFE build");
 }
 
 void
 ParallelBailoutRecord::setCause(ParallelBailoutCause cause,
                                 JSScript *outermostScript,
                                 JSScript *currentScript,
                                 jsbytecode *currentPc)
 {
-    JS_NOT_REACHED("Not THREADSAFE build");
+    MOZ_NOT_REACHED("Not THREADSAFE build");
 }
 
 void
 ParallelBailoutRecord::addTrace(JSScript *script,
                                 jsbytecode *pc)
 {
-    JS_NOT_REACHED("Not THREADSAFE build");
+    MOZ_NOT_REACHED("Not THREADSAFE build");
 }
 
 bool
 js::InSequentialOrExclusiveParallelSection()
 {
     return true;
 }
 
@@ -595,17 +594,17 @@ js::ParallelDo::apply()
         // compiled scripts were collected.
         if (ParallelTestsShouldPass(cx_) && worklist_.length() != 0) {
             JS_ReportError(cx_, "ForkJoin: compilation required in par or bailout mode");
             return ExecutionFatal;
         }
         break;
 
       case NumForkJoinModes:
-        JS_NOT_REACHED("Invalid mode");
+        MOZ_ASSUME_NOT_REACHED("Invalid mode");
     }
 
     while (bailouts < MAX_BAILOUTS) {
         for (uint32_t i = 0; i < slices; i++)
             bailoutRecords_[i].reset(cx_);
 
         if (compileForParallelExecution(&status) == RedLight)
             return SpewEndOp(status);
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -1223,17 +1223,17 @@ Interpret(JSContext *cx, RunState &state
             break;
           case JSTRAP_RETURN:
             interpReturnOK = true;
             goto forced_return;
           case JSTRAP_THROW:
           case JSTRAP_ERROR:
             goto error;
           default:
-            JS_NOT_REACHED("bad ScriptDebugPrologue status");
+            MOZ_ASSUME_NOT_REACHED("bad ScriptDebugPrologue status");
         }
     }
 
     /*
      * It is important that "op" be initialized before calling DO_OP because
      * it is possible for "op" to be specially assigned during the normal
      * processing of an opcode while looping. We rely on DO_NEXT_OP to manage
      * "op" correctly in all other cases.
@@ -2355,17 +2355,17 @@ BEGIN_CASE(JSOP_FUNCALL)
             break;
           case JSTRAP_RETURN:
             interpReturnOK = true;
             goto forced_return;
           case JSTRAP_THROW:
           case JSTRAP_ERROR:
             goto error;
           default:
-            JS_NOT_REACHED("bad ScriptDebugPrologue status");
+            MOZ_ASSUME_NOT_REACHED("bad ScriptDebugPrologue status");
         }
     }
 
     /* Load first op and dispatch it (safe since JSOP_STOP). */
     op = (JSOp) *regs.pc;
     DO_OP();
 }
 
@@ -3117,17 +3117,17 @@ END_CASE(JSOP_ARRAYPUSH)
               case JSTRAP_THROW:
                 break;
 
               case JSTRAP_RETURN:
                 interpReturnOK = true;
                 goto forced_return;
 
               default:
-                JS_NOT_REACHED("Invalid trap status");
+                MOZ_ASSUME_NOT_REACHED("Invalid trap status");
             }
         }
 
         for (TryNoteIter tni(cx, regs); !tni.done(); ++tni) {
             JSTryNote *tn = *tni;
 
             UnwindScope(cx, regs.fp(), tn->stackDepth);
 
--- a/js/src/vm/ObjectImpl.cpp
+++ b/js/src/vm/ObjectImpl.cpp
@@ -382,17 +382,16 @@ DenseElementsHeader::getOwnElement(JSCon
 
 bool
 SparseElementsHeader::getOwnElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index,
                                     unsigned resolveFlags, PropDesc *desc)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
-    return false;
 }
 
 template<typename T>
 static Value
 ElementToValue(const T &t)
 {
     return NumberValue(t);
 }
@@ -423,28 +422,26 @@ TypedElementsHeader<T>::getOwnElement(JS
 
 bool
 ArrayBufferElementsHeader::getOwnElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index,
                                          unsigned resolveFlags, PropDesc *desc)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
-    return false;
 }
 
 bool
 SparseElementsHeader::defineElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index,
                                     const PropDesc &desc, bool shouldThrow, unsigned resolveFlags,
                                     bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
-    return false;
 }
 
 bool
 DenseElementsHeader::defineElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index,
                                    const PropDesc &desc, bool shouldThrow, unsigned resolveFlags,
                                    bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
@@ -564,17 +561,17 @@ js::GetOwnProperty(JSContext *cx, Handle
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
 
     JS_CHECK_RECURSION(cx, return false);
 
     Rooted<PropertyId> pid(cx, pid_);
 
     if (static_cast<JSObject *>(obj.get())->isProxy()) {
-        MOZ_NOT_REACHED("NYI: proxy [[GetOwnProperty]]");
+        MOZ_ASSUME_NOT_REACHED("NYI: proxy [[GetOwnProperty]]");
         return false;
     }
 
     RootedShape shape(cx, obj->nativeLookup(cx, pid));
     if (!shape) {
         /* Not found: attempt to resolve it. */
         Class *clasp = obj->getClass();
         JSResolveOp resolve = clasp->resolve;
@@ -607,17 +604,17 @@ js::GetOwnProperty(JSContext *cx, Handle
     }
 
     if (shape->isAccessorDescriptor()) {
         *desc = PropDesc(shape->getterValue(), shape->setterValue(),
                          shape->enumerability(), shape->configurability());
         return true;
     }
 
-    MOZ_NOT_REACHED("NYI: PropertyOp-based properties");
+    MOZ_ASSUME_NOT_REACHED("NYI: PropertyOp-based properties");
     return false;
 }
 
 bool
 js::GetOwnElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index, unsigned resolveFlags,
                   PropDesc *desc)
 {
     ElementsHeader &header = obj->elementsHeader();
@@ -643,17 +640,17 @@ js::GetOwnElement(JSContext *cx, Handle<
       case Float32Elements:
         return header.asFloat32Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case Float64Elements:
         return header.asFloat64Elements().getOwnElement(cx, obj, index, resolveFlags, desc);
       case ArrayBufferElements:
         return header.asArrayBufferElements().getOwnElement(cx, obj, index, resolveFlags, desc);
     }
 
-    MOZ_NOT_REACHED("bad elements kind!");
+    MOZ_ASSUME_NOT_REACHED("bad elements kind!");
     return false;
 }
 
 bool
 js::GetProperty(JSContext *cx, Handle<ObjectImpl*> obj, Handle<ObjectImpl*> receiver,
                 Handle<PropertyId> pid, unsigned resolveFlags, MutableHandle<Value> vp)
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
@@ -661,17 +658,17 @@ js::GetProperty(JSContext *cx, Handle<Ob
     MOZ_ASSERT(receiver);
 
     Rooted<ObjectImpl*> current(cx, obj);
 
     do {
         MOZ_ASSERT(obj);
 
         if (Downcast(current)->isProxy()) {
-            MOZ_NOT_REACHED("NYI: proxy [[GetP]]");
+            MOZ_ASSUME_NOT_REACHED("NYI: proxy [[GetP]]");
             return false;
         }
 
         AutoPropDescRooter desc(cx);
         if (!GetOwnProperty(cx, current, pid, resolveFlags, &desc.getPropDesc()))
             return false;
 
         /* No property?  Recur or bottom out. */
@@ -706,38 +703,38 @@ js::GetProperty(JSContext *cx, Handle<Ob
             args.setThis(ObjectValue(*receiver));
 
             bool ok = Invoke(cx, args);
             vp.set(args.rval());
             return ok;
         }
 
         /* Otherwise it's a PropertyOp-based property.  XXX handle this! */
-        MOZ_NOT_REACHED("NYI: handle PropertyOp'd properties here");
+        MOZ_ASSUME_NOT_REACHED("NYI: handle PropertyOp'd properties here");
         return false;
     } while (false);
 
-    MOZ_NOT_REACHED("buggy control flow");
+    MOZ_ASSUME_NOT_REACHED("buggy control flow");
     return false;
 }
 
 bool
 js::GetElement(JSContext *cx, Handle<ObjectImpl*> obj, Handle<ObjectImpl*> receiver, uint32_t index,
                unsigned resolveFlags, Value *vp)
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
 
     Rooted<ObjectImpl*> current(cx, obj);
 
     RootedValue getter(cx);
     do {
         MOZ_ASSERT(current);
 
         if (Downcast(current)->isProxy()) {
-            MOZ_NOT_REACHED("NYI: proxy [[GetP]]");
+            MOZ_ASSUME_NOT_REACHED("NYI: proxy [[GetP]]");
             return false;
         }
 
         PropDesc desc;
         if (!GetOwnElement(cx, current, index, resolveFlags, &desc))
             return false;
 
         /* No property?  Recur or bottom out. */
@@ -773,37 +770,37 @@ js::GetElement(JSContext *cx, Handle<Obj
             args.setThis(ObjectValue(*current));
 
             bool ok = Invoke(cx, args);
             *vp = args.rval();
             return ok;
         }
 
         /* Otherwise it's a PropertyOp-based property.  XXX handle this! */
-        MOZ_NOT_REACHED("NYI: handle PropertyOp'd properties here");
+        MOZ_ASSUME_NOT_REACHED("NYI: handle PropertyOp'd properties here");
         return false;
     } while (false);
 
-    MOZ_NOT_REACHED("buggy control flow");
+    MOZ_ASSUME_NOT_REACHED("buggy control flow");
     return false;
 }
 
 bool
 js::HasElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index, unsigned resolveFlags,
                bool *found)
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
 
     Rooted<ObjectImpl*> current(cx, obj);
 
     do {
         MOZ_ASSERT(current);
 
         if (Downcast(current)->isProxy()) {
-            MOZ_NOT_REACHED("NYI: proxy [[HasProperty]]");
+            MOZ_ASSUME_NOT_REACHED("NYI: proxy [[HasProperty]]");
             return false;
         }
 
         PropDesc prop;
         if (!GetOwnElement(cx, current, index, resolveFlags, &prop))
             return false;
 
         if (!prop.isUndefined()) {
@@ -814,17 +811,17 @@ js::HasElement(JSContext *cx, Handle<Obj
         current = current->getProto();
         if (current)
             continue;
 
         *found = false;
         return true;
     } while (false);
 
-    MOZ_NOT_REACHED("buggy control flow");
+    MOZ_ASSUME_NOT_REACHED("buggy control flow");
     return false;
 }
 
 bool
 js::DefineElement(JSContext *cx, Handle<ObjectImpl*> obj, uint32_t index, const PropDesc &desc,
                   bool shouldThrow, unsigned resolveFlags, bool *succeeded)
 {
     NEW_OBJECT_REPRESENTATION_ONLY();
@@ -866,39 +863,36 @@ js::DefineElement(JSContext *cx, Handle<
         return header.asFloat64Elements().defineElement(cx, obj, index, desc, shouldThrow,
                                                         resolveFlags, succeeded);
       case ArrayBufferElements:
         return header.asArrayBufferElements().defineElement(cx, obj, index, desc, shouldThrow,
                                                             resolveFlags, succeeded);
     }
 
     MOZ_NOT_REACHED("bad elements kind!");
-    return false;
 }
 
 bool
 SparseElementsHeader::setElement(JSContext *cx, Handle<ObjectImpl*> obj,
                                  Handle<ObjectImpl*> receiver, uint32_t index, const Value &v,
                                  unsigned resolveFlags, bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
-    return false;
 }
 
 bool
 DenseElementsHeader::setElement(JSContext *cx, Handle<ObjectImpl*> obj,
                                 Handle<ObjectImpl*> receiver, uint32_t index, const Value &v,
                                 unsigned resolveFlags, bool *succeeded)
 {
     MOZ_ASSERT(this == &obj->elementsHeader());
 
     MOZ_NOT_REACHED("NYI");
-    return false;
 }
 
 template <typename T>
 bool
 TypedElementsHeader<T>::setElement(JSContext *cx, Handle<ObjectImpl*> obj,
                                    Handle<ObjectImpl*> receiver, uint32_t index, const Value &v,
                                    unsigned resolveFlags, bool *succeeded)
 {
@@ -962,17 +956,17 @@ js::SetElement(JSContext *cx, Handle<Obj
     RootedValue setter(cx);
 
     MOZ_ASSERT(receiver);
 
     do {
         MOZ_ASSERT(current);
 
         if (Downcast(current)->isProxy()) {
-            MOZ_NOT_REACHED("NYI: proxy [[SetP]]");
+            MOZ_ASSUME_NOT_REACHED("NYI: proxy [[SetP]]");
             return false;
         }
 
         PropDesc ownDesc;
         if (!GetOwnElement(cx, current, index, resolveFlags, &ownDesc))
             return false;
 
         if (!ownDesc.isUndefined()) {
@@ -1007,29 +1001,29 @@ js::SetElement(JSContext *cx, Handle<Obj
                 args.setCallee(setter);
                 args.setThis(ObjectValue(*current));
                 args[0] = v;
 
                 *succeeded = true;
                 return Invoke(cx, args);
             }
 
-            MOZ_NOT_REACHED("NYI: setting PropertyOp-based property");
+            MOZ_ASSUME_NOT_REACHED("NYI: setting PropertyOp-based property");
             return false;
         }
 
         current = current->getProto();
         if (current)
             continue;
 
         PropDesc newDesc(v, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable);
         return DefineElement(cx, receiver, index, newDesc, false, resolveFlags, succeeded);
     } while (false);
 
-    MOZ_NOT_REACHED("buggy control flow");
+    MOZ_ASSUME_NOT_REACHED("buggy control flow");
     return false;
 }
 
 void
 AutoPropDescRooter::trace(JSTracer *trc)
 {
     gc::MarkValueRoot(trc, &propDesc.pd_, "AutoPropDescRooter pd");
     gc::MarkValueRoot(trc, &propDesc.value_, "AutoPropDescRooter value");
--- a/js/src/vm/ObjectImpl.h
+++ b/js/src/vm/ObjectImpl.h
@@ -1266,17 +1266,17 @@ class ObjectImpl : public gc::Cell
     uint32_t getDenseCapacity() {
         JS_ASSERT(uninlinedIsNative());
         return getElementsHeader()->capacity;
     }
 
     bool makeElementsSparse(JSContext *cx) {
         NEW_OBJECT_REPRESENTATION_ONLY();
 
-        MOZ_NOT_REACHED("NYI");
+        MOZ_ASSUME_NOT_REACHED("NYI");
         return false;
     }
 
     inline bool isProxy() const;
 
   protected:
 #ifdef DEBUG
     void checkShapeConsistency();
@@ -1395,17 +1395,17 @@ class ObjectImpl : public gc::Cell
         Succeeded
     };
 
     DenseElementsResult ensureDenseElementsInitialized(JSContext *cx, uint32_t index,
                                                        uint32_t extra)
     {
         NEW_OBJECT_REPRESENTATION_ONLY();
 
-        MOZ_NOT_REACHED("NYI");
+        MOZ_ASSUME_NOT_REACHED("NYI");
         return Failure;
     }
 
     /*
      * These functions are currently public for simplicity; in the long run
      * it may make sense to make at least some of them private.
      */
 
--- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp
@@ -399,17 +399,17 @@ RegExpShared::~RegExpShared()
         js_delete<BytecodePattern>(bytecode);
 }
 
 void
 RegExpShared::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
 {
     switch (error) {
       case JSC::Yarr::NoError:
-        JS_NOT_REACHED("Called reportYarrError with value for no error");
+        MOZ_ASSUME_NOT_REACHED("Called reportYarrError with value for no error");
         return;
 #define COMPILE_EMSG(__code, __msg)                                                              \
       case JSC::Yarr::__code:                                                                    \
         if (ts)                                                                                  \
             ts->reportError(__msg);                                                              \
         else                                                                                     \
             JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, __msg); \
         return
@@ -421,17 +421,17 @@ RegExpShared::reportYarrError(JSContext 
       COMPILE_EMSG(ParenthesesTypeInvalid, JSMSG_BAD_QUANTIFIER); /* "(?" with bad next char */
       COMPILE_EMSG(CharacterClassUnmatched, JSMSG_BAD_CLASS_RANGE);
       COMPILE_EMSG(CharacterClassInvalidRange, JSMSG_BAD_CLASS_RANGE);
       COMPILE_EMSG(CharacterClassOutOfOrder, JSMSG_BAD_CLASS_RANGE);
       COMPILE_EMSG(QuantifierTooLarge, JSMSG_BAD_QUANTIFIER);
       COMPILE_EMSG(EscapeUnterminated, JSMSG_TRAILING_SLASH);
 #undef COMPILE_EMSG
       default:
-        JS_NOT_REACHED("Unknown Yarr error code");
+        MOZ_ASSUME_NOT_REACHED("Unknown Yarr error code");
     }
 }
 
 bool
 RegExpShared::checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source)
 {
     ErrorCode error = JSC::Yarr::checkSyntax(*source);
     if (error == JSC::Yarr::NoError)
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -2109,17 +2109,17 @@ GetDebugScopeForMissing(JSContext *cx, c
         if (!block)
             return NULL;
 
         debugScope = DebugScopeObject::create(cx, *block, enclosingDebug);
         break;
       }
       case ScopeIter::With:
       case ScopeIter::StrictEvalScope:
-        JS_NOT_REACHED("should already have a scope");
+        MOZ_ASSUME_NOT_REACHED("should already have a scope");
     }
     if (!debugScope)
         return NULL;
 
     if (!DebugScopes::addDebugScope(cx, si, *debugScope))
         return NULL;
 
     return debugScope;
--- a/js/src/vm/Stack-inl.h
+++ b/js/src/vm/Stack-inl.h
@@ -336,107 +336,107 @@ ScriptFrameIter::ionForEachCanonicalActu
 inline void *
 AbstractFramePtr::maybeHookData() const
 {
     if (isStackFrame())
         return asStackFrame()->maybeHookData();
 #ifdef JS_ION
     return asBaselineFrame()->maybeHookData();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::setHookData(void *data) const
 {
     if (isStackFrame()) {
         asStackFrame()->setHookData(data);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->setHookData(data);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline Value
 AbstractFramePtr::returnValue() const
 {
     if (isStackFrame())
         return asStackFrame()->returnValue();
 #ifdef JS_ION
     return *asBaselineFrame()->returnValue();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::setReturnValue(const Value &rval) const
 {
     if (isStackFrame()) {
         asStackFrame()->setReturnValue(rval);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->setReturnValue(rval);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline JSObject *
 AbstractFramePtr::scopeChain() const
 {
     if (isStackFrame())
         return asStackFrame()->scopeChain();
 #ifdef JS_ION
     return asBaselineFrame()->scopeChain();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::pushOnScopeChain(ScopeObject &scope)
 {
     if (isStackFrame()) {
         asStackFrame()->pushOnScopeChain(scope);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->pushOnScopeChain(scope);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline CallObject &
 AbstractFramePtr::callObj() const
 {
     if (isStackFrame())
         return asStackFrame()->callObj();
 #ifdef JS_ION
     return asBaselineFrame()->callObj();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline bool
 AbstractFramePtr::initFunctionScopeObjects(JSContext *cx)
 {
     if (isStackFrame())
         return asStackFrame()->initFunctionScopeObjects(cx);
 #ifdef JS_ION
     return asBaselineFrame()->initFunctionScopeObjects(cx);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline JSCompartment *
 AbstractFramePtr::compartment() const
 {
     return scopeChain()->compartment();
 }
@@ -444,76 +444,76 @@ AbstractFramePtr::compartment() const
 inline unsigned
 AbstractFramePtr::numActualArgs() const
 {
     if (isStackFrame())
         return asStackFrame()->numActualArgs();
 #ifdef JS_ION
     return asBaselineFrame()->numActualArgs();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline unsigned
 AbstractFramePtr::numFormalArgs() const
 {
     if (isStackFrame())
         return asStackFrame()->numFormalArgs();
 #ifdef JS_ION
     return asBaselineFrame()->numFormalArgs();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::unaliasedVar(unsigned i, MaybeCheckAliasing checkAliasing)
 {
     if (isStackFrame())
         return asStackFrame()->unaliasedVar(i, checkAliasing);
 #ifdef JS_ION
     return asBaselineFrame()->unaliasedVar(i, checkAliasing);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::unaliasedLocal(unsigned i, MaybeCheckAliasing checkAliasing)
 {
     if (isStackFrame())
         return asStackFrame()->unaliasedLocal(i, checkAliasing);
 #ifdef JS_ION
     return asBaselineFrame()->unaliasedLocal(i, checkAliasing);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::unaliasedFormal(unsigned i, MaybeCheckAliasing checkAliasing)
 {
     if (isStackFrame())
         return asStackFrame()->unaliasedFormal(i, checkAliasing);
 #ifdef JS_ION
     return asBaselineFrame()->unaliasedFormal(i, checkAliasing);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::unaliasedActual(unsigned i, MaybeCheckAliasing checkAliasing)
 {
     if (isStackFrame())
         return asStackFrame()->unaliasedActual(i, checkAliasing);
 #ifdef JS_ION
     return asBaselineFrame()->unaliasedActual(i, checkAliasing);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline JSGenerator *
 AbstractFramePtr::maybeSuspendedGenerator(JSRuntime *rt) const
 {
     if (isStackFrame())
         return asStackFrame()->maybeSuspendedGenerator(rt);
@@ -523,28 +523,28 @@ AbstractFramePtr::maybeSuspendedGenerato
 inline StaticBlockObject *
 AbstractFramePtr::maybeBlockChain() const
 {
     if (isStackFrame())
         return asStackFrame()->maybeBlockChain();
 #ifdef JS_ION
     return asBaselineFrame()->maybeBlockChain();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::hasCallObj() const
 {
     if (isStackFrame())
         return asStackFrame()->hasCallObj();
 #ifdef JS_ION
     return asBaselineFrame()->hasCallObj();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::useNewType() const
 {
     if (isStackFrame())
         return asStackFrame()->useNewType();
     return false;
@@ -566,264 +566,264 @@ AbstractFramePtr::isYielding() const
 inline bool
 AbstractFramePtr::isFunctionFrame() const
 {
     if (isStackFrame())
         return asStackFrame()->isFunctionFrame();
 #ifdef JS_ION
     return asBaselineFrame()->isFunctionFrame();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::isGlobalFrame() const
 {
     if (isStackFrame())
         return asStackFrame()->isGlobalFrame();
 #ifdef JS_ION
     return asBaselineFrame()->isGlobalFrame();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::isEvalFrame() const
 {
     if (isStackFrame())
         return asStackFrame()->isEvalFrame();
 #ifdef JS_ION
     return asBaselineFrame()->isEvalFrame();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::isFramePushedByExecute() const
 {
     return isGlobalFrame() || isEvalFrame();
 }
 inline bool
 AbstractFramePtr::isDebuggerFrame() const
 {
     if (isStackFrame())
         return asStackFrame()->isDebuggerFrame();
 #ifdef JS_ION
     return asBaselineFrame()->isDebuggerFrame();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
     return false;
 }
 inline JSScript *
 AbstractFramePtr::script() const
 {
     if (isStackFrame())
         return asStackFrame()->script();
 #ifdef JS_ION
     return asBaselineFrame()->script();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline JSFunction *
 AbstractFramePtr::fun() const
 {
     if (isStackFrame())
         return asStackFrame()->fun();
 #ifdef JS_ION
     return asBaselineFrame()->fun();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline JSFunction *
 AbstractFramePtr::maybeFun() const
 {
     if (isStackFrame())
         return asStackFrame()->maybeFun();
 #ifdef JS_ION
     return asBaselineFrame()->maybeFun();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline JSFunction *
 AbstractFramePtr::callee() const
 {
     if (isStackFrame())
         return &asStackFrame()->callee();
 #ifdef JS_ION
     return asBaselineFrame()->callee();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline Value
 AbstractFramePtr::calleev() const
 {
     if (isStackFrame())
         return asStackFrame()->calleev();
 #ifdef JS_ION
     return asBaselineFrame()->calleev();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::isNonEvalFunctionFrame() const
 {
     if (isStackFrame())
         return asStackFrame()->isNonEvalFunctionFrame();
 #ifdef JS_ION
     return asBaselineFrame()->isNonEvalFunctionFrame();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::isNonStrictDirectEvalFrame() const
 {
     if (isStackFrame())
         return asStackFrame()->isNonStrictDirectEvalFrame();
 #ifdef JS_ION
     return asBaselineFrame()->isNonStrictDirectEvalFrame();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::isStrictEvalFrame() const
 {
     if (isStackFrame())
         return asStackFrame()->isStrictEvalFrame();
 #ifdef JS_ION
     return asBaselineFrame()->isStrictEvalFrame();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline Value *
 AbstractFramePtr::argv() const
 {
     if (isStackFrame())
         return asStackFrame()->argv();
 #ifdef JS_ION
     return asBaselineFrame()->argv();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline bool
 AbstractFramePtr::hasArgsObj() const
 {
     if (isStackFrame())
         return asStackFrame()->hasArgsObj();
 #ifdef JS_ION
     return asBaselineFrame()->hasArgsObj();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline ArgumentsObject &
 AbstractFramePtr::argsObj() const
 {
     if (isStackFrame())
         return asStackFrame()->argsObj();
 #ifdef JS_ION
     return asBaselineFrame()->argsObj();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline void
 AbstractFramePtr::initArgsObj(ArgumentsObject &argsobj) const
 {
     if (isStackFrame()) {
         asStackFrame()->initArgsObj(argsobj);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->initArgsObj(argsobj);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline bool
 AbstractFramePtr::copyRawFrameSlots(AutoValueVector *vec) const
 {
     if (isStackFrame())
         return asStackFrame()->copyRawFrameSlots(vec);
 #ifdef JS_ION
     return asBaselineFrame()->copyRawFrameSlots(vec);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline bool
 AbstractFramePtr::prevUpToDate() const
 {
     if (isStackFrame())
         return asStackFrame()->prevUpToDate();
 #ifdef JS_ION
     return asBaselineFrame()->prevUpToDate();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 inline void
 AbstractFramePtr::setPrevUpToDate() const
 {
     if (isStackFrame()) {
         asStackFrame()->setPrevUpToDate();
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->setPrevUpToDate();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::thisValue() const
 {
     if (isStackFrame())
         return asStackFrame()->thisValue();
 #ifdef JS_ION
     return asBaselineFrame()->thisValue();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::popBlock(JSContext *cx) const
 {
     if (isStackFrame()) {
         asStackFrame()->popBlock(cx);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->popBlock(cx);
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::popWith(JSContext *cx) const
 {
     if (isStackFrame())
         asStackFrame()->popWith(cx);
     else
-        JS_NOT_REACHED("Invalid frame");
+        MOZ_ASSUME_NOT_REACHED("Invalid frame");
 }
 
 Activation::Activation(JSContext *cx, Kind kind, bool active)
   : cx_(cx),
     compartment_(cx->compartment()),
     prev_(cx->mainThread().activation_),
     active_(active),
     savedFrameChain_(0),
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -690,17 +690,17 @@ ScriptFrameIter::popJitFrame()
 }
 #endif
 
 ScriptFrameIter &
 ScriptFrameIter::operator++()
 {
     switch (data_.state_) {
       case DONE:
-        JS_NOT_REACHED("Unexpected state");
+        MOZ_ASSUME_NOT_REACHED("Unexpected state");
       case SCRIPTED:
         if (interpFrame()->isDebuggerFrame() && interpFrame()->evalInFramePrev()) {
             AbstractFramePtr eifPrev = interpFrame()->evalInFramePrev();
 
             // Eval-in-frame can cross contexts and works across saved frame
             // chains.
             ContextOption prevContextOption = data_.contextOption_;
             SavedOption prevSavedOption = data_.savedOption_;
@@ -709,17 +709,17 @@ ScriptFrameIter::operator++()
 
             popInterpreterFrame();
 
             while (isIon() || abstractFramePtr() != eifPrev) {
                 if (data_.state_ == JIT) {
 #ifdef JS_ION
                     popJitFrame();
 #else
-                    JS_NOT_REACHED("Invalid state");
+                    MOZ_ASSUME_NOT_REACHED("Invalid state");
 #endif
                 } else {
                     popInterpreterFrame();
                 }
             }
 
             data_.contextOption_ = prevContextOption;
             data_.savedOption_ = prevSavedOption;
@@ -728,17 +728,17 @@ ScriptFrameIter::operator++()
         }
         popInterpreterFrame();
         break;
       case JIT:
 #ifdef JS_ION
         popJitFrame();
         break;
 #else
-        JS_NOT_REACHED("Unexpected state");
+        MOZ_ASSUME_NOT_REACHED("Unexpected state");
 #endif
     }
     return *this;
 }
 
 ScriptFrameIter::Data *
 ScriptFrameIter::copyData() const
 {
@@ -757,17 +757,17 @@ ScriptFrameIter::compartment() const
 {
     switch (data_.state_) {
       case DONE:
         break;
       case SCRIPTED:
       case JIT:
         return data_.activations_.activation()->compartment();
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return NULL;
 }
 
 bool
 ScriptFrameIter::isFunctionFrame() const
 {
     switch (data_.state_) {
       case DONE:
@@ -779,17 +779,17 @@ ScriptFrameIter::isFunctionFrame() const
         JS_ASSERT(data_.ionFrames_.isScripted());
         if (data_.ionFrames_.isBaselineJS())
             return data_.ionFrames_.isFunctionFrame();
         return ionInlineFrames_.isFunctionFrame();
 #else
         break;
 #endif
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return false;
 }
 
 bool
 ScriptFrameIter::isGlobalFrame() const
 {
     switch (data_.state_) {
       case DONE:
@@ -801,17 +801,17 @@ ScriptFrameIter::isGlobalFrame() const
         if (data_.ionFrames_.isBaselineJS())
             return data_.ionFrames_.baselineFrame()->isGlobalFrame();
         JS_ASSERT(!script()->isForEval());
         return !script()->function();
 #else
         break;
 #endif
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return false;
 }
 
 bool
 ScriptFrameIter::isEvalFrame() const
 {
     switch (data_.state_) {
       case DONE:
@@ -823,48 +823,48 @@ ScriptFrameIter::isEvalFrame() const
         if (data_.ionFrames_.isBaselineJS())
             return data_.ionFrames_.baselineFrame()->isEvalFrame();
         JS_ASSERT(!script()->isForEval());
         return false;
 #else
         break;
 #endif
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return false;
 }
 
 bool
 ScriptFrameIter::isNonEvalFunctionFrame() const
 {
     JS_ASSERT(!done());
     switch (data_.state_) {
       case DONE:
         break;
       case SCRIPTED:
         return interpFrame()->isNonEvalFunctionFrame();
       case JIT:
         return !isEvalFrame() && isFunctionFrame();
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return false;
 }
 
 bool
 ScriptFrameIter::isGeneratorFrame() const
 {
     switch (data_.state_) {
       case DONE:
         break;
       case SCRIPTED:
         return interpFrame()->isGeneratorFrame();
       case JIT:
         return false;
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return false;
 }
 
 bool
 ScriptFrameIter::isConstructing() const
 {
     switch (data_.state_) {
       case DONE:
@@ -876,17 +876,17 @@ ScriptFrameIter::isConstructing() const
         JS_ASSERT(data_.ionFrames_.isBaselineJS());
         return data_.ionFrames_.isConstructing();
 #else
         break;
 #endif        
       case SCRIPTED:
         return interpFrame()->isConstructing();
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return false;
 }
 
 AbstractFramePtr
 ScriptFrameIter::abstractFramePtr() const
 {
     switch (data_.state_) {
       case DONE:
@@ -896,17 +896,17 @@ ScriptFrameIter::abstractFramePtr() cons
         if (data_.ionFrames_.isBaselineJS())
             return data_.ionFrames_.baselineFrame();
 #endif
         break;
       case SCRIPTED:
         JS_ASSERT(interpFrame());
         return AbstractFramePtr(interpFrame());
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return NullFramePtr();
 }
 
 void
 ScriptFrameIter::updatePcQuadratic()
 {
     switch (data_.state_) {
       case DONE:
@@ -945,17 +945,17 @@ ScriptFrameIter::updatePcQuadratic()
             // Update the pc.
             JS_ASSERT(data_.ionFrames_.baselineFrame() == frame);
             data_.ionFrames_.baselineScriptAndPc(NULL, &data_.pc_);
             return;
         }
 #endif
         break;
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
 }
 
 JSFunction *
 ScriptFrameIter::callee() const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -967,17 +967,17 @@ ScriptFrameIter::callee() const
         if (data_.ionFrames_.isBaselineJS())
             return data_.ionFrames_.callee();
         JS_ASSERT(data_.ionFrames_.isOptimizedJS());
         return ionInlineFrames_.callee();
 #else
         break;
 #endif
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return NULL;
 }
 
 Value
 ScriptFrameIter::calleev() const
 {
     switch (data_.state_) {
       case DONE:
@@ -987,17 +987,17 @@ ScriptFrameIter::calleev() const
         return interpFrame()->calleev();
       case JIT:
 #ifdef JS_ION
         return ObjectValue(*callee());
 #else
         break;
 #endif
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return Value();
 }
 
 unsigned
 ScriptFrameIter::numActualArgs() const
 {
     switch (data_.state_) {
       case DONE:
@@ -1011,17 +1011,17 @@ ScriptFrameIter::numActualArgs() const
             return ionInlineFrames_.numActualArgs();
 
         JS_ASSERT(data_.ionFrames_.isBaselineJS());
         return data_.ionFrames_.numActualArgs();
 #else
         break;
 #endif
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return 0;
 }
 
 Value
 ScriptFrameIter::unaliasedActual(unsigned i, MaybeCheckAliasing checkAliasing) const
 {
     switch (data_.state_) {
       case DONE:
@@ -1031,17 +1031,17 @@ ScriptFrameIter::unaliasedActual(unsigne
       case JIT:
 #ifdef JS_ION
         JS_ASSERT(data_.ionFrames_.isBaselineJS());
         return data_.ionFrames_.baselineFrame()->unaliasedActual(i, checkAliasing);
 #else
         break;
 #endif
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return NullValue();
 }
 
 JSObject *
 ScriptFrameIter::scopeChain() const
 {
     switch (data_.state_) {
       case DONE:
@@ -1052,17 +1052,17 @@ ScriptFrameIter::scopeChain() const
             return ionInlineFrames_.scopeChain();
         return data_.ionFrames_.baselineFrame()->scopeChain();
 #else
         break;
 #endif
       case SCRIPTED:
         return interpFrame()->scopeChain();
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return NULL;
 }
 
 CallObject &
 ScriptFrameIter::callObj() const
 {
     JS_ASSERT(callee()->isHeavyweight());
 
@@ -1083,17 +1083,17 @@ ScriptFrameIter::hasArgsObj() const
       case JIT:
 #ifdef JS_ION
         JS_ASSERT(data_.ionFrames_.isBaselineJS());
         return data_.ionFrames_.baselineFrame()->hasArgsObj();
 #else
         break;
 #endif
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return false;
 }
 
 ArgumentsObject &
 ScriptFrameIter::argsObj() const
 {
     JS_ASSERT(hasArgsObj());
 
@@ -1105,17 +1105,17 @@ ScriptFrameIter::argsObj() const
         JS_ASSERT(data_.ionFrames_.isBaselineJS());
         return data_.ionFrames_.baselineFrame()->argsObj();
 #else
         break;
 #endif
       case SCRIPTED:
         return interpFrame()->argsObj();
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return interpFrame()->argsObj();
 }
 
 bool
 ScriptFrameIter::computeThis() const
 {
     JS_ASSERT(!done());
     if (!isIon()) {
@@ -1137,17 +1137,17 @@ ScriptFrameIter::thisv() const
             return ObjectValue(*ionInlineFrames_.thisObject());
         return data_.ionFrames_.baselineFrame()->thisValue();
 #else
         break;
 #endif
       case SCRIPTED:
         return interpFrame()->thisValue();
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return NullValue();
 }
 
 Value
 ScriptFrameIter::returnValue() const
 {
     switch (data_.state_) {
       case DONE:
@@ -1156,17 +1156,17 @@ ScriptFrameIter::returnValue() const
 #ifdef JS_ION
         if (data_.ionFrames_.isBaselineJS())
             return *data_.ionFrames_.baselineFrame()->returnValue();
 #endif
         break;
       case SCRIPTED:
         return interpFrame()->returnValue();
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return NullValue();
 }
 
 void
 ScriptFrameIter::setReturnValue(const Value &v)
 {
     switch (data_.state_) {
       case DONE:
@@ -1178,17 +1178,17 @@ ScriptFrameIter::setReturnValue(const Va
             return;
         }
 #endif
         break;
       case SCRIPTED:
         interpFrame()->setReturnValue(v);
         return;
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
 }
 
 size_t
 ScriptFrameIter::numFrameSlots() const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -1201,17 +1201,17 @@ ScriptFrameIter::numFrameSlots() const
 #else
         break;
 #endif
       }
       case SCRIPTED:
         JS_ASSERT(data_.interpFrames_.sp() >= interpFrame()->base());
         return data_.interpFrames_.sp() - interpFrame()->base();
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return 0;
 }
 
 Value
 ScriptFrameIter::frameSlotValue(size_t index) const
 {
     switch (data_.state_) {
       case DONE:
@@ -1227,17 +1227,17 @@ ScriptFrameIter::frameSlotValue(size_t i
         index += data_.ionFrames_.script()->nfixed;
         return *data_.ionFrames_.baselineFrame()->valueSlot(index);
 #else
         break;
 #endif
       case SCRIPTED:
           return interpFrame()->base()[index];
     }
-    JS_NOT_REACHED("Unexpected state");
+    MOZ_ASSUME_NOT_REACHED("Unexpected state");
     return NullValue();
 }
 
 #if defined(_MSC_VER)
 # pragma optimize("", on)
 #endif
 
 /*****************************************************************************/
@@ -1256,17 +1256,17 @@ AbstractFramePtr::evalPrevScopeChain(JSC
 bool
 AbstractFramePtr::hasPushedSPSFrame() const
 {
     if (isStackFrame())
         return asStackFrame()->hasPushedSPSFrame();
 #ifdef JS_ION
     return asBaselineFrame()->hasPushedSPSFrame();
 #else
-    JS_NOT_REACHED("Invalid frame");
+    MOZ_ASSUME_NOT_REACHED("Invalid frame");
     return false;
 #endif
 }
 
 #ifdef DEBUG
 void
 js::CheckLocalUnaliased(MaybeCheckAliasing checkAliasing, JSScript *script,
                         StaticBlockObject *maybeBlock, unsigned i)
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -354,74 +354,96 @@ MOZ_ReportCrash(const char* s, const cha
        if (cond) \
          MOZ_ASSERT(expr); \
      } while (0)
 #else
 #  define MOZ_ASSERT_IF(cond, expr)  do { } while (0)
 #endif
 
 /*
- * MOZ_CRASH_MARKER() expands to an expression which states that it is
+ * MOZ_ASSUME_NOT_REACHED_MARKER() expands to an expression which states that it is
  * undefined behavior for execution to reach this point.  No guarantees are made
  * about what will happen if this is reached at runtime.  Most code should
- * probably use the higher level MOZ_CRASH, which uses this when
+ * probably use the higher level MOZ_ASSUME_NOT_REACHED, which uses this when
  * appropriate.
  */
 #if defined(__clang__)
-#  define MOZ_CRASH_MARKER() __builtin_unreachable()
+#  define MOZ_ASSUME_NOT_REACHED_MARKER() __builtin_unreachable()
 #elif defined(__GNUC__)
    /*
     * __builtin_unreachable() was implemented in gcc 4.5.  If we don't have
     * that, call a noreturn function; abort() will do nicely.  Qualify the call
     * in C++ in case there's another abort() visible in local scope.
     */
 #  if MOZ_GCC_VERSION_AT_LEAST(4, 5, 0)
-#    define MOZ_CRASH_MARKER() __builtin_unreachable()
+#    define MOZ_ASSUME_NOT_REACHED_MARKER() __builtin_unreachable()
 #  else
 #    ifdef __cplusplus
-#      define MOZ_CRASH_MARKER() ::abort()
+#      define MOZ_ASSUME_NOT_REACHED_MARKER() ::abort()
 #    else
-#      define MOZ_CRASH_MARKER() abort()
+#      define MOZ_ASSUME_NOT_REACHED_MARKER() abort()
 #    endif
 #  endif
 #elif defined(_MSC_VER)
-#  define MOZ_CRASH_MARKER() __assume(0)
+#  define MOZ_ASSUME_NOT_REACHED_MARKER() __assume(0)
 #else
 #  ifdef __cplusplus
-#    define MOZ_CRASH_MARKER() ::abort()
+#    define MOZ_ASSUME_NOT_REACHED_MARKER() ::abort()
 #  else
-#    define MOZ_CRASH_MARKER() abort()
+#    define MOZ_ASSUME_NOT_REACHED_MARKER() abort()
 #  endif
 #endif
 
 /*
- * MOZ_CRASH(reason) indicates that the given point can't be reached
- * during execution: simply reaching that point in execution is a bug.  It takes
- * as an argument an error message indicating the reason why that point should
- * not have been reachable.
+ * MOZ_ASSUME_UNREACHABLE([reason]) tells the compiler that it can assume that
+ * the macro call cannot be reached during execution.  This lets the compiler
+ * generate better-optimized code under some circumstances, at the expense of
+ * the program's behavior being undefined if control reaches the
+ * MOZ_ASSUME_UNREACHABLE.
+ *
+ * In Gecko, you probably should not use this macro outside of performance- or
+ * size-critical code, because it's unsafe.  If you don't care about code size
+ * or performance, you should probably use MOZ_ASSERT or MOZ_CRASH.
+ *
+ * SpiderMonkey is a different beast, and there it's acceptable to use
+ * MOZ_ASSUME_UNREACHABLE more widely.
+ *
+ * Note that MOZ_ASSUME_NOT_REACHED is noreturn, so it's valid not to return a
+ * value following a MOZ_ASSUME_NOT_REACHED call.
+ *
+ * Example usage:
  *
- *   // ...in a language parser...
- *   void handle(BooleanLiteralNode node)
+ *   enum ValueType {
+ *     VALUE_STRING,
+ *     VALUE_INT,
+ *     VALUE_FLOAT
+ *   };
+ *
+ *   int ptrToInt(ValueType type, void* value) {
  *   {
- *     if (node.isTrue())
- *       handleTrueLiteral();
- *     else if (node.isFalse())
- *       handleFalseLiteral();
- *     else
- *       MOZ_CRASH("boolean literal that's not true or false?");
+ *     // We know for sure that type is either INT or FLOAT, and we want this
+ *     // code to run as quickly as possible.
+ *     switch (type) {
+ *     case VALUE_INT:
+ *       return *(int*) value;
+ *     case VALUE_FLOAT:
+ *       return (int) *(float*) value;
+ *     default:
+ *       MOZ_ASSUME_NOT_REACHED("can only handle VALUE_INT and VALUE_FLOAT");
+ *     }
  *   }
  */
 #if defined(DEBUG)
-#  define MOZ_CRASH(reason) \
+#  define MOZ_ASSUME_NOT_REACHED(...) \
      do { \
-       MOZ_ASSERT(false, reason); \
-       MOZ_CRASH_MARKER(); \
+       MOZ_ASSERT(false, "MOZ_ASSUME_NOT_REACHED(" __VA_ARGS__ ")"); \
+       MOZ_ASSUME_NOT_REACHED_MARKER(); \
      } while (0)
 #else
-#  define MOZ_CRASH(reason)  MOZ_CRASH_MARKER()
+#  define MOZ_ASSUME_NOT_REACHED(reason)  MOZ_ASSUME_NOT_REACHED_MARKER()
 #endif
 
 /*
  * MOZ_ALWAYS_TRUE(expr) and MOZ_ALWAYS_FALSE(expr) always evaluate the provided
  * expression, in debug builds and in release builds both.  Then, in debug
  * builds only, the value of the expression is asserted either true or false
  * using MOZ_ASSERT.
  */
--- a/mfbt/decimal/moz-decimal-utils.h
+++ b/mfbt/decimal/moz-decimal-utils.h
@@ -27,17 +27,17 @@
 #define UINT64_C(c) (c ## ULL)
 #endif
 
 #ifdef ASSERT
 #undef ASSERT
 #endif
 #define ASSERT MOZ_ASSERT
 
-#define ASSERT_NOT_REACHED() MOZ_CRASH("")
+#define ASSERT_NOT_REACHED() MOZ_ASSUME_NOT_REACHED()
 
 #define WTF_MAKE_NONCOPYABLE(ClassName) \
   private: \
     ClassName(const ClassName&) MOZ_DELETE; \
     void operator=(const ClassName&) MOZ_DELETE;
 
 #if defined(_MSC_VER) && (_MSC_VER <= 1700)
 namespace std {
--- a/mfbt/decimal/to-moz-dependencies.patch
+++ b/mfbt/decimal/to-moz-dependencies.patch
@@ -251,17 +251,17 @@ new file mode 100644
 +#define UINT64_C(c) (c ## ULL)
 +#endif
 +
 +#ifdef ASSERT
 +#undef ASSERT
 +#endif
 +#define ASSERT MOZ_ASSERT
 +
-+#define ASSERT_NOT_REACHED() MOZ_CRASH("")
++#define ASSERT_NOT_REACHED() MOZ_ASSUME_NOT_REACHED()
 +
 +#define WTF_MAKE_NONCOPYABLE(ClassName) \
 +  private: \
 +    ClassName(const ClassName&) MOZ_DELETE; \
 +    void operator=(const ClassName&) MOZ_DELETE;
 +
 +#if defined(_MSC_VER) && (_MSC_VER <= 1700)
 +namespace std {