Title: [231079] trunk/Source
Revision
231079
Author
[email protected]
Date
2018-04-26 15:59:04 -0700 (Thu, 26 Apr 2018)

Log Message

Gardening: Speculative build fix for Windows.
https://bugs.webkit.org/show_bug.cgi?id=184976
<rdar://problem/39723901>

Not reviewed.

Source/_javascript_Core:

* runtime/JSCPtrTag.h:

Source/WebCore:

* cssjit/CSSPtrTag.h:

Source/WTF:

* wtf/PtrTag.h:
(WTF::makePtrTagHash): Undo last speculative build fix that did not work for 64-bit.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (231078 => 231079)


--- trunk/Source/_javascript_Core/ChangeLog	2018-04-26 22:50:55 UTC (rev 231078)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-04-26 22:59:04 UTC (rev 231079)
@@ -1,5 +1,15 @@
 2018-04-26  Mark Lam  <[email protected]>
 
+        Gardening: Speculative build fix for Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=184976
+        <rdar://problem/39723901>
+
+        Not reviewed.
+
+        * runtime/JSCPtrTag.h:
+
+2018-04-26  Mark Lam  <[email protected]>
+
         Gardening: Windows build fix.
 
         Not reviewed.

Modified: trunk/Source/_javascript_Core/runtime/JSCPtrTag.h (231078 => 231079)


--- trunk/Source/_javascript_Core/runtime/JSCPtrTag.h	2018-04-26 22:50:55 UTC (rev 231078)
+++ trunk/Source/_javascript_Core/runtime/JSCPtrTag.h	2018-04-26 22:59:04 UTC (rev 231079)
@@ -53,7 +53,16 @@
     v(YarrMatchOnly16BitPtrTag) \
     v(YarrBacktrackPtrTag) \
 
+#if COMPILER(MSVC)
+#pragma warning(push)
+#pragma warning(disable:4307)
+#endif
+
 FOR_EACH_JSC_PTRTAG(WTF_DECLARE_PTRTAG)
 
+#if COMPILER(MSVC)
+#pragma warning(pop)
+#endif
+
 } // namespace JSC
 

Modified: trunk/Source/WTF/ChangeLog (231078 => 231079)


--- trunk/Source/WTF/ChangeLog	2018-04-26 22:50:55 UTC (rev 231078)
+++ trunk/Source/WTF/ChangeLog	2018-04-26 22:59:04 UTC (rev 231079)
@@ -1,3 +1,14 @@
+2018-04-26  Mark Lam  <[email protected]>
+
+        Gardening: Speculative build fix for Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=184976
+        <rdar://problem/39723901>
+
+        Not reviewed.
+
+        * wtf/PtrTag.h:
+        (WTF::makePtrTagHash): Undo last speculative build fix that did not work for 64-bit.
+
 2018-04-26  Andy VanWagoner  <[email protected]>
 
         [INTL] Implement Intl.PluralRules

Modified: trunk/Source/WTF/wtf/PtrTag.h (231078 => 231079)


--- trunk/Source/WTF/wtf/PtrTag.h	2018-04-26 22:50:55 UTC (rev 231078)
+++ trunk/Source/WTF/wtf/PtrTag.h	2018-04-26 22:59:04 UTC (rev 231079)
@@ -48,16 +48,9 @@
 template<size_t N>
 constexpr uintptr_t makePtrTagHash(const char (&str)[N])
 {
-    // The only reason for the following dance with casting to result64Bit and
-    // back is because, on 32-bit, MSVC will complain about "C4307: integral
-    // constant overflow" but not allow us to disable the warning for all clients
-    // of this function.
     uintptr_t result = 134775813;
-    for (size_t i = 0; i < N; ++i) {
-        uint64_t result64Bit = static_cast<uint64_t>(result);
-        result64Bit += ((result64Bit * str[i]) ^ (result64Bit >> 16));
-        result = static_cast<uintptr_t>(result64Bit);
-    }
+    for (size_t i = 0; i < N; ++i)
+        result += ((result * str[i]) ^ (result >> 16));
     return result & 0xffff;
 }
 
@@ -71,8 +64,17 @@
 static_assert(static_cast<uintptr_t>(NoPtrTag) == static_cast<uintptr_t>(0), "");
 static_assert(static_cast<uintptr_t>(CFunctionPtrTag) == static_cast<uintptr_t>(1), "");
 
+#if COMPILER(MSVC)
+#pragma warning(push)
+#pragma warning(disable:4307)
+#endif
+
 FOR_EACH_ADDITIONAL_WTF_PTRTAG(WTF_DECLARE_PTRTAG)
 
+#if COMPILER(MSVC)
+#pragma warning(pop)
+#endif
+
 #if !USE(POINTER_PROFILING)
 
 inline const char* tagForPtr(const void*) { return "<no tag>"; }

Modified: trunk/Source/WebCore/ChangeLog (231078 => 231079)


--- trunk/Source/WebCore/ChangeLog	2018-04-26 22:50:55 UTC (rev 231078)
+++ trunk/Source/WebCore/ChangeLog	2018-04-26 22:59:04 UTC (rev 231079)
@@ -1,3 +1,13 @@
+2018-04-26  Mark Lam  <[email protected]>
+
+        Gardening: Speculative build fix for Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=184976
+        <rdar://problem/39723901>
+
+        Not reviewed.
+
+        * cssjit/CSSPtrTag.h:
+
 2018-04-26  Brent Fulgham  <[email protected]>
 
         Show punycode if URL contains Latin small letter o with dot below character

Modified: trunk/Source/WebCore/cssjit/CSSPtrTag.h (231078 => 231079)


--- trunk/Source/WebCore/cssjit/CSSPtrTag.h	2018-04-26 22:50:55 UTC (rev 231078)
+++ trunk/Source/WebCore/cssjit/CSSPtrTag.h	2018-04-26 22:59:04 UTC (rev 231079)
@@ -35,8 +35,17 @@
     v(CSSSelectorPtrTag) \
     v(CSSOperationPtrTag) \
 
+#if COMPILER(MSVC)
+#pragma warning(push)
+#pragma warning(disable:4307)
+#endif
+
 FOR_EACH_CSS_PTRTAG(WTF_DECLARE_PTRTAG)
 
+#if COMPILER(MSVC)
+#pragma warning(pop)
+#endif
+
 } // namespace WebCore
 
 #endif // ENABLE(CSS_SELECTOR_JIT)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to