| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index f25efbfbc3e44bdbaf7b84cf156fef687584967f..ec7570247bea6a3f402c293746b42b6386c046f9 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -9785,8 +9785,16 @@ void HOptimizedGraphBuilder::VisitCallNew(CallNew* expr) {
|
| constructor->shared()->CompleteInobjectSlackTracking();
|
| }
|
|
|
| + HAllocateObject::Flags flags = HAllocateObject::DefaultFlags();
|
| + if (FLAG_pretenure_hallocateobject &&
|
| + isolate()->heap()->ShouldGloballyPretenure()) {
|
| + flags = static_cast<HAllocateObject::Flags>(
|
| + flags | HAllocateObject::CAN_ALLOCATE_IN_OLD_POINTER_SPACE);
|
| + }
|
| +
|
| // Replace the constructor function with a newly allocated receiver.
|
| - HInstruction* receiver = new(zone()) HAllocateObject(context, constructor);
|
| + HInstruction* receiver =
|
| + new(zone()) HAllocateObject(context, constructor, flags);
|
| // Index of the receiver from the top of the expression stack.
|
| const int receiver_index = argument_count - 1;
|
| AddInstruction(receiver);
|
|
|