Changeset 64302 in webkit for trunk/JavaScriptCore/wtf/Vector.h


Ignore:
Timestamp:
Jul 29, 2010, 12:52:22 PM (15 years ago)
Author:
Csaba Osztrogonác
Message:

2010-07-29 Gabor Loki <[email protected]>

Reviewed by Gavin Barraclough.

Avoid increasing required alignment of target type warning on ARM
https://bugs.webkit.org/show_bug.cgi?id=38045

The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
increases required alignment of target type warnings.
Casting the type of [pointer to Type2] object to void* bypasses the
warning.

  • assembler/ARMAssembler.cpp: (JSC::ARMAssembler::executableCopy):
  • assembler/AssemblerBuffer.h: (JSC::AssemblerBuffer::putShortUnchecked): (JSC::AssemblerBuffer::putIntUnchecked): (JSC::AssemblerBuffer::putInt64Unchecked):
  • jit/JITStubs.cpp:
  • pcre/pcre_compile.cpp: (jsRegExpCompile):
  • wtf/FastMalloc.cpp: (WTF::PageHeapAllocator::New): (WTF::TCMalloc_Central_FreeList::Populate):
  • wtf/MD5.cpp: (WTF::reverseBytes): (WTF::MD5::addBytes): (WTF::MD5::checksum):
  • wtf/StdLibExtras.h: (reinterpret_cast_ptr):
  • wtf/Vector.h: (WTF::VectorBuffer::inlineBuffer):
  • wtf/qt/StringQt.cpp: (WebCore::String::String):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Vector.h

    r62697 r64302  
    2525#include "Noncopyable.h"
    2626#include "NotFound.h"
     27#include "StdLibExtras.h"
    2728#include "ValueCheck.h"
    2829#include "VectorTraits.h"
     
    482483
    483484        static const size_t m_inlineBufferSize = inlineCapacity * sizeof(T);
    484         T* inlineBuffer() { return reinterpret_cast<T*>(m_inlineBuffer.buffer); }
     485        T* inlineBuffer() { return reinterpret_cast_ptr<T*>(m_inlineBuffer.buffer); }
    485486
    486487        AlignedBuffer<m_inlineBufferSize, WTF_ALIGN_OF(T)> m_inlineBuffer;
Note: See TracChangeset for help on using the changeset viewer.