Title: [207659] trunk/Source/_javascript_Core
Revision
207659
Author
[email protected]
Date
2016-10-20 23:00:48 -0700 (Thu, 20 Oct 2016)

Log Message

Fix JSC cast-align compiler warnings on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=163744

Reviewed by Mark Lam.

Use the reinterpret_cast_ptr workaround in a few places where
the cast alignment warning is being thrown by the GCC compiler
when compiling for the ARMv7 architecture.

* heap/Heap.cpp:
(JSC::Zombify::visit):
* heap/HeapCell.h:
(JSC::HeapCell::zap):
(JSC::HeapCell::isZapped):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::Handle::specializedSweep):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (207658 => 207659)


--- trunk/Source/_javascript_Core/ChangeLog	2016-10-21 05:30:53 UTC (rev 207658)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-10-21 06:00:48 UTC (rev 207659)
@@ -1,3 +1,22 @@
+2016-10-20  Zan Dobersek  <[email protected]>
+
+        Fix JSC cast-align compiler warnings on ARMv7
+        https://bugs.webkit.org/show_bug.cgi?id=163744
+
+        Reviewed by Mark Lam.
+
+        Use the reinterpret_cast_ptr workaround in a few places where
+        the cast alignment warning is being thrown by the GCC compiler
+        when compiling for the ARMv7 architecture.
+
+        * heap/Heap.cpp:
+        (JSC::Zombify::visit):
+        * heap/HeapCell.h:
+        (JSC::HeapCell::zap):
+        (JSC::HeapCell::isZapped):
+        * heap/MarkedBlock.cpp:
+        (JSC::MarkedBlock::Handle::specializedSweep):
+
 2016-10-20  Filip Pizlo  <[email protected]>
 
         The tracking of the coarse-grain Heap state (allocating or not, collector or not, eden vs full) should respect the orthogonality between allocating and collecting

Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (207658 => 207659)


--- trunk/Source/_javascript_Core/heap/Heap.cpp	2016-10-21 05:30:53 UTC (rev 207658)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp	2016-10-21 06:00:48 UTC (rev 207659)
@@ -1431,7 +1431,7 @@
 public:
     inline void visit(HeapCell* cell) const
     {
-        void** current = reinterpret_cast<void**>(cell);
+        void** current = reinterpret_cast_ptr<void**>(cell);
 
         // We want to maintain zapped-ness because that's how we know if we've called 
         // the destructor.

Modified: trunk/Source/_javascript_Core/heap/HeapCell.h (207658 => 207659)


--- trunk/Source/_javascript_Core/heap/HeapCell.h	2016-10-21 05:30:53 UTC (rev 207658)
+++ trunk/Source/_javascript_Core/heap/HeapCell.h	2016-10-21 06:00:48 UTC (rev 207659)
@@ -45,8 +45,8 @@
     
     HeapCell() { }
     
-    void zap() { *reinterpret_cast<uintptr_t**>(this) = 0; }
-    bool isZapped() const { return !*reinterpret_cast<uintptr_t* const*>(this); }
+    void zap() { *reinterpret_cast_ptr<uintptr_t**>(this) = 0; }
+    bool isZapped() const { return !*reinterpret_cast_ptr<uintptr_t* const*>(this); }
     
     bool isLargeAllocation() const;
     CellContainer cellContainer() const;

Modified: trunk/Source/_javascript_Core/heap/MarkedBlock.cpp (207658 => 207659)


--- trunk/Source/_javascript_Core/heap/MarkedBlock.cpp	2016-10-21 05:30:53 UTC (rev 207658)
+++ trunk/Source/_javascript_Core/heap/MarkedBlock.cpp	2016-10-21 06:00:48 UTC (rev 207659)
@@ -137,7 +137,7 @@
             static_cast<JSCell*>(cell)->callDestructor(*vm());
 
         if (sweepMode == SweepToFreeList) {
-            FreeCell* freeCell = reinterpret_cast<FreeCell*>(cell);
+            FreeCell* freeCell = reinterpret_cast_ptr<FreeCell*>(cell);
             if (scribbleMode == Scribble)
                 scribble(freeCell, cellSize());
             freeCell->next = head;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to