Title: [231896] trunk/Source/WTF
Revision
231896
Author
za...@apple.com
Date
2018-05-17 07:29:46 -0700 (Thu, 17 May 2018)

Log Message

Add ASSERT_NOT_IMPLEMENTED_YET() macro
https://bugs.webkit.org/show_bug.cgi?id=185713

Reviewed by Antti Koivisto.

To mark unimplemented code paths.

* wtf/Assertions.cpp:
* wtf/Assertions.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (231895 => 231896)


--- trunk/Source/WTF/ChangeLog	2018-05-17 14:11:08 UTC (rev 231895)
+++ trunk/Source/WTF/ChangeLog	2018-05-17 14:29:46 UTC (rev 231896)
@@ -1,3 +1,15 @@
+2018-05-17  Zalan Bujtas  <za...@apple.com>
+
+        Add ASSERT_NOT_IMPLEMENTED_YET() macro
+        https://bugs.webkit.org/show_bug.cgi?id=185713
+
+        Reviewed by Antti Koivisto.
+
+        To mark unimplemented code paths.
+
+        * wtf/Assertions.cpp:
+        * wtf/Assertions.h:
+
 2018-05-16  Andy VanWagoner  <andy@vanwagoner.family>
 
         Add support for Intl NumberFormat formatToParts

Modified: trunk/Source/WTF/wtf/Assertions.cpp (231895 => 231896)


--- trunk/Source/WTF/wtf/Assertions.cpp	2018-05-17 14:11:08 UTC (rev 231895)
+++ trunk/Source/WTF/wtf/Assertions.cpp	2018-05-17 14:29:46 UTC (rev 231896)
@@ -199,6 +199,12 @@
 #endif
 }
 
+void WTFReportNotImplementedYet(const char* file, int line, const char* function)
+{
+    printf_stderr_common("NOT IMPLEMENTED YET\n");
+    printCallSite(file, line, function);
+}
+
 void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion)
 {
     if (assertion)

Modified: trunk/Source/WTF/wtf/Assertions.h (231895 => 231896)


--- trunk/Source/WTF/wtf/Assertions.h	2018-05-17 14:11:08 UTC (rev 231895)
+++ trunk/Source/WTF/wtf/Assertions.h	2018-05-17 14:29:46 UTC (rev 231896)
@@ -180,6 +180,7 @@
 #endif
 #endif
 
+WTF_EXPORT_PRIVATE void WTFReportNotImplementedYet(const char* file, int line, const char* function);
 WTF_EXPORT_PRIVATE void WTFReportAssertionFailure(const char* file, int line, const char* function, const char* assertion);
 WTF_EXPORT_PRIVATE void WTFReportAssertionFailureWithMessage(const char* file, int line, const char* function, const char* assertion, const char* format, ...) WTF_ATTRIBUTE_PRINTF(5, 6);
 WTF_EXPORT_PRIVATE void WTFReportArgumentAssertionFailure(const char* file, int line, const char* function, const char* argName, const char* assertion);
@@ -277,6 +278,7 @@
 #define ASSERT(assertion) ((void)0)
 #define ASSERT_AT(assertion, file, line, function) ((void)0)
 #define ASSERT_NOT_REACHED() ((void)0)
+#define ASSERT_NOT_IMPLEMENTED_YET() ((void)0)
 #define ASSERT_IMPLIES(condition, assertion) ((void)0)
 #define NO_RETURN_DUE_TO_ASSERT
 
@@ -316,6 +318,11 @@
     CRASH(); \
 } while (0)
 
+#define ASSERT_NOT_IMPLEMENTED_YET() do { \
+    WTFReportNotImplementedYet(__FILE__, __LINE__, WTF_PRETTY_FUNCTION); \
+    CRASH(); \
+} while (0)
+
 #define ASSERT_IMPLIES(condition, assertion) do { \
     if ((condition) && !(assertion)) { \
         WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #condition " => " #assertion); \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to