| Index: src/code-stub-assembler.cc
|
| diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
|
| index 665caff924dc4589435c0db2834ce142695e9bd1..3cce8dc6698fb317d3ad51f93f6e1e7320b5eb4a 100644
|
| --- a/src/code-stub-assembler.cc
|
| +++ b/src/code-stub-assembler.cc
|
| @@ -1894,6 +1894,21 @@ Node* CodeStubAssembler::AllocateNameDictionary(Node* at_least_space_for) {
|
| return result;
|
| }
|
|
|
| +Node* CodeStubAssembler::CopyNameDictionary(Node* dictionary,
|
| + Label* large_object_fallback) {
|
| + Comment("Copy boilerplate property dict");
|
| + Label copy_larg_object(this), done(this);
|
| + Node* length = SmiUntag(LoadFixedArrayBaseLength(dictionary));
|
| + GotoIf(
|
| + IntPtrGreaterThan(length, IntPtrConstant(FixedArray::kMaxRegularLength)),
|
| + large_object_fallback);
|
| + Node* properties =
|
| + AllocateNameDictionary(SmiUntag(GetCapacity<NameDictionary>(dictionary)));
|
| + CopyFixedArrayElements(FAST_ELEMENTS, dictionary, properties, length,
|
| + SKIP_WRITE_BARRIER, INTPTR_PARAMETERS);
|
| + return properties;
|
| +}
|
| +
|
| Node* CodeStubAssembler::AllocateJSObjectFromMap(Node* map, Node* properties,
|
| Node* elements,
|
| AllocationFlags flags) {
|
| @@ -4392,6 +4407,8 @@ Node* CodeStubAssembler::GetCapacity(Node* dictionary) {
|
| return LoadFixedArrayElement(dictionary, Dictionary::kCapacityIndex);
|
| }
|
|
|
| +template Node* CodeStubAssembler::GetCapacity<NameDictionary>(Node* dictionary);
|
| +
|
| template <class Dictionary>
|
| Node* CodeStubAssembler::GetNextEnumerationIndex(Node* dictionary) {
|
| return LoadFixedArrayElement(dictionary,
|
|
|