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

Unified Diff: src/builtins/builtins.cc

Issue 2852833002: [builtins] De-duplicate specification of array builtin parameter count (Closed)
Patch Set: Finally Created 3 years, 8 months 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins.cc
diff --git a/src/builtins/builtins.cc b/src/builtins/builtins.cc
index b3cd1c653c880aeb8673d85cdb916b5089d54334..44a6ae68820cbc0881dc17b7198eab45e830aa53 100644
--- a/src/builtins/builtins.cc
+++ b/src/builtins/builtins.cc
@@ -116,6 +116,22 @@ Handle<Code> Builtins::OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint) {
}
// static
+int Builtins::GetBuiltinParameterCount(Name name) {
+ switch (name) {
+#define TFJ_CASE(Name, ParamCount, ...) \
+ case k##Name: { \
+ return ParamCount; \
+ }
+ BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, TFJ_CASE, IGNORE_BUILTIN,
+ IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
+#undef CASE
+ default:
+ UNREACHABLE();
+ return 0;
+ }
+}
+
+// static
Callable Builtins::CallableFor(Isolate* isolate, Name name) {
switch (name) {
#define CASE(Name, ...) \
« no previous file with comments | « src/builtins/builtins.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698