Title: [110342] trunk/Source/_javascript_Core
Revision
110342
Author
[email protected]
Date
2012-03-09 15:25:22 -0800 (Fri, 09 Mar 2012)

Log Message

WebKit compiled by gcc (Xcode 3.2.6) hangs while running DOM/Accessors.html
https://bugs.webkit.org/show_bug.cgi?id=80080

Reviewed by Filip Pizlo.

* bytecode/SamplingTool.cpp:
(JSC::SamplingRegion::Locker::Locker):
(JSC::SamplingRegion::Locker::~Locker):
* bytecode/SamplingTool.h:
(JSC::SamplingRegion::exchangeCurrent):
* wtf/Atomics.h:
(WTF):
(WTF::weakCompareAndSwap):
(WTF::weakCompareAndSwapUIntPtr):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (110341 => 110342)


--- trunk/Source/_javascript_Core/ChangeLog	2012-03-09 23:25:20 UTC (rev 110341)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-03-09 23:25:22 UTC (rev 110342)
@@ -1,3 +1,20 @@
+2012-03-09  Ryosuke Niwa  <[email protected]>
+
+        WebKit compiled by gcc (Xcode 3.2.6) hangs while running DOM/Accessors.html
+        https://bugs.webkit.org/show_bug.cgi?id=80080
+
+        Reviewed by Filip Pizlo.
+
+        * bytecode/SamplingTool.cpp:
+        (JSC::SamplingRegion::Locker::Locker):
+        (JSC::SamplingRegion::Locker::~Locker):
+        * bytecode/SamplingTool.h:
+        (JSC::SamplingRegion::exchangeCurrent):
+        * wtf/Atomics.h:
+        (WTF):
+        (WTF::weakCompareAndSwap):
+        (WTF::weakCompareAndSwapUIntPtr):
+
 2012-03-09  Gavin Barraclough  <[email protected]>
 
         REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN

Modified: trunk/Source/_javascript_Core/bytecode/SamplingTool.cpp (110341 => 110342)


--- trunk/Source/_javascript_Core/bytecode/SamplingTool.cpp	2012-03-09 23:25:20 UTC (rev 110341)
+++ trunk/Source/_javascript_Core/bytecode/SamplingTool.cpp	2012-03-09 23:25:22 UTC (rev 110342)
@@ -100,7 +100,7 @@
 #endif
             continue;
         }
-        if (WTF::weakCompareAndSwap(&s_currentOrReserved, previous, previous | 1))
+        if (WTF::weakCompareAndSwapUIntPtr(&s_currentOrReserved, previous, previous | 1))
             break;
     }
 }
@@ -113,7 +113,7 @@
     uintptr_t previous;
     do {
         previous = s_currentOrReserved;
-    } while (!WTF::weakCompareAndSwap(&s_currentOrReserved, previous, previous & ~1));
+    } while (!WTF::weakCompareAndSwapUIntPtr(&s_currentOrReserved, previous, previous & ~1));
 }
 
 void SamplingRegion::sample()

Modified: trunk/Source/_javascript_Core/bytecode/SamplingTool.h (110341 => 110342)


--- trunk/Source/_javascript_Core/bytecode/SamplingTool.h	2012-03-09 23:25:20 UTC (rev 110341)
+++ trunk/Source/_javascript_Core/bytecode/SamplingTool.h	2012-03-09 23:25:22 UTC (rev 110342)
@@ -148,7 +148,7 @@
                 if (previousPtr)
                     *previousPtr = bitwise_cast<SamplingRegion*>(previous);
                 
-                if (WTF::weakCompareAndSwap(&s_currentOrReserved, previous, bitwise_cast<uintptr_t>(current)))
+                if (WTF::weakCompareAndSwapUIntPtr(&s_currentOrReserved, previous, bitwise_cast<uintptr_t>(current)))
                     break;
             }
         }

Modified: trunk/Source/_javascript_Core/wtf/Atomics.h (110341 => 110342)


--- trunk/Source/_javascript_Core/wtf/Atomics.h	2012-03-09 23:25:20 UTC (rev 110341)
+++ trunk/Source/_javascript_Core/wtf/Atomics.h	2012-03-09 23:25:22 UTC (rev 110342)
@@ -118,7 +118,11 @@
 
 #endif
 
+#if COMPILER(GCC) && !COMPILER(CLANG) // Work around a gcc bug 
+inline bool weakCompareAndSwap(volatile unsigned* location, unsigned expected, unsigned newValue) 
+#else
 inline bool weakCompareAndSwap(unsigned* location, unsigned expected, unsigned newValue)
+#endif
 {
 #if ENABLE(COMPARE_AND_SWAP)
     bool result;
@@ -181,7 +185,7 @@
 #endif // ENABLE(COMPARE_AND_SWAP)
 }
 
-inline bool weakCompareAndSwap(volatile uintptr_t* location, uintptr_t expected, uintptr_t newValue)
+inline bool weakCompareAndSwapUIntPtr(volatile uintptr_t* location, uintptr_t expected, uintptr_t newValue)
 {
     return weakCompareAndSwap(reinterpret_cast<void*volatile*>(location), reinterpret_cast<void*>(expected), reinterpret_cast<void*>(newValue));
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to