Changeset 64327 in webkit


Ignore:
Timestamp:
Jul 29, 2010 6:27:24 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r64302.
http://trac.webkit.org/changeset/64302
https://bugs.webkit.org/show_bug.cgi?id=43223

Assertion is bogus (Requested by olliej on #webkit).

  • 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:
  • wtf/Vector.h: (WTF::VectorBuffer::inlineBuffer):
  • wtf/qt/StringQt.cpp: (WebCore::String::String):
Location:
trunk/JavaScriptCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r64320 r64327  
     12010-07-29  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r64302.
     4        http://trac.webkit.org/changeset/64302
     5        https://bugs.webkit.org/show_bug.cgi?id=43223
     6
     7        Assertion is bogus (Requested by olliej on #webkit).
     8
     9        * assembler/ARMAssembler.cpp:
     10        (JSC::ARMAssembler::executableCopy):
     11        * assembler/AssemblerBuffer.h:
     12        (JSC::AssemblerBuffer::putShortUnchecked):
     13        (JSC::AssemblerBuffer::putIntUnchecked):
     14        (JSC::AssemblerBuffer::putInt64Unchecked):
     15        * jit/JITStubs.cpp:
     16        * pcre/pcre_compile.cpp:
     17        (jsRegExpCompile):
     18        * wtf/FastMalloc.cpp:
     19        (WTF::PageHeapAllocator::New):
     20        (WTF::TCMalloc_Central_FreeList::Populate):
     21        * wtf/MD5.cpp:
     22        (WTF::reverseBytes):
     23        (WTF::MD5::addBytes):
     24        (WTF::MD5::checksum):
     25        * wtf/StdLibExtras.h:
     26        * wtf/Vector.h:
     27        (WTF::VectorBuffer::inlineBuffer):
     28        * wtf/qt/StringQt.cpp:
     29        (WebCore::String::String):
     30
    1312010-07-29  Michael Saboff  <msaboff@apple.com>
    232
  • trunk/JavaScriptCore/assembler/ARMAssembler.cpp

    r64302 r64327  
    356356        // The last bit is set if the constant must be placed on constant pool.
    357357        int pos = (*iter) & (~0x1);
    358         ARMWord* ldrAddr = reinterpret_cast_ptr<ARMWord*>(data + pos);
     358        ARMWord* ldrAddr = reinterpret_cast<ARMWord*>(data + pos);
    359359        ARMWord* addr = getLdrImmAddress(ldrAddr);
    360360        if (*addr != InvalidBranchTarget) {
    361361            if (!(*iter & 1)) {
    362                 int diff = reinterpret_cast_ptr<ARMWord*>(data + *addr) - (ldrAddr + DefaultPrefetching);
     362                int diff = reinterpret_cast<ARMWord*>(data + *addr) - (ldrAddr + DefaultPrefetching);
    363363
    364364                if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) {
  • trunk/JavaScriptCore/assembler/AssemblerBuffer.h

    r64302 r64327  
    3434#include <wtf/Assertions.h>
    3535#include <wtf/FastMalloc.h>
    36 #include <wtf/StdLibExtras.h>
    3736
    3837namespace JSC {
     
    8382        {
    8483            ASSERT(!(m_size > m_capacity - 4));
    85             *reinterpret_cast_ptr<short*>(&m_buffer[m_size]) = value;
     84            *reinterpret_cast<short*>(&m_buffer[m_size]) = value;
    8685            m_size += 2;
    8786        }
     
    9796        {
    9897            ASSERT(!(m_size > m_capacity - 4));
    99             *reinterpret_cast_ptr<int*>(&m_buffer[m_size]) = value;
     98            *reinterpret_cast<int*>(&m_buffer[m_size]) = value;
    10099            m_size += 4;
    101100        }
     
    104103        {
    105104            ASSERT(!(m_size > m_capacity - 8));
    106             *reinterpret_cast_ptr<int64_t*>(&m_buffer[m_size]) = value;
     105            *reinterpret_cast<int64_t*>(&m_buffer[m_size]) = value;
    107106            m_size += 8;
    108107        }
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r64302 r64327  
    987987};
    988988
    989 #define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast_ptr<JITStackFrame*>(STUB_ARGS); StackHack stackHack(stackFrame)
     989#define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); StackHack stackHack(stackFrame)
    990990#define STUB_SET_RETURN_ADDRESS(returnAddress) stackHack.savedReturnAddress = ReturnAddressPtr(returnAddress)
    991991#define STUB_RETURN_ADDRESS stackHack.savedReturnAddress
     
    993993#else
    994994
    995 #define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast_ptr<JITStackFrame*>(STUB_ARGS)
     995#define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS)
    996996#define STUB_SET_RETURN_ADDRESS(returnAddress) *stackFrame.returnAddressSlot() = ReturnAddressPtr(returnAddress)
    997997#define STUB_RETURN_ADDRESS *stackFrame.returnAddressSlot()
  • trunk/JavaScriptCore/pcre/pcre_compile.cpp

    r64302 r64327  
    5050#include <wtf/FastMalloc.h>
    5151#include <wtf/FixedArray.h>
    52 #include <wtf/StdLibExtras.h>
    5352
    5453using namespace WTF;
     
    25922591    size = stringOffset + patternLength * sizeof(UChar);
    25932592#endif
    2594     JSRegExp* re = reinterpret_cast_ptr<JSRegExp*>(new char[size]);
     2593    JSRegExp* re = reinterpret_cast<JSRegExp*>(new char[size]);
    25952594   
    25962595    if (!re)
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r64302 r64327  
    8383#include <pthread.h>
    8484#endif
    85 #include <wtf/StdLibExtras.h>
    8685
    8786#ifndef NO_TCMALLOC_SAMPLES
     
    10171016          CRASH();
    10181017
    1019         *reinterpret_cast_ptr<void**>(new_allocation) = allocated_regions_;
     1018        *(void**)new_allocation = allocated_regions_;
    10201019        allocated_regions_ = new_allocation;
    10211020        free_area_ = new_allocation + kAlignedSize;
     
    27122711  while ((nptr = ptr + size) <= limit) {
    27132712    *tail = ptr;
    2714     tail = reinterpret_cast_ptr<void**>(ptr);
     2713    tail = reinterpret_cast<void**>(ptr);
    27152714    ptr = nptr;
    27162715    num++;
  • trunk/JavaScriptCore/wtf/MD5.cpp

    r64302 r64327  
    5555#include "text/CString.h"
    5656#endif
    57 #include <wtf/StdLibExtras.h>
    5857
    5958namespace WTF {
     
    105104        uint32_t t = static_cast<uint32_t>(buf[3] << 8 | buf[2]) << 16 | buf[1] << 8 | buf[0];
    106105        ASSERT_WITH_MESSAGE(!(reinterpret_cast<uintptr_t>(buf) % sizeof(t)), "alignment error of buf");
    107         *reinterpret_cast_ptr<uint32_t *>(buf) = t;
     106        *reinterpret_cast<uint32_t *>(buf) = t;
    108107        buf += 4;
    109108    } while (--longs);
     
    240239        memcpy(p, buf, t);
    241240        reverseBytes(m_in, 16);
    242         MD5Transform(m_buf, reinterpret_cast_ptr<uint32_t*>(m_in)); // m_in is 4-byte aligned.
     241        MD5Transform(m_buf, reinterpret_cast<uint32_t*>(m_in)); // m_in is 4-byte aligned.
    243242        buf += t;
    244243        length -= t;
     
    250249        memcpy(m_in, buf, 64);
    251250        reverseBytes(m_in, 16);
    252         MD5Transform(m_buf, reinterpret_cast_ptr<uint32_t*>(m_in)); // m_in is 4-byte aligned.
     251        MD5Transform(m_buf, reinterpret_cast<uint32_t*>(m_in)); // m_in is 4-byte aligned.
    253252        buf += 64;
    254253        length -= 64;
     
    277276        memset(p, 0, count);
    278277        reverseBytes(m_in, 16);
    279         MD5Transform(m_buf, reinterpret_cast_ptr<uint32_t *>(m_in)); // m_in is 4-byte aligned.
     278        MD5Transform(m_buf, reinterpret_cast<uint32_t *>(m_in)); // m_in is 4-byte aligned.
    280279
    281280        // Now fill the next block with 56 bytes
     
    289288    // Append length in bits and transform
    290289    // m_in is 4-byte aligned.
    291     (reinterpret_cast_ptr<uint32_t*>(m_in))[14] = m_bits[0];
    292     (reinterpret_cast_ptr<uint32_t*>(m_in))[15] = m_bits[1];
    293 
    294     MD5Transform(m_buf, reinterpret_cast_ptr<uint32_t*>(m_in));
     290    (reinterpret_cast<uint32_t*>(m_in))[14] = m_bits[0];
     291    (reinterpret_cast<uint32_t*>(m_in))[15] = m_bits[1];
     292
     293    MD5Transform(m_buf, reinterpret_cast<uint32_t*>(m_in));
    295294    reverseBytes(reinterpret_cast<uint8_t*>(m_buf), 4);
    296295
  • trunk/JavaScriptCore/wtf/StdLibExtras.h

    r64302 r64327  
    5252#define STRINGIZE_VALUE_OF(exp) STRINGIZE(exp)
    5353
    54 /*
    55  * The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
    56  * sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM with GCC:
    57  * increases required alignment of target type.
    58  *
    59  * An implicit or an extra static_cast<void*> bypasses the warning.
    60  * For more info see the following bugzilla entries:
    61  * - https://bugs.webkit.org/show_bug.cgi?id=38045
    62  * - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43976
    63  */
    64 #if CPU(ARM) && COMPILER(GCC)
    65 template<typename T>
    66 T reinterpret_cast_ptr(void* ptr)
    67 {
    68     ASSERT(!(reinterpret_cast<unsigned int>(ptr) % __alignof__(T)));
    69     return reinterpret_cast<T>(ptr);
    70 }
    71 template<typename T>
    72 T reinterpret_cast_ptr(const void* ptr)
    73 {
    74     ASSERT(!(reinterpret_cast<unsigned int>(ptr) % __alignof__(T)));
    75     return reinterpret_cast<T>(ptr);
    76 }
    77 #else
    78 #define reinterpret_cast_ptr reinterpret_cast
    79 #endif
    80 
    8154namespace WTF {
    8255
  • trunk/JavaScriptCore/wtf/Vector.h

    r64302 r64327  
    2525#include "Noncopyable.h"
    2626#include "NotFound.h"
    27 #include "StdLibExtras.h"
    2827#include "ValueCheck.h"
    2928#include "VectorTraits.h"
     
    483482
    484483        static const size_t m_inlineBufferSize = inlineCapacity * sizeof(T);
    485         T* inlineBuffer() { return reinterpret_cast_ptr<T*>(m_inlineBuffer.buffer); }
     484        T* inlineBuffer() { return reinterpret_cast<T*>(m_inlineBuffer.buffer); }
    486485
    487486        AlignedBuffer<m_inlineBufferSize, WTF_ALIGN_OF(T)> m_inlineBuffer;
  • trunk/JavaScriptCore/wtf/qt/StringQt.cpp

    r64302 r64327  
    2626#include "config.h"
    2727
    28 #include <wtf/StdLibExtras.h>
    2928#include <wtf/text/WTFString.h>
    3029
     
    3837    if (qstr.isNull())
    3938        return;
    40     m_impl = StringImpl::create(reinterpret_cast_ptr<const UChar*>(qstr.constData()), qstr.length());
     39    m_impl = StringImpl::create(reinterpret_cast<const UChar*>(qstr.constData()), qstr.length());
    4140}
    4241
     
    4544    if (!ref.string())
    4645        return;
    47     m_impl = StringImpl::create(reinterpret_cast_ptr<const UChar*>(ref.unicode()), ref.length());
     46    m_impl = StringImpl::create(reinterpret_cast<const UChar*>(ref.unicode()), ref.length());
    4847}
    4948
Note: See TracChangeset for help on using the changeset viewer.