Revision: 15740
Author:   [email protected]
Date:     Thu Jul 18 01:42:03 2013
Log:      Double align fast literals of fast double elements kind.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/19603002
http://code.google.com/p/v8/source/detail?r=15740

Modified:
 /branches/bleeding_edge/src/hydrogen.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Wed Jul 17 08:58:59 2013
+++ /branches/bleeding_edge/src/hydrogen.cc     Thu Jul 18 01:42:03 2013
@@ -8376,16 +8376,16 @@
   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::Flags>(HAllocate::DefaultFlags() |
+          static_cast<HAllocate::Flags>(HAllocate::DefaultFlags(kind) |
               HAllocate::CAN_ALLOCATE_IN_OLD_DATA_SPACE);
       HValue* size_in_bytes = Add<HConstant>(data_size);
-      data_target = Add<HAllocate>(context, size_in_bytes,
-                                   HType::JSObject(), data_flags);
+ data_target = Add<HAllocate>(context, size_in_bytes, HType::JSObject(),
+          data_flags);
       Handle<Map> free_space_map = isolate()->factory()->free_space_map();
       AddStoreMapConstant(data_target, free_space_map);
       HObjectAccess access =
@@ -8393,12 +8393,15 @@
       AddStore(data_target, access, size_in_bytes);
     }
     if (pointer_size != 0) {
-      flags = static_cast<HAllocate::Flags>(
-          flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE);
+      HAllocate::Flags pointer_flags =
+          static_cast<HAllocate::Flags>(HAllocate::DefaultFlags() |
+              HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE);
       HValue* size_in_bytes = Add<HConstant>(pointer_size);
- target = Add<HAllocate>(context, size_in_bytes, HType::JSObject(), flags);
+      target = Add<HAllocate>(context, size_in_bytes, HType::JSObject(),
+          pointer_flags);
     }
   } else {
+    HAllocate::Flags flags = HAllocate::DefaultFlags(kind);
     HValue* size_in_bytes = Add<HConstant>(data_size + pointer_size);
target = Add<HAllocate>(context, size_in_bytes, HType::JSObject(), flags);
   }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to