Changeset 64327 in webkit
- Timestamp:
- Jul 29, 2010 6:27:24 PM (14 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r64320 r64327 1 2010-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 1 31 2010-07-29 Michael Saboff <msaboff@apple.com> 2 32 -
trunk/JavaScriptCore/assembler/ARMAssembler.cpp
r64302 r64327 356 356 // The last bit is set if the constant must be placed on constant pool. 357 357 int pos = (*iter) & (~0x1); 358 ARMWord* ldrAddr = reinterpret_cast _ptr<ARMWord*>(data + pos);358 ARMWord* ldrAddr = reinterpret_cast<ARMWord*>(data + pos); 359 359 ARMWord* addr = getLdrImmAddress(ldrAddr); 360 360 if (*addr != InvalidBranchTarget) { 361 361 if (!(*iter & 1)) { 362 int diff = reinterpret_cast _ptr<ARMWord*>(data + *addr) - (ldrAddr + DefaultPrefetching);362 int diff = reinterpret_cast<ARMWord*>(data + *addr) - (ldrAddr + DefaultPrefetching); 363 363 364 364 if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) { -
trunk/JavaScriptCore/assembler/AssemblerBuffer.h
r64302 r64327 34 34 #include <wtf/Assertions.h> 35 35 #include <wtf/FastMalloc.h> 36 #include <wtf/StdLibExtras.h>37 36 38 37 namespace JSC { … … 83 82 { 84 83 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; 86 85 m_size += 2; 87 86 } … … 97 96 { 98 97 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; 100 99 m_size += 4; 101 100 } … … 104 103 { 105 104 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; 107 106 m_size += 8; 108 107 } -
trunk/JavaScriptCore/jit/JITStubs.cpp
r64302 r64327 987 987 }; 988 988 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) 990 990 #define STUB_SET_RETURN_ADDRESS(returnAddress) stackHack.savedReturnAddress = ReturnAddressPtr(returnAddress) 991 991 #define STUB_RETURN_ADDRESS stackHack.savedReturnAddress … … 993 993 #else 994 994 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) 996 996 #define STUB_SET_RETURN_ADDRESS(returnAddress) *stackFrame.returnAddressSlot() = ReturnAddressPtr(returnAddress) 997 997 #define STUB_RETURN_ADDRESS *stackFrame.returnAddressSlot() -
trunk/JavaScriptCore/pcre/pcre_compile.cpp
r64302 r64327 50 50 #include <wtf/FastMalloc.h> 51 51 #include <wtf/FixedArray.h> 52 #include <wtf/StdLibExtras.h>53 52 54 53 using namespace WTF; … … 2592 2591 size = stringOffset + patternLength * sizeof(UChar); 2593 2592 #endif 2594 JSRegExp* re = reinterpret_cast _ptr<JSRegExp*>(new char[size]);2593 JSRegExp* re = reinterpret_cast<JSRegExp*>(new char[size]); 2595 2594 2596 2595 if (!re) -
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r64302 r64327 83 83 #include <pthread.h> 84 84 #endif 85 #include <wtf/StdLibExtras.h>86 85 87 86 #ifndef NO_TCMALLOC_SAMPLES … … 1017 1016 CRASH(); 1018 1017 1019 * reinterpret_cast_ptr<void**>(new_allocation)= allocated_regions_;1018 *(void**)new_allocation = allocated_regions_; 1020 1019 allocated_regions_ = new_allocation; 1021 1020 free_area_ = new_allocation + kAlignedSize; … … 2712 2711 while ((nptr = ptr + size) <= limit) { 2713 2712 *tail = ptr; 2714 tail = reinterpret_cast _ptr<void**>(ptr);2713 tail = reinterpret_cast<void**>(ptr); 2715 2714 ptr = nptr; 2716 2715 num++; -
trunk/JavaScriptCore/wtf/MD5.cpp
r64302 r64327 55 55 #include "text/CString.h" 56 56 #endif 57 #include <wtf/StdLibExtras.h>58 57 59 58 namespace WTF { … … 105 104 uint32_t t = static_cast<uint32_t>(buf[3] << 8 | buf[2]) << 16 | buf[1] << 8 | buf[0]; 106 105 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; 108 107 buf += 4; 109 108 } while (--longs); … … 240 239 memcpy(p, buf, t); 241 240 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. 243 242 buf += t; 244 243 length -= t; … … 250 249 memcpy(m_in, buf, 64); 251 250 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. 253 252 buf += 64; 254 253 length -= 64; … … 277 276 memset(p, 0, count); 278 277 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. 280 279 281 280 // Now fill the next block with 56 bytes … … 289 288 // Append length in bits and transform 290 289 // 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)); 295 294 reverseBytes(reinterpret_cast<uint8_t*>(m_buf), 4); 296 295 -
trunk/JavaScriptCore/wtf/StdLibExtras.h
r64302 r64327 52 52 #define STRINGIZE_VALUE_OF(exp) STRINGIZE(exp) 53 53 54 /*55 * The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where56 * 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=3804562 * - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4397663 */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 #else78 #define reinterpret_cast_ptr reinterpret_cast79 #endif80 81 54 namespace WTF { 82 55 -
trunk/JavaScriptCore/wtf/Vector.h
r64302 r64327 25 25 #include "Noncopyable.h" 26 26 #include "NotFound.h" 27 #include "StdLibExtras.h"28 27 #include "ValueCheck.h" 29 28 #include "VectorTraits.h" … … 483 482 484 483 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); } 486 485 487 486 AlignedBuffer<m_inlineBufferSize, WTF_ALIGN_OF(T)> m_inlineBuffer; -
trunk/JavaScriptCore/wtf/qt/StringQt.cpp
r64302 r64327 26 26 #include "config.h" 27 27 28 #include <wtf/StdLibExtras.h>29 28 #include <wtf/text/WTFString.h> 30 29 … … 38 37 if (qstr.isNull()) 39 38 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()); 41 40 } 42 41 … … 45 44 if (!ref.string()) 46 45 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()); 48 47 } 49 48
Note: See TracChangeset
for help on using the changeset viewer.