Remove references to Array:kHeaderSize.
Review URL: http://codereview.chromium.org/150098
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2303
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
// We give non-live objects a map that will correctly give their size,
// since their existing map might not be live after the collection.
int size = object->Size();
- if (size >= Array::kHeaderSize) {
+ if (size >= ByteArray::kHeaderSize) {
object->set_map(Heap::byte_array_map());
ByteArray::cast(object)->set_length(ByteArray::LengthFor(size));
} else {
// If the block is too small (eg, one or two words), to hold both a size
// field and a next pointer, we give it a filler map that gives it the
// correct size.
- if (size_in_bytes > Array::kHeaderSize) {
+ if (size_in_bytes > ByteArray::kHeaderSize) {
set_map(Heap::byte_array_map());
ByteArray::cast(this)->set_length(ByteArray::LengthFor(size_in_bytes));
} else if (size_in_bytes == kPointerSize) {
inline void set_next(Address next);
private:
- static const int kNextOffset = Array::kHeaderSize;
+ static const int kNextOffset = POINTER_SIZE_ALIGN(ByteArray::kHeaderSize);
DISALLOW_IMPLICIT_CONSTRUCTORS(FreeListNode);
};
private:
// The size range of blocks, in bytes. (Smaller allocations are allowed, but
// will always result in waste.)
- static const int kMinBlockSize = Array::kHeaderSize + kPointerSize;
+ static const int kMinBlockSize =
+ POINTER_SIZE_ALIGN(ByteArray::kHeaderSize) + kPointerSize;
static const int kMaxBlockSize = Page::kMaxHeapObjectSize;
// The identity of the owning space, for building allocation Failure
class EntryFrameConstants : public AllStatic {
public:
- static const int kCallerFPOffset = -6 * kPointerSize;
-
- static const int kFunctionArgOffset = +3 * kPointerSize;
- static const int kReceiverArgOffset = +4 * kPointerSize;
- static const int kArgcOffset = +5 * kPointerSize;
- static const int kArgvOffset = +6 * kPointerSize;
+ static const int kCallerFPOffset = -10 * kPointerSize;
};