Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: src/hydrogen.cc

Issue 19603002: Double align fast literals of fast double elements kind. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 7d120b7f81749248831427c13e952e86df40e850..cdc71839b1abee55f0f867fb713441b40f24cfc5 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::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 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral(
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698