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

Unified Diff: src/hydrogen.cc

Issue 13952008: Enable pretenuring of fast literals in high promotion mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « src/flag-definitions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | 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 19edbd0c2efecd25d9ef55dc94d06f94d384ea99..bbb7d56e5b36a5534b86c504e88c8351c247cd3f 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -10108,6 +10108,15 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral(
NoObservableSideEffectsScope no_effects(this);
+ HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE;
+ // TODO(hpayer): add support for old data space
+ if (FLAG_pretenure_literals &&
+ isolate()->heap()->ShouldGloballyPretenure() &&
+ data_size == 0) {
+ flags = static_cast<HAllocate::Flags>(
+ flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE);
+ }
+
HValue* size_in_bytes =
AddInstruction(new(zone) HConstant(total_size,
Representation::Integer32()));
@@ -10115,7 +10124,7 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral(
AddInstruction(new(zone) HAllocate(context,
size_in_bytes,
HType::JSObject(),
- HAllocate::CAN_ALLOCATE_IN_NEW_SPACE));
+ flags));
int offset = 0;
BuildEmitDeepCopy(boilerplate_object, original_boilerplate_object, result,
&offset, mode, id);
« no previous file with comments | « src/flag-definitions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698