Allocations from CopiedBlocks should always be 8-byte aligned
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 22:26:22 +0000 (22:26 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 22:26:22 +0000 (22:26 +0000)
commit3e2a392cf3a12d0d943bc2d7177a971607791d15
tree24b2d780d91362200aab09a57e2b40d5b8c7a422
parentf706212e12e0e128429f8fadbbc5874b9ebd12cf
Allocations from CopiedBlocks should always be 8-byte aligned
https://bugs.webkit.org/show_bug.cgi?id=79271

Reviewed by Geoffrey Garen.

* heap/CopiedAllocator.h:
(JSC::CopiedAllocator::allocate):
* heap/CopiedBlock.h: Changed to add padding so that the start of the payload is always
guaranteed to be 8 byte aligned on both 64- and 32-bit platforms.
(CopiedBlock):
* heap/CopiedSpace.cpp: Changed all assertions of isPointerAligned to is8ByteAligned.
(JSC::CopiedSpace::tryAllocateOversize):
(JSC::CopiedSpace::getFreshBlock):
* heap/CopiedSpaceInlineMethods.h:
(JSC::CopiedSpace::allocateFromBlock):
* runtime/JSArray.h:
(ArrayStorage): Added padding for ArrayStorage to make sure that it is always 8 byte
aligned on both 64- and 32-bit platforms.
* wtf/StdLibExtras.h:
(WTF::is8ByteAligned): Added new utility function that functions similarly to the
way isPointerAligned does, but it just always checks for 8 byte alignment.
(WTF):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@108553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/CopiedAllocator.h
Source/JavaScriptCore/heap/CopiedBlock.h
Source/JavaScriptCore/heap/CopiedSpace.cpp
Source/JavaScriptCore/heap/CopiedSpaceInlineMethods.h
Source/JavaScriptCore/runtime/JSArray.h
Source/JavaScriptCore/wtf/StdLibExtras.h