From c042ef360db9483f712c04f7df1dd91d6e0dec1e Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Thu, 24 Oct 2013 19:01:30 +0000 Subject: [PATCH] Enable double alignment for constructed arrays. 2nd (of 3) CL's to ensure complete alignment of FixedDoubleArrays. TEST= BUG= R=hpayer@chromium.org Review URL: https://codereview.chromium.org/35133002 Patch from Dusan Milosavljevic . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 77dab3d..3b232e6 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -2126,6 +2126,11 @@ HValue* HGraphBuilder::JSArrayBuilder::AllocateArray(HValue* size_in_bytes, HAllocate* new_object = builder()->Add(size_in_bytes, HType::JSArray(), NOT_TENURED, JS_ARRAY_TYPE); + // Folded array allocation should be aligned if it has fast double elements. + if (IsFastDoubleElementsKind(kind_)) { + new_object->MakeDoubleAligned(); + } + // Fill in the fields: map, properties, length HValue* map; if (allocation_site_payload_ == NULL) { -- 2.7.4