Commit c1bfc348 authored by andrew_low's avatar andrew_low Committed by Commit bot

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}
parent 3bfc3ae7
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment