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

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

Issue 2604833004: [builtins] FastNewFunctionContextStub becomes a builtin (Closed)
Patch Set: REBASE. 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 3fddb54ceaceb50936f5e872f75abd826f4a98f8..b58522eb82f225084e9f9e96195035570acb606b 100644
--- a/src/builtins/builtins-constructor.h
+++ b/src/builtins/builtins-constructor.h
@@ -16,6 +16,18 @@ class ConstructorBuiltinsAssembler : public CodeStubAssembler {
: CodeStubAssembler(state) {}
Node* EmitFastNewClosure(Node* shared_info, Node* context);
+ Node* EmitFastNewFunctionContext(Node* closure, Node* slots, Node* context,
+ ScopeType scope_type);
+ static int MaximumFunctionContextSlots();
+
+ private:
+ static const int kMaximumSlots = 0x8000;
+ static const int kSmallMaximumSlots = 10;
+
+ // FastNewFunctionContext can only allocate closures which fit in the
+ // new space.
+ STATIC_ASSERT(((kMaximumSlots + Context::MIN_CONTEXT_SLOTS) * kPointerSize +
+ FixedArray::kHeaderSize) < kMaxRegularHeapObjectSize);
};
} // namespace internal
« 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