| Index: src/heap/heap-inl.h
|
| diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
|
| index 38deb1f31df4c49b8325dd79a04e4ce813116e72..d0078c879f91a0531ebb52a401bf9a5808c99a40 100644
|
| --- a/src/heap/heap-inl.h
|
| +++ b/src/heap/heap-inl.h
|
| @@ -156,7 +156,8 @@ AllocationResult Heap::CopyConstantPoolArray(ConstantPoolArray* src) {
|
|
|
|
|
| AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
|
| - AllocationSpace retry_space) {
|
| + AllocationSpace retry_space,
|
| + Alignment alignment) {
|
| DCHECK(AllowHandleAllocation::IsAllowed());
|
| DCHECK(AllowHeapAllocation::IsAllowed());
|
| DCHECK(gc_state_ == NOT_IN_GC);
|
| @@ -172,7 +173,15 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
|
| HeapObject* object;
|
| AllocationResult allocation;
|
| if (NEW_SPACE == space) {
|
| +#ifndef V8_HOST_ARCH_64_BIT
|
| + if (alignment == kDoubleAligned) {
|
| + allocation = new_space_.AllocateRawDoubleAligned(size_in_bytes);
|
| + } else {
|
| + allocation = new_space_.AllocateRaw(size_in_bytes);
|
| + }
|
| +#else
|
| allocation = new_space_.AllocateRaw(size_in_bytes);
|
| +#endif
|
| if (always_allocate() && allocation.IsRetry() && retry_space != NEW_SPACE) {
|
| space = retry_space;
|
| } else {
|
| @@ -184,7 +193,15 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
|
| }
|
|
|
| if (OLD_SPACE == space) {
|
| +#ifndef V8_HOST_ARCH_64_BIT
|
| + if (alignment == kDoubleAligned) {
|
| + allocation = old_space_->AllocateRawDoubleAligned(size_in_bytes);
|
| + } else {
|
| + allocation = old_space_->AllocateRaw(size_in_bytes);
|
| + }
|
| +#else
|
| allocation = old_space_->AllocateRaw(size_in_bytes);
|
| +#endif
|
| } else if (CODE_SPACE == space) {
|
| if (size_in_bytes <= code_space()->AreaSize()) {
|
| allocation = code_space_->AllocateRaw(size_in_bytes);
|
|
|