Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: src/builtins/builtins-constructor.h

Issue 2605893002: [builtins] More stubs to the builtin-o-sphere. (Closed)
Patch Set: Fixed compile error. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-constructor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 +
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-constructor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698