Title: [293018] trunk/Source/_javascript_Core
Revision
293018
Author
ysuz...@apple.com
Date
2022-04-19 09:45:18 -0700 (Tue, 19 Apr 2022)

Log Message

Unreviewed, do not use RELEASE_ASSERT_NOT_REACHED in super hot path to suppress warnings
https://bugs.webkit.org/show_bug.cgi?id=239290

* bytecode/PropertyCondition.cpp:
(JSC::watchabilityToConcurrency):
* runtime/JSObject.h:
(JSC::JSObject::getDirect const):
* runtime/Structure.h:
(JSC::Structure::get):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (293017 => 293018)


--- trunk/Source/_javascript_Core/ChangeLog	2022-04-19 15:58:10 UTC (rev 293017)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-04-19 16:45:18 UTC (rev 293018)
@@ -1,3 +1,15 @@
+2022-04-19  Yusuke Suzuki  <ysuz...@apple.com>
+
+        Unreviewed, do not use RELEASE_ASSERT_NOT_REACHED in super hot path to suppress warnings
+        https://bugs.webkit.org/show_bug.cgi?id=239290
+
+        * bytecode/PropertyCondition.cpp:
+        (JSC::watchabilityToConcurrency):
+        * runtime/JSObject.h:
+        (JSC::JSObject::getDirect const):
+        * runtime/Structure.h:
+        (JSC::Structure::get):
+
 2022-04-19  Martin Robinson  <mrobin...@webkit.org>
 
         Fix the address sanitizer build when building with gcc

Modified: trunk/Source/_javascript_Core/bytecode/PropertyCondition.cpp (293017 => 293018)


--- trunk/Source/_javascript_Core/bytecode/PropertyCondition.cpp	2022-04-19 15:58:10 UTC (rev 293017)
+++ trunk/Source/_javascript_Core/bytecode/PropertyCondition.cpp	2022-04-19 16:45:18 UTC (rev 293018)
@@ -265,6 +265,7 @@
     RELEASE_ASSERT_NOT_REACHED();
 }
 
+IGNORE_RETURN_TYPE_WARNINGS_BEGIN
 static ALWAYS_INLINE Concurrency watchabilityToConcurrency(PropertyCondition::WatchabilityEffort effort)
 {
     switch (effort) {
@@ -273,8 +274,8 @@
     case PropertyCondition::WatchabilityEffort::MakeNoChanges:
         return Concurrency::ConcurrentThread;
     }
-    RELEASE_ASSERT_NOT_REACHED();
 }
+IGNORE_RETURN_TYPE_WARNINGS_END
 
 bool PropertyCondition::validityRequiresImpurePropertyWatchpoint(Structure* structure) const
 {

Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (293017 => 293018)


--- trunk/Source/_javascript_Core/runtime/JSObject.h	2022-04-19 15:58:10 UTC (rev 293017)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h	2022-04-19 16:45:18 UTC (rev 293018)
@@ -1406,6 +1406,7 @@
 // past structure then it should be valid for any new structure. However, we may sometimes
 // shrink the butterfly when we are holding the Structure's ConcurrentJSLock, such as when we
 // flatten an object.
+IGNORE_RETURN_TYPE_WARNINGS_BEGIN
 ALWAYS_INLINE JSValue JSObject::getDirect(Concurrency concurrency, Structure* expectedStructure, PropertyOffset offset) const
 {
     switch (concurrency) {
@@ -1415,8 +1416,8 @@
     case Concurrency::ConcurrentThread:
         return getDirectConcurrently(expectedStructure, offset);
     }
-    RELEASE_ASSERT_NOT_REACHED();
 }
+IGNORE_RETURN_TYPE_WARNINGS_END
 
 inline JSValue JSObject::getDirectConcurrently(Structure* structure, PropertyOffset offset) const
 {

Modified: trunk/Source/_javascript_Core/runtime/Structure.h (293017 => 293018)


--- trunk/Source/_javascript_Core/runtime/Structure.h	2022-04-19 15:58:10 UTC (rev 293017)
+++ trunk/Source/_javascript_Core/runtime/Structure.h	2022-04-19 16:45:18 UTC (rev 293018)
@@ -518,6 +518,7 @@
     template<typename Functor>
     void forEachProperty(VM&, const Functor&);
 
+    IGNORE_RETURN_TYPE_WARNINGS_BEGIN
     ALWAYS_INLINE PropertyOffset get(VM& vm, Concurrency concurrency, UniquedStringImpl* uid, unsigned& attributes)
     {
         switch (concurrency) {
@@ -527,9 +528,10 @@
         case Concurrency::ConcurrentThread:
             return getConcurrently(uid, attributes);
         }
-        RELEASE_ASSERT_NOT_REACHED();
     }
+    IGNORE_RETURN_TYPE_WARNINGS_END
 
+    IGNORE_RETURN_TYPE_WARNINGS_BEGIN
     ALWAYS_INLINE PropertyOffset get(VM& vm, Concurrency concurrency, UniquedStringImpl* uid)
     {
         switch (concurrency) {
@@ -539,8 +541,8 @@
         case Concurrency::ConcurrentThread:
             return getConcurrently(uid);
         }
-        RELEASE_ASSERT_NOT_REACHED();
     }
+    IGNORE_RETURN_TYPE_WARNINGS_END
     
     PropertyOffset getConcurrently(UniquedStringImpl* uid);
     PropertyOffset getConcurrently(UniquedStringImpl* uid, unsigned& attributes);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to