Title: [194858] trunk/Source/_javascript_Core
Revision
194858
Author
o...@webkit.org
Date
2016-01-11 10:13:36 -0800 (Mon, 11 Jan 2016)

Log Message

[B3] Fix control reaches end of non-void function GCC warnings on Linux
https://bugs.webkit.org/show_bug.cgi?id=152887

Reviewed by Mark Lam.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createBranch):
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::createSelect):
* b3/B3Type.h:
(JSC::B3::sizeofType):
* b3/air/AirArg.cpp:
(JSC::B3::Air::Arg::isRepresentableAs):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isAnyUse):
(JSC::B3::Air::Arg::isColdUse):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::isLateUse):
(JSC::B3::Air::Arg::isAnyDef):
(JSC::B3::Air::Arg::isEarlyDef):
(JSC::B3::Air::Arg::isLateDef):
(JSC::B3::Air::Arg::isZDef):
(JSC::B3::Air::Arg::widthForB3Type):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isType):
(JSC::B3::Air::Arg::isValidForm):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::newTmp):
(JSC::B3::Air::Code::numTmps):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (194857 => 194858)


--- trunk/Source/_javascript_Core/ChangeLog	2016-01-11 17:39:25 UTC (rev 194857)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-01-11 18:13:36 UTC (rev 194858)
@@ -1,3 +1,36 @@
+2016-01-11  Csaba Osztrogonác  <o...@webkit.org>
+
+        [B3] Fix control reaches end of non-void function GCC warnings on Linux
+        https://bugs.webkit.org/show_bug.cgi?id=152887
+
+        Reviewed by Mark Lam.
+
+        * b3/B3LowerToAir.cpp:
+        (JSC::B3::Air::LowerToAir::createBranch):
+        (JSC::B3::Air::LowerToAir::createCompare):
+        (JSC::B3::Air::LowerToAir::createSelect):
+        * b3/B3Type.h:
+        (JSC::B3::sizeofType):
+        * b3/air/AirArg.cpp:
+        (JSC::B3::Air::Arg::isRepresentableAs):
+        * b3/air/AirArg.h:
+        (JSC::B3::Air::Arg::isAnyUse):
+        (JSC::B3::Air::Arg::isColdUse):
+        (JSC::B3::Air::Arg::isEarlyUse):
+        (JSC::B3::Air::Arg::isLateUse):
+        (JSC::B3::Air::Arg::isAnyDef):
+        (JSC::B3::Air::Arg::isEarlyDef):
+        (JSC::B3::Air::Arg::isLateDef):
+        (JSC::B3::Air::Arg::isZDef):
+        (JSC::B3::Air::Arg::widthForB3Type):
+        (JSC::B3::Air::Arg::isGP):
+        (JSC::B3::Air::Arg::isFP):
+        (JSC::B3::Air::Arg::isType):
+        (JSC::B3::Air::Arg::isValidForm):
+        * b3/air/AirCode.h:
+        (JSC::B3::Air::Code::newTmp):
+        (JSC::B3::Air::Code::numTmps):
+
 2016-01-11  Filip Pizlo  <fpi...@apple.com>
 
         Make it easier to introduce exotic instructions to Air

Modified: trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp (194857 => 194858)


--- trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp	2016-01-11 17:39:25 UTC (rev 194857)
+++ trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp	2016-01-11 18:13:36 UTC (rev 194858)
@@ -52,6 +52,11 @@
 #include "B3ValueInlines.h"
 #include <wtf/ListDump.h>
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type"
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 namespace JSC { namespace B3 {
 
 using namespace Air;
@@ -1338,6 +1343,7 @@
                     }
                     return Inst();
                 }
+                ASSERT_NOT_REACHED();
             },
             [this] (
                 Arg::Width width, const Arg& resCond,
@@ -1367,6 +1373,7 @@
                     }
                     return Inst();
                 }
+                ASSERT_NOT_REACHED();
             },
             [this] (Arg doubleCond, const ArgPromise& left, const ArgPromise& right) -> Inst {
                 if (isValidForm(BranchDouble, Arg::DoubleCond, left.kind(), right.kind())) {
@@ -1413,6 +1420,7 @@
                     }
                     return Inst();
                 }
+                ASSERT_NOT_REACHED();
             },
             [this] (
                 Arg::Width width, const Arg& resCond,
@@ -1436,6 +1444,7 @@
                     }
                     return Inst();
                 }
+                ASSERT_NOT_REACHED();
             },
             [this] (const Arg& doubleCond, const ArgPromise& left, const ArgPromise& right) -> Inst {
                 if (isValidForm(CompareDouble, Arg::DoubleCond, left.kind(), right.kind(), Arg::Tmp)) {
@@ -1495,6 +1504,7 @@
                     }
                     return Inst();
                 }
+                ASSERT_NOT_REACHED();
             },
             [&] (
                 Arg::Width width, const Arg& resCond,
@@ -1521,6 +1531,7 @@
                     }
                     return Inst();
                 }
+                ASSERT_NOT_REACHED();
             },
             [&] (Arg doubleCond, const ArgPromise& left, const ArgPromise& right) -> Inst {
                 if (isValidForm(config.moveConditionallyDouble, Arg::DoubleCond, left.kind(), right.kind(), Arg::Tmp, Arg::Tmp)) {
@@ -2298,5 +2309,8 @@
 
 } } // namespace JSC::B3
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic pop
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 #endif // ENABLE(B3_JIT)
-

Modified: trunk/Source/_javascript_Core/b3/B3Type.h (194857 => 194858)


--- trunk/Source/_javascript_Core/b3/B3Type.h	2016-01-11 17:39:25 UTC (rev 194857)
+++ trunk/Source/_javascript_Core/b3/B3Type.h	2016-01-11 18:13:36 UTC (rev 194858)
@@ -31,6 +31,11 @@
 #include "B3Common.h"
 #include <wtf/StdLibExtras.h>
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type"
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 namespace JSC { namespace B3 {
 
 enum Type : int8_t {
@@ -70,6 +75,7 @@
     case Double:
         return 8;
     }
+    ASSERT_NOT_REACHED();
 }
 
 } } // namespace JSC::B3
@@ -82,7 +88,10 @@
 
 } // namespace WTF
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic pop
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 #endif // ENABLE(B3_JIT)
 
 #endif // B3Type_h
-

Modified: trunk/Source/_javascript_Core/b3/air/AirArg.cpp (194857 => 194858)


--- trunk/Source/_javascript_Core/b3/air/AirArg.cpp	2016-01-11 17:39:25 UTC (rev 194857)
+++ trunk/Source/_javascript_Core/b3/air/AirArg.cpp	2016-01-11 18:13:36 UTC (rev 194858)
@@ -31,6 +31,11 @@
 #include "AirSpecial.h"
 #include "AirStackSlot.h"
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type"
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 namespace JSC { namespace B3 { namespace Air {
 
 bool Arg::isRepresentableAs(Width width, Signedness signedness) const
@@ -59,6 +64,7 @@
             return isRepresentableAs<uint64_t>();
         }
     }
+    ASSERT_NOT_REACHED();
 }
 
 void Arg::dump(PrintStream& out) const
@@ -257,4 +263,8 @@
 
 } // namespace WTF
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic pop
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 #endif // ENABLE(B3_JIT)

Modified: trunk/Source/_javascript_Core/b3/air/AirArg.h (194857 => 194858)


--- trunk/Source/_javascript_Core/b3/air/AirArg.h	2016-01-11 17:39:25 UTC (rev 194857)
+++ trunk/Source/_javascript_Core/b3/air/AirArg.h	2016-01-11 18:13:36 UTC (rev 194858)
@@ -33,6 +33,11 @@
 #include "B3Type.h"
 #include <wtf/Optional.h>
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type"
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 namespace JSC { namespace B3 { namespace Air {
 
 class Special;
@@ -194,6 +199,7 @@
         case EarlyDef:
             return false;
         }
+        ASSERT_NOT_REACHED();
     }
 
     static bool isColdUse(Role role)
@@ -213,6 +219,7 @@
         case EarlyDef:
             return false;
         }
+        ASSERT_NOT_REACHED();
     }
 
     static bool isWarmUse(Role role)
@@ -238,6 +245,7 @@
         case EarlyDef:
             return false;
         }
+        ASSERT_NOT_REACHED();
     }
 
     // Returns true if the Role implies that the Inst will Use the Arg after doing everything else.
@@ -258,6 +266,7 @@
         case EarlyDef:
             return false;
         }
+        ASSERT_NOT_REACHED();
     }
 
     // Returns true if the Role implies that the Inst will Def the Arg.
@@ -278,6 +287,7 @@
         case Scratch:
             return true;
         }
+        ASSERT_NOT_REACHED();
     }
 
     // Returns true if the Role implies that the Inst will Def the Arg before start of execution.
@@ -298,6 +308,7 @@
         case Scratch:
             return true;
         }
+        ASSERT_NOT_REACHED();
     }
 
     // Returns true if the Role implies that the Inst will Def the Arg after the end of execution.
@@ -318,6 +329,7 @@
         case UseZDef:
             return true;
         }
+        ASSERT_NOT_REACHED();
     }
 
     // Returns true if the Role implies that the Inst will ZDef the Arg.
@@ -338,6 +350,7 @@
         case UseZDef:
             return true;
         }
+        ASSERT_NOT_REACHED();
     }
 
     static Type typeForB3Type(B3::Type type)
@@ -370,6 +383,7 @@
         case Double:
             return Width64;
         }
+        ASSERT_NOT_REACHED();
     }
 
     static Width conservativeWidth(Type type)
@@ -760,6 +774,7 @@
         case Invalid:
             return false;
         }
+        ASSERT_NOT_REACHED();
     }
 
     // Tells us if this Arg can be used in a position that requires a FP value.
@@ -782,6 +797,7 @@
         case Tmp:
             return isFPTmp();
         }
+        ASSERT_NOT_REACHED();
     }
 
     bool hasType() const
@@ -810,6 +826,7 @@
         case FP:
             return isFP();
         }
+        ASSERT_NOT_REACHED();
     }
 
     bool isGPR() const
@@ -955,6 +972,7 @@
         case Special:
             return true;
         }
+        ASSERT_NOT_REACHED();
     }
 
     template<typename Functor>
@@ -1161,6 +1179,10 @@
 
 } // namespace WTF
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic pop
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 #endif // ENABLE(B3_JIT)
 
 #endif // AirArg_h

Modified: trunk/Source/_javascript_Core/b3/air/AirCode.h (194857 => 194858)


--- trunk/Source/_javascript_Core/b3/air/AirCode.h	2016-01-11 17:39:25 UTC (rev 194857)
+++ trunk/Source/_javascript_Core/b3/air/AirCode.h	2016-01-11 18:13:36 UTC (rev 194858)
@@ -39,6 +39,11 @@
 
 class Procedure;
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type"
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 namespace Air {
 
 class CCallSpecial;
@@ -76,6 +81,7 @@
         case Arg::FP:
             return Tmp::fpTmpForIndex(m_numFPTmps++);
         }
+        ASSERT_NOT_REACHED();
     }
 
     unsigned numTmps(Arg::Type type)
@@ -86,6 +92,7 @@
         case Arg::FP:
             return m_numFPTmps;
         }
+        ASSERT_NOT_REACHED();
     }
 
     unsigned callArgAreaSize() const { return m_callArgAreaSize; }
@@ -335,6 +342,10 @@
 
 } } } // namespace JSC::B3::Air
 
+#if COMPILER(GCC) && ASSERT_DISABLED
+#pragma GCC diagnostic pop
+#endif // COMPILER(GCC) && ASSERT_DISABLED
+
 #endif // ENABLE(B3_JIT)
 
 #endif // AirCode_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to