Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index ab2fb08a44c12e85491f7b67fd527b802fc2a0f7..2acc695a73f2cc81b926fd9aa27ed3cbc12af55c 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -190,11 +190,16 @@ HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { |
HValue* size_in_bytes = |
AddInstruction(new(zone) HConstant(size, Representation::Integer32())); |
+ HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE; |
+ if (FLAG_pretenure_literals) { |
+ flags = static_cast<HAllocate::Flags>( |
+ flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); |
+ } |
HInstruction* object = |
AddInstruction(new(zone) HAllocate(context(), |
size_in_bytes, |
HType::JSObject(), |
- HAllocate::CAN_ALLOCATE_IN_NEW_SPACE)); |
+ flags)); |
for (int i = 0; i < size; i += kPointerSize) { |
HInstruction* value = |