Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (143908 => 143909)
--- trunk/Source/_javascript_Core/ChangeLog 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-02-25 13:13:43 UTC (rev 143909)
@@ -1,3 +1,37 @@
+2013-02-25 Carlos Garcia Campos <[email protected]>
+
+ [BlackBerry][ARM] Fix cast-align warnings in _javascript_Core
+ https://bugs.webkit.org/show_bug.cgi?id=110738
+
+ Reviewed by Rob Buis.
+
+ Use reinterpret_cast_ptr instead of reinterpret_cast for
+ pointers.
+
+ * dfg/DFGOperations.cpp:
+ * heap/CopiedBlock.h:
+ (JSC::CopiedBlock::zeroFillWilderness):
+ * heap/WeakBlock.h:
+ (JSC::WeakBlock::asWeakImpl):
+ (JSC::WeakBlock::asFreeCell):
+ (JSC::WeakBlock::weakImpls):
+ * heap/WeakImpl.h:
+ (JSC::WeakImpl::asWeakImpl):
+ * interpreter/JSStack.cpp:
+ (JSC::JSStack::disableErrorStackReserve):
+ * interpreter/JSStack.h:
+ (JSC::JSStack::reservationEnd):
+ * runtime/ArrayStorage.h:
+ (JSC::ArrayStorage::from):
+ * runtime/Butterfly.h:
+ (JSC::Butterfly::indexingPayload):
+ * runtime/IndexingHeader.h:
+ (JSC::IndexingHeader::propertyStorage):
+ * runtime/JSActivation.h:
+ (JSC::JSActivation::tearOff):
+ (JSC::JSActivation::isTornOff):
+ (JSC::JSActivation::storage):
+
2013-02-22 Filip Pizlo <[email protected]>
DFG::SpeculativeJIT::speculateNumber() should just use SpeculateDoubleOperand instead of doing its own thing
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (143908 => 143909)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2013-02-25 13:13:43 UTC (rev 143909)
@@ -1622,7 +1622,7 @@
char* scratchPointer = static_cast<char*>(scratch);
for (unsigned i = 0; i < GPRInfo::numberOfRegisters; ++i) {
GPRReg gpr = GPRInfo::toRegister(i);
- dataLog(" ", GPRInfo::debugName(gpr), ":", RawPointer(*reinterpret_cast<void**>(scratchPointer)));
+ dataLog(" ", GPRInfo::debugName(gpr), ":", RawPointer(*reinterpret_cast_ptr<void**>(scratchPointer)));
scratchPointer += sizeof(EncodedJSValue);
}
dataLog("\n");
@@ -1630,8 +1630,8 @@
for (unsigned i = 0; i < FPRInfo::numberOfRegisters; ++i) {
FPRReg fpr = FPRInfo::toRegister(i);
dataLog(" ", FPRInfo::debugName(fpr), ":");
- uint64_t bits = *reinterpret_cast<uint64_t*>(scratchPointer);
- double value = *reinterpret_cast<double*>(scratchPointer);
+ uint64_t bits = *reinterpret_cast_ptr<uint64_t*>(scratchPointer);
+ double value = *reinterpret_cast_ptr<double*>(scratchPointer);
dataLogF("%llx:%lf", static_cast<long long>(bits), value);
scratchPointer += sizeof(EncodedJSValue);
}
Modified: trunk/Source/_javascript_Core/heap/CopiedBlock.h (143908 => 143909)
--- trunk/Source/_javascript_Core/heap/CopiedBlock.h 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/heap/CopiedBlock.h 2013-02-25 13:13:43 UTC (rev 143909)
@@ -116,7 +116,7 @@
#else
JSValue emptyValue;
JSValue* limit = reinterpret_cast_ptr<JSValue*>(wildernessEnd());
- for (JSValue* currentValue = reinterpret_cast<JSValue*>(wilderness()); currentValue < limit; currentValue++)
+ for (JSValue* currentValue = reinterpret_cast_ptr<JSValue*>(wilderness()); currentValue < limit; currentValue++)
*currentValue = emptyValue;
#endif
}
Modified: trunk/Source/_javascript_Core/heap/WeakBlock.h (143908 => 143909)
--- trunk/Source/_javascript_Core/heap/WeakBlock.h 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/heap/WeakBlock.h 2013-02-25 13:13:43 UTC (rev 143909)
@@ -97,7 +97,7 @@
inline WeakImpl* WeakBlock::asWeakImpl(FreeCell* freeCell)
{
- return reinterpret_cast<WeakImpl*>(freeCell);
+ return reinterpret_cast_ptr<WeakImpl*>(freeCell);
}
inline WeakBlock::SweepResult WeakBlock::takeSweepResult()
@@ -110,12 +110,12 @@
inline WeakBlock::FreeCell* WeakBlock::asFreeCell(WeakImpl* weakImpl)
{
- return reinterpret_cast<FreeCell*>(weakImpl);
+ return reinterpret_cast_ptr<FreeCell*>(weakImpl);
}
inline WeakImpl* WeakBlock::weakImpls()
{
- return reinterpret_cast<WeakImpl*>(this) + ((sizeof(WeakBlock) + sizeof(WeakImpl) - 1) / sizeof(WeakImpl));
+ return reinterpret_cast_ptr<WeakImpl*>(this) + ((sizeof(WeakBlock) + sizeof(WeakImpl) - 1) / sizeof(WeakImpl));
}
inline size_t WeakBlock::weakImplCount()
Modified: trunk/Source/_javascript_Core/heap/WeakImpl.h (143908 => 143909)
--- trunk/Source/_javascript_Core/heap/WeakImpl.h 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/heap/WeakImpl.h 2013-02-25 13:13:43 UTC (rev 143909)
@@ -107,7 +107,7 @@
inline WeakImpl* WeakImpl::asWeakImpl(JSValue* slot)
{
- return reinterpret_cast<WeakImpl*>(reinterpret_cast<char*>(slot) + OBJECT_OFFSETOF(WeakImpl, m_jsValue));
+ return reinterpret_cast_ptr<WeakImpl*>(reinterpret_cast_ptr<char*>(slot) + OBJECT_OFFSETOF(WeakImpl, m_jsValue));
}
} // namespace JSC
Modified: trunk/Source/_javascript_Core/interpreter/JSStack.cpp (143908 => 143909)
--- trunk/Source/_javascript_Core/interpreter/JSStack.cpp 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/interpreter/JSStack.cpp 2013-02-25 13:13:43 UTC (rev 143909)
@@ -135,7 +135,7 @@
void JSStack::disableErrorStackReserve()
{
char* useableEnd = reinterpret_cast<char*>(reservationEnd()) - commitSize;
- m_useableEnd = reinterpret_cast<Register*>(useableEnd);
+ m_useableEnd = reinterpret_cast_ptr<Register*>(useableEnd);
// By the time we get here, we are guaranteed to be destructing the last
// Interpreter::ErrorHandlingMode that enabled this reserve in the first
Modified: trunk/Source/_javascript_Core/interpreter/JSStack.h (143908 => 143909)
--- trunk/Source/_javascript_Core/interpreter/JSStack.h 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/interpreter/JSStack.h 2013-02-25 13:13:43 UTC (rev 143909)
@@ -113,7 +113,7 @@
{
char* base = static_cast<char*>(m_reservation.base());
char* reservationEnd = base + m_reservation.size();
- return reinterpret_cast<Register*>(reservationEnd);
+ return reinterpret_cast_ptr<Register*>(reservationEnd);
}
#if ENABLE(DEBUG_JSSTACK)
Modified: trunk/Source/_javascript_Core/runtime/ArrayStorage.h (143908 => 143909)
--- trunk/Source/_javascript_Core/runtime/ArrayStorage.h 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/runtime/ArrayStorage.h 2013-02-25 13:13:43 UTC (rev 143909)
@@ -49,7 +49,7 @@
ArrayStorage() { } // Not directly instantiable. Can only be created as part of a Butterfly.
public:
- static ArrayStorage* from(Butterfly* butterfly) { return reinterpret_cast<ArrayStorage*>(butterfly); }
+ static ArrayStorage* from(Butterfly* butterfly) { return reinterpret_cast_ptr<ArrayStorage*>(butterfly); }
static ArrayStorage* from(IndexingHeader* indexingHeader) { return indexingHeader->arrayStorage(); }
Butterfly* butterfly() { return reinterpret_cast<Butterfly*>(this); }
Modified: trunk/Source/_javascript_Core/runtime/Butterfly.h (143908 => 143909)
--- trunk/Source/_javascript_Core/runtime/Butterfly.h 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/runtime/Butterfly.h 2013-02-25 13:13:43 UTC (rev 143909)
@@ -121,7 +121,7 @@
void setVectorLength(uint32_t value) { indexingHeader()->setVectorLength(value); }
template<typename T>
- T* indexingPayload() { return reinterpret_cast<T*>(this); }
+ T* indexingPayload() { return reinterpret_cast_ptr<T*>(this); }
ArrayStorage* arrayStorage() { return indexingPayload<ArrayStorage>(); }
ContiguousJSValues contiguousInt32() { return ContiguousJSValues(indexingPayload<WriteBarrier<Unknown> >(), vectorLength()); }
Modified: trunk/Source/_javascript_Core/runtime/IndexingHeader.h (143908 => 143909)
--- trunk/Source/_javascript_Core/runtime/IndexingHeader.h 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/runtime/IndexingHeader.h 2013-02-25 13:13:43 UTC (rev 143909)
@@ -86,12 +86,12 @@
PropertyStorage propertyStorage()
{
- return reinterpret_cast<PropertyStorage>(this);
+ return reinterpret_cast_ptr<PropertyStorage>(this);
}
ConstPropertyStorage propertyStorage() const
{
- return reinterpret_cast<ConstPropertyStorage>(this);
+ return reinterpret_cast_ptr<ConstPropertyStorage>(this);
}
ArrayStorage* arrayStorage()
Modified: trunk/Source/_javascript_Core/runtime/JSActivation.h (143908 => 143909)
--- trunk/Source/_javascript_Core/runtime/JSActivation.h 2013-02-25 13:10:09 UTC (rev 143908)
+++ trunk/Source/_javascript_Core/runtime/JSActivation.h 2013-02-25 13:13:43 UTC (rev 143909)
@@ -153,7 +153,7 @@
{
ASSERT(!isTornOff());
- WriteBarrierBase<Unknown>* dst = reinterpret_cast<WriteBarrierBase<Unknown>*>(
+ WriteBarrierBase<Unknown>* dst = reinterpret_cast_ptr<WriteBarrierBase<Unknown>*>(
reinterpret_cast<char*>(this) + registersOffset(symbolTable()));
WriteBarrierBase<Unknown>* src = ""
@@ -167,7 +167,7 @@
inline bool JSActivation::isTornOff()
{
- return m_registers == reinterpret_cast<WriteBarrierBase<Unknown>*>(
+ return m_registers == reinterpret_cast_ptr<WriteBarrierBase<Unknown>*>(
reinterpret_cast<char*>(this) + registersOffset(symbolTable()));
}
@@ -178,7 +178,7 @@
inline WriteBarrier<Unknown>* JSActivation::storage()
{
- return reinterpret_cast<WriteBarrier<Unknown>*>(
+ return reinterpret_cast_ptr<WriteBarrier<Unknown>*>(
reinterpret_cast<char*>(this) + storageOffset());
}