DescriptionAdd 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.
Committed: http://code.google.com/p/v8/source/detail?r=5526
Patch Set 1 #Patch Set 2 : use CODE_POINTER_ALIGN in one more place #
Total comments: 2
Messages
Total messages: 3 (0 generated)
|