| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index bfd1fb50958ee8288422606051700c4324438775..750ed0d5ea3e3d0bf83a4ab9b13e33588e4db811 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -3666,21 +3666,14 @@ AllocationResult Heap::AllocateFixedTypedArray(int length,
|
| ForFixedTypedArray(array_type, &element_size, &elements_kind);
|
| int size = OBJECT_POINTER_ALIGN(length * element_size +
|
| FixedTypedArrayBase::kDataOffset);
|
| -#ifndef V8_HOST_ARCH_64_BIT
|
| - if (array_type == kExternalFloat64Array) {
|
| - size += kPointerSize;
|
| - }
|
| -#endif
|
| AllocationSpace space = SelectSpace(size, pretenure);
|
|
|
| HeapObject* object;
|
| - AllocationResult allocation = AllocateRaw(size, space, OLD_SPACE);
|
| + AllocationResult allocation = AllocateRaw(
|
| + size, space, OLD_SPACE,
|
| + array_type == kExternalFloat64Array ? kDoubleWordAligned : kWordAligned);
|
| if (!allocation.To(&object)) return allocation;
|
|
|
| - if (array_type == kExternalFloat64Array) {
|
| - object = EnsureDoubleAligned(object, size);
|
| - }
|
| -
|
| object->set_map(MapForFixedTypedArray(array_type));
|
| FixedTypedArrayBase* elements = FixedTypedArrayBase::cast(object);
|
| elements->set_length(length);
|
| @@ -4395,21 +4388,20 @@ AllocationResult Heap::AllocateUninitializedFixedDoubleArray(
|
| AllocationResult Heap::AllocateRawFixedDoubleArray(int length,
|
| PretenureFlag pretenure) {
|
| if (length < 0 || length > FixedDoubleArray::kMaxLength) {
|
| - v8::internal::Heap::FatalProcessOutOfMemory("invalid array length", true);
|
| + v8::internal::Heap::FatalProcessOutOfMemory("invalid array length",
|
| + kDoubleWordAligned);
|
| }
|
| int size = FixedDoubleArray::SizeFor(length);
|
| -#ifndef V8_HOST_ARCH_64_BIT
|
| - size += kPointerSize;
|
| -#endif
|
| AllocationSpace space = SelectSpace(size, pretenure);
|
|
|
| HeapObject* object;
|
| {
|
| - AllocationResult allocation = AllocateRaw(size, space, OLD_SPACE);
|
| + AllocationResult allocation =
|
| + AllocateRaw(size, space, OLD_SPACE, kDoubleWordAligned);
|
| if (!allocation.To(&object)) return allocation;
|
| }
|
|
|
| - return EnsureDoubleAligned(object, size);
|
| + return object;
|
| }
|
|
|
|
|
| @@ -4417,17 +4409,14 @@ AllocationResult Heap::AllocateConstantPoolArray(
|
| const ConstantPoolArray::NumberOfEntries& small) {
|
| CHECK(small.are_in_range(0, ConstantPoolArray::kMaxSmallEntriesPerType));
|
| int size = ConstantPoolArray::SizeFor(small);
|
| -#ifndef V8_HOST_ARCH_64_BIT
|
| - size += kPointerSize;
|
| -#endif
|
| AllocationSpace space = SelectSpace(size, TENURED);
|
|
|
| HeapObject* object;
|
| {
|
| - AllocationResult allocation = AllocateRaw(size, space, OLD_SPACE);
|
| + AllocationResult allocation =
|
| + AllocateRaw(size, space, OLD_SPACE, kDoubleWordAligned);
|
| if (!allocation.To(&object)) return allocation;
|
| }
|
| - object = EnsureDoubleAligned(object, size);
|
| object->set_map_no_write_barrier(constant_pool_array_map());
|
|
|
| ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object);
|
| @@ -4443,17 +4432,14 @@ AllocationResult Heap::AllocateExtendedConstantPoolArray(
|
| CHECK(small.are_in_range(0, ConstantPoolArray::kMaxSmallEntriesPerType));
|
| CHECK(extended.are_in_range(0, kMaxInt));
|
| int size = ConstantPoolArray::SizeForExtended(small, extended);
|
| -#ifndef V8_HOST_ARCH_64_BIT
|
| - size += kPointerSize;
|
| -#endif
|
| AllocationSpace space = SelectSpace(size, TENURED);
|
|
|
| HeapObject* object;
|
| {
|
| - AllocationResult allocation = AllocateRaw(size, space, OLD_SPACE);
|
| + AllocationResult allocation =
|
| + AllocateRaw(size, space, OLD_SPACE, kDoubleWordAligned);
|
| if (!allocation.To(&object)) return allocation;
|
| }
|
| - object = EnsureDoubleAligned(object, size);
|
| object->set_map_no_write_barrier(constant_pool_array_map());
|
|
|
| ConstantPoolArray* constant_pool = ConstantPoolArray::cast(object);
|
|
|