Add CODE_POINTER_ALIGN, use it in Page to align generated code.
authordimich@chromium.org <dimich@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 24 Sep 2010 21:48:44 +0000 (21:48 +0000)
committerdimich@chromium.org <dimich@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 24 Sep 2010 21:48:44 +0000 (21:48 +0000)
commit589eb4a8616ec5ea2dc302900c404631f9bb9a4e
tree2cc9110b84a0de871e45b6ecbb33e0454e0a4109
parentc39194e06f7fb00bcb87ac356e1b054c06a17122
Add CODE_POINTER_ALIGN, use it in Page to align generated code.

The object's space in Page starts after Page header and is aligned to kMapAlignment which is 32 bytes on 32-bit and 8 bytes on 64-bit.

In case of 64-bit target, the current page header size is exactly 32 bytes so we get the code magically aligned at 32 bytes but it is better to have a separate CODE_POINTER_ALIGN macro to make sure the object space in Page is aligned properly for both maps and code.

There could be a small waste of bytes sometimes (since both Page header and Code header sizes are aligned separately) but it seems the optimal one would involve cross-dependencies between .h files and not clear if it's worth it.

This is a back-port from Isolates branch.

Review URL: http://codereview.chromium.org/3461021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/globals.h
src/heap.cc
src/objects-debug.cc
src/objects.h
src/spaces.h