Title: [198341] releases/WebKitGTK/webkit-2.12/Source/_javascript_Core
Revision
198341
Author
[email protected]
Date
2016-03-17 10:05:37 -0700 (Thu, 17 Mar 2016)

Log Message

Merge r198331 - REGRESSION(r197380): Build fails with new GCC and Clang
https://bugs.webkit.org/show_bug.cgi?id=155044

Reviewed by Michael Catanzaro.

In C++, std math functions ceil and floor are overloaded for double and float.
Without explicit cast or function pointer assignment, compilers cannot
determine which function address is used in the given context.

* b3/B3LowerMacrosAfterOptimizations.cpp:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog (198340 => 198341)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-03-17 17:04:03 UTC (rev 198340)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-03-17 17:05:37 UTC (rev 198341)
@@ -1,3 +1,16 @@
+2016-03-17  Yusuke Suzuki  <[email protected]>
+
+        REGRESSION(r197380): Build fails with new GCC and Clang
+        https://bugs.webkit.org/show_bug.cgi?id=155044
+
+        Reviewed by Michael Catanzaro.
+
+        In C++, std math functions ceil and floor are overloaded for double and float.
+        Without explicit cast or function pointer assignment, compilers cannot
+        determine which function address is used in the given context.
+
+        * b3/B3LowerMacrosAfterOptimizations.cpp:
+
 2016-03-08  Andreas Kling  <[email protected]>
 
         WeakBlock::visit() should check for a WeakHandleOwner before consulting mark bits.

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/b3/B3LowerMacrosAfterOptimizations.cpp (198340 => 198341)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/b3/B3LowerMacrosAfterOptimizations.cpp	2016-03-17 17:04:03 UTC (rev 198340)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/b3/B3LowerMacrosAfterOptimizations.cpp	2016-03-17 17:05:37 UTC (rev 198341)
@@ -92,9 +92,10 @@
                     break;
 
                 Value* functionAddress = nullptr;
-                if (m_value->type() == Double)
-                    functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, ceil);
-                else if (m_value->type() == Float)
+                if (m_value->type() == Double) {
+                    double (*ceilDouble)(double) = ceil;
+                    functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, ceilDouble);
+                } else if (m_value->type() == Float)
                     functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, ceilf);
                 else
                     RELEASE_ASSERT_NOT_REACHED();
@@ -113,9 +114,10 @@
                     break;
 
                 Value* functionAddress = nullptr;
-                if (m_value->type() == Double)
-                    functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, floor);
-                else if (m_value->type() == Float)
+                if (m_value->type() == Double) {
+                    double (*floorDouble)(double) = floor;
+                    functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, floorDouble);
+                } else if (m_value->type() == Float)
                     functionAddress = m_insertionSet.insert<ConstPtrValue>(m_index, m_origin, floorf);
                 else
                     RELEASE_ASSERT_NOT_REACHED();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to