Bug 1400278 - Fix compilation errors to do with unreachable return statements r=jandem
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 20 Sep 2017 13:19:32 +0100
changeset 431420 6c960c257d13ba003045d784e3805fc7cacee0a6
parent 431419 b95045e6223be4ef08d60b34577f48be87c95aab
child 431421 065aebfbdd75820c73419a3173dbf1c5bca1ab00
push id7784
push userryanvm@gmail.com
push dateThu, 21 Sep 2017 00:40:13 +0000
treeherdermozilla-beta@efff4f307675 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1400278
milestone57.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 1400278 - Fix compilation errors to do with unreachable return statements r=jandem
js/src/frontend/BytecodeEmitter.cpp
js/src/jit/BaselineInspector.cpp
js/src/jit/IonControlFlow.cpp
js/src/vm/TypeInference.cpp
js/src/wasm/AsmJS.cpp
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -9785,18 +9785,16 @@ BytecodeEmitter::emitIncOrDec(ParseNode*
         return emitPropIncDec(pn);
       case PNK_ELEM:
         return emitElemIncDec(pn);
       case PNK_CALL:
         return emitCallIncDec(pn);
       default:
         return emitNameIncDec(pn);
     }
-
-    return true;
 }
 
 // Using MOZ_NEVER_INLINE in here is a workaround for llvm.org/pr14047. See
 // the comment on emitSwitch.
 MOZ_NEVER_INLINE bool
 BytecodeEmitter::emitLabeledStatement(const LabeledStatement* pn)
 {
     /*
--- a/js/src/jit/BaselineInspector.cpp
+++ b/js/src/jit/BaselineInspector.cpp
@@ -535,20 +535,18 @@ BaselineInspector::hasSeenDoubleResult(j
 
     const ICEntry& entry = icEntryFromPC(pc);
     ICStub* stub = entry.fallbackStub();
 
     MOZ_ASSERT(stub->isUnaryArith_Fallback() || stub->isBinaryArith_Fallback());
 
     if (stub->isUnaryArith_Fallback())
         return stub->toUnaryArith_Fallback()->sawDoubleResult();
-    else
-        return stub->toBinaryArith_Fallback()->sawDoubleResult();
 
-    return false;
+    return stub->toBinaryArith_Fallback()->sawDoubleResult();
 }
 
 JSObject*
 BaselineInspector::getTemplateObject(jsbytecode* pc)
 {
     if (!hasBaselineScript())
         return nullptr;
 
--- a/js/src/jit/IonControlFlow.cpp
+++ b/js/src/jit/IonControlFlow.cpp
@@ -250,18 +250,16 @@ ControlFlowGenerator::traverseBytecode()
             }
             if (!current)
                 return true;
         }
 
         JSOp op = JSOp(*pc);
         pc += CodeSpec[op].length;
     }
-
-    return true;
 }
 
 ControlFlowGenerator::ControlStatus
 ControlFlowGenerator::snoopControlFlow(JSOp op)
 {
     switch (op) {
       case JSOP_POP:
       case JSOP_NOP: {
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -1311,20 +1311,18 @@ js::EnsureTrackPropertyTypes(JSContext* 
 {
     id = IdToTypeId(id);
 
     if (obj->isSingleton()) {
         AutoEnterAnalysis enter(cx);
         if (obj->hasLazyGroup()) {
             AutoEnterOOMUnsafeRegion oomUnsafe;
             RootedObject objRoot(cx, obj);
-            if (!JSObject::getGroup(cx, objRoot)) {
+            if (!JSObject::getGroup(cx, objRoot))
                 oomUnsafe.crash("Could not allocate ObjectGroup in EnsureTrackPropertyTypes");
-                return;
-            }
         }
         if (!obj->group()->unknownProperties() && !obj->group()->getProperty(cx, obj, id)) {
             MOZ_ASSERT(obj->group()->unknownProperties());
             return;
         }
     }
 
     MOZ_ASSERT(obj->group()->unknownProperties() || TrackPropertyTypes(obj, id));
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -4465,18 +4465,16 @@ CheckSharedArrayAtomicAccess(FunctionVal
       case Scalar::Int32:
       case Scalar::Uint8:
       case Scalar::Uint16:
       case Scalar::Uint32:
         return true;
       default:
         return f.failf(viewName, "not an integer array");
     }
-
-    return true;
 }
 
 static bool
 WriteAtomicOperator(FunctionValidator& f, MozOp opcode, Scalar::Type viewType)
 {
     return f.encoder().writeOp(opcode) &&
            f.encoder().writeFixedU8(viewType);
 }