| Index: src/builtins/builtins-constructor.h
|
| diff --git a/src/builtins/builtins-constructor.h b/src/builtins/builtins-constructor.h
|
| index b58522eb82f225084e9f9e96195035570acb606b..86c412b91f714bf79d2d96c23bbaa88cd48195b1 100644
|
| --- a/src/builtins/builtins-constructor.h
|
| +++ b/src/builtins/builtins-constructor.h
|
| @@ -9,6 +9,7 @@ namespace internal {
|
|
|
| typedef compiler::Node Node;
|
| typedef compiler::CodeAssemblerState CodeAssemblerState;
|
| +typedef compiler::CodeAssemblerLabel CodeAssemblerLabel;
|
|
|
| class ConstructorBuiltinsAssembler : public CodeStubAssembler {
|
| public:
|
| @@ -20,10 +21,37 @@ class ConstructorBuiltinsAssembler : public CodeStubAssembler {
|
| ScopeType scope_type);
|
| static int MaximumFunctionContextSlots();
|
|
|
| + Node* EmitFastCloneRegExp(Node* closure, Node* literal_index, Node* pattern,
|
| + Node* flags, Node* context);
|
| + Node* EmitFastCloneShallowArray(Node* closure, Node* literal_index,
|
| + Node* context,
|
| + CodeAssemblerLabel* call_runtime,
|
| + AllocationSiteMode allocation_site_mode);
|
| +
|
| + // Maximum number of elements in copied array (chosen so that even an array
|
| + // backed by a double backing store will fit into new-space).
|
| + static const int kMaximumClonedShallowArrayElements =
|
| + JSArray::kInitialMaxFastElementArray * kPointerSize / kDoubleSize;
|
| +
|
| + void CreateFastCloneShallowArrayBuiltin(
|
| + AllocationSiteMode allocation_site_mode);
|
| +
|
| + // Maximum number of properties in copied objects.
|
| + static const int kMaximumClonedShallowObjectProperties = 6;
|
| + static int FastCloneShallowObjectPropertiesCount(int literal_length);
|
| + Node* EmitFastCloneShallowObject(CodeAssemblerLabel* call_runtime,
|
| + Node* closure, Node* literals_index,
|
| + Node* properties_count);
|
| + void CreateFastCloneShallowObjectBuiltin(int properties_count);
|
| +
|
| private:
|
| static const int kMaximumSlots = 0x8000;
|
| static const int kSmallMaximumSlots = 10;
|
|
|
| + Node* NonEmptyShallowClone(Node* boilerplate, Node* boilerplate_map,
|
| + Node* boilerplate_elements, Node* allocation_site,
|
| + Node* capacity, ElementsKind kind);
|
| +
|
| // FastNewFunctionContext can only allocate closures which fit in the
|
| // new space.
|
| STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize +
|
|
|