Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (113454 => 113455)
--- trunk/Source/_javascript_Core/ChangeLog 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-04-06 17:35:52 UTC (rev 113455)
@@ -1,3 +1,22 @@
+2012-04-06 Rob Buis <[email protected]>
+
+ Fix cast-align warnings in JSC
+ https://bugs.webkit.org/show_bug.cgi?id=80790
+
+ Reviewed by George Staikos.
+
+ * assembler/ARMv7Assembler.h:
+ (JSC::ARMv7Assembler::computeJumpType):
+ (JSC::ARMv7Assembler::link):
+ * assembler/LinkBuffer.h:
+ (JSC::LinkBuffer::linkCode):
+ * heap/MarkStack.cpp:
+ (JSC::SlotVisitor::copyAndAppend):
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::visitChildren):
+ * wtf/RefCountedArray.h:
+ (WTF::RefCountedArray::Header::payload):
+
2012-04-06 Darin Adler <[email protected]>
Streamline strtod and fix some related problems
Modified: trunk/Source/_javascript_Core/assembler/ARMv7Assembler.h (113454 => 113455)
--- trunk/Source/_javascript_Core/assembler/ARMv7Assembler.h 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/_javascript_Core/assembler/ARMv7Assembler.h 2012-04-06 17:35:52 UTC (rev 113455)
@@ -1830,29 +1830,29 @@
if (jumpType == JumpCondition) {
// 2-byte conditional T1
- const uint16_t* jumpT1Location = reinterpret_cast<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkJumpT1)));
+ const uint16_t* jumpT1Location = reinterpret_cast_ptr<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkJumpT1)));
if (canBeJumpT1(jumpT1Location, to))
return LinkJumpT1;
// 4-byte conditional T3
- const uint16_t* jumpT3Location = reinterpret_cast<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkJumpT3)));
+ const uint16_t* jumpT3Location = reinterpret_cast_ptr<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkJumpT3)));
if (canBeJumpT3(jumpT3Location, to, mayTriggerErrata)) {
if (!mayTriggerErrata)
return LinkJumpT3;
}
// 4-byte conditional T4 with IT
const uint16_t* conditionalJumpT4Location =
- reinterpret_cast<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkConditionalJumpT4)));
+ reinterpret_cast_ptr<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkConditionalJumpT4)));
if (canBeJumpT4(conditionalJumpT4Location, to, mayTriggerErrata)) {
if (!mayTriggerErrata)
return LinkConditionalJumpT4;
}
} else {
// 2-byte unconditional T2
- const uint16_t* jumpT2Location = reinterpret_cast<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkJumpT2)));
+ const uint16_t* jumpT2Location = reinterpret_cast_ptr<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkJumpT2)));
if (canBeJumpT2(jumpT2Location, to))
return LinkJumpT2;
// 4-byte unconditional T4
- const uint16_t* jumpT4Location = reinterpret_cast<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkJumpT4)));
+ const uint16_t* jumpT4Location = reinterpret_cast_ptr<const uint16_t*>(from - (paddingSize - JUMP_ENUM_SIZE(LinkJumpT4)));
if (canBeJumpT4(jumpT4Location, to, mayTriggerErrata)) {
if (!mayTriggerErrata)
return LinkJumpT4;
@@ -1891,25 +1891,25 @@
{
switch (record.linkType()) {
case LinkJumpT1:
- linkJumpT1(record.condition(), reinterpret_cast<uint16_t*>(from), to);
+ linkJumpT1(record.condition(), reinterpret_cast_ptr<uint16_t*>(from), to);
break;
case LinkJumpT2:
- linkJumpT2(reinterpret_cast<uint16_t*>(from), to);
+ linkJumpT2(reinterpret_cast_ptr<uint16_t*>(from), to);
break;
case LinkJumpT3:
- linkJumpT3(record.condition(), reinterpret_cast<uint16_t*>(from), to);
+ linkJumpT3(record.condition(), reinterpret_cast_ptr<uint16_t*>(from), to);
break;
case LinkJumpT4:
- linkJumpT4(reinterpret_cast<uint16_t*>(from), to);
+ linkJumpT4(reinterpret_cast_ptr<uint16_t*>(from), to);
break;
case LinkConditionalJumpT4:
- linkConditionalJumpT4(record.condition(), reinterpret_cast<uint16_t*>(from), to);
+ linkConditionalJumpT4(record.condition(), reinterpret_cast_ptr<uint16_t*>(from), to);
break;
case LinkConditionalBX:
- linkConditionalBX(record.condition(), reinterpret_cast<uint16_t*>(from), to);
+ linkConditionalBX(record.condition(), reinterpret_cast_ptr<uint16_t*>(from), to);
break;
case LinkBX:
- linkBX(reinterpret_cast<uint16_t*>(from), to);
+ linkBX(reinterpret_cast_ptr<uint16_t*>(from), to);
break;
default:
ASSERT_NOT_REACHED();
Modified: trunk/Source/_javascript_Core/assembler/LinkBuffer.h (113454 => 113455)
--- trunk/Source/_javascript_Core/assembler/LinkBuffer.h 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/_javascript_Core/assembler/LinkBuffer.h 2012-04-06 17:35:52 UTC (rev 113455)
@@ -260,9 +260,9 @@
// Copy the instructions from the last jump to the current one.
size_t regionSize = jumpsToLink[i].from() - readPtr;
- uint16_t* copySource = reinterpret_cast<uint16_t*>(inData + readPtr);
- uint16_t* copyEnd = reinterpret_cast<uint16_t*>(inData + readPtr + regionSize);
- uint16_t* copyDst = reinterpret_cast<uint16_t*>(outData + writePtr);
+ uint16_t* copySource = reinterpret_cast_ptr<uint16_t*>(inData + readPtr);
+ uint16_t* copyEnd = reinterpret_cast_ptr<uint16_t*>(inData + readPtr + regionSize);
+ uint16_t* copyDst = reinterpret_cast_ptr<uint16_t*>(outData + writePtr);
ASSERT(!(regionSize % 2));
ASSERT(!(readPtr % 2));
ASSERT(!(writePtr % 2));
Modified: trunk/Source/_javascript_Core/heap/MarkStack.cpp (113454 => 113455)
--- trunk/Source/_javascript_Core/heap/MarkStack.cpp 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/_javascript_Core/heap/MarkStack.cpp 2012-04-06 17:35:52 UTC (rev 113455)
@@ -493,7 +493,7 @@
if (newPtr) {
size_t jsValuesOffset = static_cast<size_t>(reinterpret_cast<char*>(values) - static_cast<char*>(oldPtr));
- JSValue* newValues = reinterpret_cast<JSValue*>(static_cast<char*>(newPtr) + jsValuesOffset);
+ JSValue* newValues = reinterpret_cast_ptr<JSValue*>(static_cast<char*>(newPtr) + jsValuesOffset);
for (unsigned i = 0; i < length; i++) {
JSValue& value = values[i];
newValues[i] = value;
Modified: trunk/Source/_javascript_Core/runtime/JSArray.cpp (113454 => 113455)
--- trunk/Source/_javascript_Core/runtime/JSArray.cpp 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/_javascript_Core/runtime/JSArray.cpp 2012-04-06 17:35:52 UTC (rev 113455)
@@ -1390,7 +1390,7 @@
visitor.copyAndAppend(reinterpret_cast<void**>(&baseStorage), storageSize(thisObject->m_vectorLength + thisObject->m_indexBias), storage->m_vector->slot(), thisObject->m_vectorLength);
if (baseStorage != thisObject->m_storage->m_allocBase) {
- thisObject->m_storage = reinterpret_cast<ArrayStorage*>(static_cast<char*>(baseStorage) + sizeof(JSValue) * thisObject->m_indexBias);
+ thisObject->m_storage = reinterpret_cast_ptr<ArrayStorage*>(static_cast<char*>(baseStorage) + sizeof(JSValue) * thisObject->m_indexBias);
thisObject->m_storage->m_allocBase = baseStorage;
ASSERT(thisObject->m_storage->m_allocBase);
}
Modified: trunk/Source/WTF/wtf/RefCountedArray.h (113454 => 113455)
--- trunk/Source/WTF/wtf/RefCountedArray.h 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/WTF/wtf/RefCountedArray.h 2012-04-06 17:35:52 UTC (rev 113455)
@@ -145,7 +145,7 @@
{
char* result = reinterpret_cast<char*>(this) + size();
ASSERT(!(bitwise_cast<uintptr_t>(result) & 7));
- return reinterpret_cast<T*>(result);
+ return reinterpret_cast_ptr<T*>(result);
}
static Header* fromPayload(T* payload)
Modified: trunk/Source/WebCore/ChangeLog (113454 => 113455)
--- trunk/Source/WebCore/ChangeLog 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/WebCore/ChangeLog 2012-04-06 17:35:52 UTC (rev 113455)
@@ -1,3 +1,17 @@
+2012-04-06 Rob Buis <[email protected]>
+
+ Fix cast-align warnings in JSC
+ https://bugs.webkit.org/show_bug.cgi?id=80790
+
+ Reviewed by George Staikos.
+
+ * platform/graphics/WOFFFileFormat.cpp:
+ (WebCore::readUInt32):
+ (WebCore::readUInt16):
+ * platform/image-encoders/skia/JPEGImageEncoder.cpp:
+ (WebCore::preMultipliedBGRAtoRGB):
+ * platform/network/MIMESniffing.cpp:
+
2012-04-06 Darin Adler <[email protected]>
Streamline strtod and fix some related problems
Modified: trunk/Source/WebCore/platform/graphics/WOFFFileFormat.cpp (113454 => 113455)
--- trunk/Source/WebCore/platform/graphics/WOFFFileFormat.cpp 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/WebCore/platform/graphics/WOFFFileFormat.cpp 2012-04-06 17:35:52 UTC (rev 113455)
@@ -63,7 +63,7 @@
if (buffer->size() - offset < sizeof(value))
return false;
- value = ntohl(*reinterpret_cast<const uint32_t*>(buffer->data() + offset));
+ value = ntohl(*reinterpret_cast_ptr<const uint32_t*>(buffer->data() + offset));
offset += sizeof(value);
return true;
@@ -75,7 +75,7 @@
if (buffer->size() - offset < sizeof(value))
return false;
- value = ntohs(*reinterpret_cast<const uint16_t*>(buffer->data() + offset));
+ value = ntohs(*reinterpret_cast_ptr<const uint16_t*>(buffer->data() + offset));
offset += sizeof(value);
return true;
Modified: trunk/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp (113454 => 113455)
--- trunk/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp 2012-04-06 17:35:52 UTC (rev 113455)
@@ -81,7 +81,7 @@
static void preMultipliedBGRAtoRGB(const unsigned char* pixels, unsigned int pixelCount, unsigned char* output)
{
- const SkPMColor* input = reinterpret_cast<const SkPMColor*>(pixels);
+ const SkPMColor* input = reinterpret_cast_ptr<const SkPMColor*>(pixels);
for (; pixelCount-- > 0; ++input) {
*output++ = SkGetPackedR32(*input);
*output++ = SkGetPackedG32(*input);
Modified: trunk/Source/WebCore/platform/network/MIMESniffing.cpp (113454 => 113455)
--- trunk/Source/WebCore/platform/network/MIMESniffing.cpp 2012-04-06 17:31:54 UTC (rev 113454)
+++ trunk/Source/WebCore/platform/network/MIMESniffing.cpp 2012-04-06 17:35:52 UTC (rev 113455)
@@ -22,6 +22,7 @@
#include <cstring>
#include <stdint.h>
+#include <wtf/StdLibExtras.h>
using namespace std;
@@ -237,9 +238,9 @@
if (dataSize < info.size)
return false;
- const uint32_t* pattern32 = reinterpret_cast<const uint32_t*>(info.pattern);
- const uint32_t* mask32 = reinterpret_cast<const uint32_t*>(info.mask);
- const uint32_t* data32 = reinterpret_cast<const uint32_t*>(data);
+ const uint32_t* pattern32 = reinterpret_cast_ptr<const uint32_t*>(info.pattern);
+ const uint32_t* mask32 = reinterpret_cast_ptr<const uint32_t*>(info.mask);
+ const uint32_t* data32 = reinterpret_cast_ptr<const uint32_t*>(data);
size_t count = info.size >> 2;