From: hpayer@chromium.org Date: Thu, 18 Jul 2013 08:42:03 +0000 (+0000) Subject: Double align fast literals of fast double elements kind. X-Git-Tag: upstream/4.7.83~13317 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ced115b6aea24d53e30979a98ab244878a7a550a;p=platform%2Fupstream%2Fv8.git Double align fast literals of fast double elements kind. BUG= R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/19603002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 6744dbb..f399261 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -8376,16 +8376,16 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral( HInstruction* target = NULL; HInstruction* data_target = NULL; - HAllocate::Flags flags = HAllocate::DefaultFlags(); + ElementsKind kind = boilerplate_object->map()->elements_kind(); if (isolate()->heap()->ShouldGloballyPretenure()) { if (data_size != 0) { HAllocate::Flags data_flags = - static_cast(HAllocate::DefaultFlags() | + static_cast(HAllocate::DefaultFlags(kind) | HAllocate::CAN_ALLOCATE_IN_OLD_DATA_SPACE); HValue* size_in_bytes = Add(data_size); - data_target = Add(context, size_in_bytes, - HType::JSObject(), data_flags); + data_target = Add(context, size_in_bytes, HType::JSObject(), + data_flags); Handle free_space_map = isolate()->factory()->free_space_map(); AddStoreMapConstant(data_target, free_space_map); HObjectAccess access = @@ -8393,12 +8393,15 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral( AddStore(data_target, access, size_in_bytes); } if (pointer_size != 0) { - flags = static_cast( - flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); + HAllocate::Flags pointer_flags = + static_cast(HAllocate::DefaultFlags() | + HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); HValue* size_in_bytes = Add(pointer_size); - target = Add(context, size_in_bytes, HType::JSObject(), flags); + target = Add(context, size_in_bytes, HType::JSObject(), + pointer_flags); } } else { + HAllocate::Flags flags = HAllocate::DefaultFlags(kind); HValue* size_in_bytes = Add(data_size + pointer_size); target = Add(context, size_in_bytes, HType::JSObject(), flags); }