Fix the CopiedBlock offset alignment in a cross platform fashion
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Feb 2012 08:07:44 +0000 (08:07 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Feb 2012 08:07:44 +0000 (08:07 +0000)
commit83baba0765232227cb1b238c655d7920c1240286
tree8eefd7809e9c5d193d28d823c8b6cf269fddd707
parent9bc91033c1267239fef59b485be90ad4e81ecef6
Fix the CopiedBlock offset alignment in a cross platform fashion
https://bugs.webkit.org/show_bug.cgi?id=79556

Reviewed by Filip Pizlo.

Replaced m_payload with a payload() method that calculates the offset
of the payload with the proper alignment. This change allows us to
avoid alignment-related issues in a cross-platform manner.

* heap/CopiedAllocator.h:
(JSC::CopiedAllocator::currentUtilization):
* heap/CopiedBlock.h:
(JSC::CopiedBlock::CopiedBlock):
(JSC::CopiedBlock::payload):
(CopiedBlock):
* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::doneFillingBlock):
* heap/CopiedSpaceInlineMethods.h:
(JSC::CopiedSpace::borrowBlock):
(JSC::CopiedSpace::allocateFromBlock):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@108888 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