Fix alignment of Code::kConstantPoolOffset.

This is needed for 64bit alignment sensitive platforms (PowerPC)
Exposed bugs with new GC compare and swap changes updating the
field.

Example failing test:
out/ppc64.debug/cctest  test-decls/ExistsInPrototype

BUG=

Review URL: https://codereview.chromium.org/740443002

Cr-Commit-Position: refs/heads/master@{#25472}
This commit is contained in:
andrew_low 2014-11-24 02:22:09 -08:00 committed by Commit bot
parent 3bfc3ae702
commit c1bfc3485d

View File

@ -5376,7 +5376,7 @@ class Code: public HeapObject {
kKindSpecificFlags1Offset + kIntSize;
// Note: We might be able to squeeze this into the flags above.
static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize;
static const int kConstantPoolOffset = kPrologueOffset + kPointerSize;
static const int kConstantPoolOffset = kPrologueOffset + kIntSize;
static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize;
@ -5384,6 +5384,8 @@ class Code: public HeapObject {
// the Code object header.
static const int kHeaderSize =
(kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
// Ensure that the slot for the constant pool pointer is aligned.
STATIC_ASSERT((kConstantPoolOffset & kPointerAlignmentMask) == 0);
// Byte offsets within kKindSpecificFlags1Offset.
static const int kOptimizableOffset = kKindSpecificFlags1Offset;