Changeset 207659 in webkit


Ignore:
Timestamp:
Oct 20, 2016 11:00:48 PM (7 years ago)
Author:
zandobersek@gmail.com
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):

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r207653 r207659  
     12016-10-20  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        Fix JSC cast-align compiler warnings on ARMv7
     4        https://bugs.webkit.org/show_bug.cgi?id=163744
     5
     6        Reviewed by Mark Lam.
     7
     8        Use the reinterpret_cast_ptr workaround in a few places where
     9        the cast alignment warning is being thrown by the GCC compiler
     10        when compiling for the ARMv7 architecture.
     11
     12        * heap/Heap.cpp:
     13        (JSC::Zombify::visit):
     14        * heap/HeapCell.h:
     15        (JSC::HeapCell::zap):
     16        (JSC::HeapCell::isZapped):
     17        * heap/MarkedBlock.cpp:
     18        (JSC::MarkedBlock::Handle::specializedSweep):
     19
    1202016-10-20  Filip Pizlo  <fpizlo@apple.com>
    221
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r207653 r207659  
    14321432    inline void visit(HeapCell* cell) const
    14331433    {
    1434         void** current = reinterpret_cast<void**>(cell);
     1434        void** current = reinterpret_cast_ptr<void**>(cell);
    14351435
    14361436        // We want to maintain zapped-ness because that's how we know if we've called
  • trunk/Source/JavaScriptCore/heap/HeapCell.h

    r205462 r207659  
    4646    HeapCell() { }
    4747   
    48     void zap() { *reinterpret_cast<uintptr_t**>(this) = 0; }
    49     bool isZapped() const { return !*reinterpret_cast<uintptr_t* const*>(this); }
     48    void zap() { *reinterpret_cast_ptr<uintptr_t**>(this) = 0; }
     49    bool isZapped() const { return !*reinterpret_cast_ptr<uintptr_t* const*>(this); }
    5050   
    5151    bool isLargeAllocation() const;
  • trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp

    r207179 r207659  
    138138
    139139        if (sweepMode == SweepToFreeList) {
    140             FreeCell* freeCell = reinterpret_cast<FreeCell*>(cell);
     140            FreeCell* freeCell = reinterpret_cast_ptr<FreeCell*>(cell);
    141141            if (scribbleMode == Scribble)
    142142                scribble(freeCell, cellSize());
Note: See TracChangeset for help on using the changeset viewer.