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:
parent
3bfc3ae702
commit
c1bfc3485d
@ -5376,7 +5376,7 @@ class Code: public HeapObject {
|
|||||||
kKindSpecificFlags1Offset + kIntSize;
|
kKindSpecificFlags1Offset + kIntSize;
|
||||||
// Note: We might be able to squeeze this into the flags above.
|
// Note: We might be able to squeeze this into the flags above.
|
||||||
static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize;
|
static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize;
|
||||||
static const int kConstantPoolOffset = kPrologueOffset + kPointerSize;
|
static const int kConstantPoolOffset = kPrologueOffset + kIntSize;
|
||||||
|
|
||||||
static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize;
|
static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize;
|
||||||
|
|
||||||
@ -5384,6 +5384,8 @@ class Code: public HeapObject {
|
|||||||
// the Code object header.
|
// the Code object header.
|
||||||
static const int kHeaderSize =
|
static const int kHeaderSize =
|
||||||
(kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
|
(kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
|
||||||
|
// Ensure that the slot for the constant pool pointer is aligned.
|
||||||
|
STATIC_ASSERT((kConstantPoolOffset & kPointerAlignmentMask) == 0);
|
||||||
|
|
||||||
// Byte offsets within kKindSpecificFlags1Offset.
|
// Byte offsets within kKindSpecificFlags1Offset.
|
||||||
static const int kOptimizableOffset = kKindSpecificFlags1Offset;
|
static const int kOptimizableOffset = kKindSpecificFlags1Offset;
|
||||||
|
Loading…
Reference in New Issue
Block a user