Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index f950368404804ada7d78da991bc0b6ca2464a288..9e948a92b724b0ceaa8516cf2eb5305df430e65f 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -333,7 +333,11 @@ static void GenerateFastCloneShallowArrayCommon( |
// Allocate both the JS array and the elements array in one big |
// allocation. This avoids multiple limit checks. |
- __ AllocateInNewSpace(size, rax, rbx, rdx, fail, TAG_OBJECT); |
+ AllocationFlags flags = TAG_OBJECT; |
+ if (mode == FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS) { |
+ flags = static_cast<AllocationFlags>(DOUBLE_ALIGNMENT | flags); |
+ } |
+ __ AllocateInNewSpace(size, rax, rbx, rdx, fail, flags); |
// Copy the JS array part. |
for (int i = 0; i < JSArray::kSize; i += kPointerSize) { |