Index: src/objects.h |
=================================================================== |
--- src/objects.h (revision 2497) |
+++ src/objects.h (working copy) |
@@ -1718,6 +1718,10 @@ |
// Layout descriptor. |
static const int kLengthOffset = HeapObject::kHeaderSize; |
+ |
+ protected: |
+ // No code should use the Array class directly, only its subclasses. |
+ // Use the kHeaderSize of the appropriate subclass, which may be aligned. |
static const int kHeaderSize = kLengthOffset + kIntSize; |
static const int kAlignedSize = POINTER_SIZE_ALIGN(kHeaderSize); |
@@ -2427,6 +2431,10 @@ |
void ByteArrayVerify(); |
#endif |
+ // ByteArray headers are not quadword aligned. |
+ static const int kHeaderSize = Array::kHeaderSize; |
+ static const int kAlignedSize = Array::kAlignedSize; |
+ |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(ByteArray); |
}; |