| Index: src/builtins/builtins-constructor.cc
|
| diff --git a/src/builtins/builtins-constructor.cc b/src/builtins/builtins-constructor.cc
|
| index 0d303c90c156b3dad8c11e8dc70469bfe49ea05a..ae6dd2d6e1ce51df9905e66b162430705fef092b 100644
|
| --- a/src/builtins/builtins-constructor.cc
|
| +++ b/src/builtins/builtins-constructor.cc
|
| @@ -714,7 +714,6 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowObject(
|
| offset.Bind(IntPtrAdd(offset.value(), IntPtrConstant(kPointerSize)));
|
| GotoIfNot(IntPtrGreaterThanOrEqual(offset.value(), end_offset), &loop_body);
|
| }
|
| -
|
| if (FLAG_allocation_site_pretenuring) {
|
| Node* memento = InnerAllocate(copy, object_size);
|
| StoreMapNoWriteBarrier(memento, Heap::kAllocationMementoMapRootIndex);
|
| @@ -729,6 +728,24 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowObject(
|
| memento_create_count);
|
| }
|
|
|
| + // Directly copy over the property store for dict-mode boilerplates.
|
| + Label dict_properties(this), done(this);
|
| + Branch(IsDictionaryMap(boilerplate_map), &dict_properties, &done);
|
| + Bind(&dict_properties);
|
| + {
|
| + Comment("Copy boilderplate property dict");
|
| + Node* boilerplate_properties = LoadProperties(boilerplate);
|
| + // TODO(cbruni): Use inner allocate for name dictionary
|
| + Node* properties = AllocateNameDictionary(
|
| + SmiUntag(GetCapacity<NameDictionary>(boilerplate_properties)));
|
| + CopyFixedArrayElements(FAST_ELEMENTS, boilerplate_properties, properties,
|
| + LoadFixedArrayBaseLength(boilerplate_properties),
|
| + SKIP_WRITE_BARRIER, SMI_PARAMETERS);
|
| + StoreObjectField(copy, JSObject::kPropertiesOffset, properties);
|
| + Goto(&done);
|
| + }
|
| + Bind(&done);
|
| +
|
| // TODO(verwaest): Allocate and fill in double boxes.
|
| return copy;
|
| }
|
|
|