Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index edcebec1f1f95ca6df022c93b7283b7b84cdaf6a..ca2dce3c196be6fa84fa45bf5245788e15da28a4 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -2047,6 +2047,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 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) { |