Fix warnings in js/src (no bug, rs=dvander)
authorLuke Wagner <luke@mozilla.com>
Fri, 13 Apr 2012 18:03:33 -0700
changeset 91650 1b3d61ce3604df8cbc8b3656cfea8d2d701ba53b
parent 91649 071ec7e1766004cf7faaf4f457f5edaa2c50a292
child 91651 2411a6a8e38c8adb82489d2c2b414b55008cb3d3
push id22465
push usermak77@bonardo.net
push dateSat, 14 Apr 2012 11:58:29 +0000
treeherdermozilla-central@6880c195054f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
milestone14.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
Fix warnings in js/src (no bug, rs=dvander)
js/src/vm/Stack.cpp
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -1242,87 +1242,92 @@ StackIter::operator==(const StackIter &r
               (!isScript() && nativeArgs().base() == rhs.nativeArgs().base()))));
 }
 
 bool
 StackIter::isFunctionFrame() const
 {
     switch (state_) {
       case DONE:
-        JS_NOT_REACHED("Unexpected state");
-        return false;
+        break;
       case SCRIPTED:
         return fp()->isFunctionFrame();
       case NATIVE:
       case IMPLICIT_NATIVE:
         return true;
     }
+    JS_NOT_REACHED("Unexpected state");
+    return false;
 }
 
 bool
 StackIter::isEvalFrame() const
 {
     switch (state_) {
       case DONE:
-        JS_NOT_REACHED("Unexpected state");
-        return false;
+        break;
       case SCRIPTED:
         return fp()->isEvalFrame();
       case NATIVE:
       case IMPLICIT_NATIVE:
         return false;
     }
+    JS_NOT_REACHED("Unexpected state");
+    return false;
 }
 
 bool
 StackIter::isNonEvalFunctionFrame() const
 {
     JS_ASSERT(!done());
     switch (state_) {
       case DONE:
-        JS_NOT_REACHED("Unexpected state");
-        return false;
+        break;
       case SCRIPTED:
         return fp()->isNonEvalFunctionFrame();
       case NATIVE:
       case IMPLICIT_NATIVE:
         return !isEvalFrame() && isFunctionFrame();
     }
+    JS_NOT_REACHED("Unexpected state");
+    return false;
 }
 
 JSObject &
 StackIter::callee() const
 {
     JS_ASSERT(isFunctionFrame());
     switch (state_) {
       case DONE:
-        JS_NOT_REACHED("Unexpected state");
-        return *(JSObject *) NULL;
+        break;
       case SCRIPTED:
         return fp()->callee();
       case NATIVE:
       case IMPLICIT_NATIVE:
         return nativeArgs().callee();
     }
+    JS_NOT_REACHED("Unexpected state");
+    return *(JSObject *) NULL;
 }
 
 Value
 StackIter::calleev() const
 {
     JS_ASSERT(isFunctionFrame());
     switch (state_) {
       case DONE:
-        JS_NOT_REACHED("Unexpected state");
-        return Value();
+        break;
       case SCRIPTED:
         return fp()->calleev();
       case NATIVE:
       case IMPLICIT_NATIVE:
         return nativeArgs().calleev();
     }
+    JS_NOT_REACHED("Unexpected state");
+    return Value();
 }
 
 /*****************************************************************************/
 
 AllFramesIter::AllFramesIter(StackSpace &space)
   : seg_(space.seg_),
     fp_(seg_ ? seg_->maybefp() : NULL)
 {