Bug 900903 - Add variadic variants of numbered macros in nsCycleCollectionParticipant.h. r=smaug
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Thu, 24 Apr 2014 11:13:00 +0200
changeset 180472 bd83aff8800a96cf11c5369da465012cea54165b
parent 180471 2b2f0809d1c0cdeb230562426750fcb207285b30
child 180473 6d4e3460c1f827b5f7b53b9e35e3fa263fdbc15b
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewerssmaug
bugs900903
milestone31.0a1
Bug 900903 - Add variadic variants of numbered macros in nsCycleCollectionParticipant.h. r=smaug The old numbered macros are still present, but simply forward to the variadic macro. They will be removed after all instances of the numbered macros have been converted.
xpcom/glue/nsCycleCollectionParticipant.h
--- a/xpcom/glue/nsCycleCollectionParticipant.h
+++ b/xpcom/glue/nsCycleCollectionParticipant.h
@@ -1,16 +1,18 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsCycleCollectionParticipant_h__
 #define nsCycleCollectionParticipant_h__
 
+#include "mozilla/MacroArgs.h"
+#include "mozilla/MacroForEach.h"
 #include "nsCycleCollectionNoteChild.h"
 #include "js/RootingAPI.h"
 
 #define NS_XPCOMCYCLECOLLECTIONPARTICIPANT_IID                                 \
 {                                                                              \
     0x9674489b,                                                                \
     0x1f6f,                                                                    \
     0x4550,                                                                    \
@@ -337,18 +339,22 @@ T* DowncastCCParticipant(void *p)
   {                                                                            \
     _class *tmp = DowncastCCParticipant<_class >(p);
 
 #define NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base_class)   \
   NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                \
     nsISupports *s = static_cast<nsISupports*>(p);                             \
     NS_CYCLE_COLLECTION_CLASSNAME(_base_class)::Unlink(s);
 
-#define NS_IMPL_CYCLE_COLLECTION_UNLINK(_field)                                \
-    ImplCycleCollectionUnlink(tmp->_field);
+#define NS_IMPL_CYCLE_COLLECTION_UNLINK_HELPER(_field)                        \
+  ImplCycleCollectionUnlink(tmp->_field);
+
+#define NS_IMPL_CYCLE_COLLECTION_UNLINK(...)                                   \
+  MOZ_STATIC_ASSERT_VALID_ARG_COUNT(__VA_ARGS__);                              \
+  MOZ_FOR_EACH(NS_IMPL_CYCLE_COLLECTION_UNLINK_HELPER, (), (__VA_ARGS__))
 
 #define NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                    \
     (void)tmp;                                                                 \
   }
 
 #define NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(_base_class)             \
     nsISupports *s = static_cast<nsISupports*>(p);                             \
     NS_CYCLE_COLLECTION_CLASSNAME(_base_class)::Unlink(s);                     \
@@ -385,19 +391,23 @@ T* DowncastCCParticipant(void *p)
 #define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base_class) \
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(_class)                     \
     nsISupports *s = static_cast<nsISupports*>(p);                             \
     if (NS_CYCLE_COLLECTION_CLASSNAME(_base_class)::Traverse(s, cb)            \
         == NS_SUCCESS_INTERRUPTED_TRAVERSE) {                                  \
       return NS_SUCCESS_INTERRUPTED_TRAVERSE;                                  \
     }
 
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)                              \
+#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_HELPER(_field)                       \
   ImplCycleCollectionTraverse(cb, tmp->_field, #_field, 0);
 
+#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(...)                                 \
+  MOZ_STATIC_ASSERT_VALID_ARG_COUNT(__VA_ARGS__);                              \
+  MOZ_FOR_EACH(NS_IMPL_CYCLE_COLLECTION_TRAVERSE_HELPER, (), (__VA_ARGS__))
+
 #define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_RAWPTR(_field)                       \
   CycleCollectionNoteChild(cb, tmp->_field, #_field);
 
 #define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS                       \
   {                                                                            \
   TraceCallbackFunc noteJsChild(&nsScriptObjectTracer::NoteJSChild);           \
   Trace(p, noteJsChild, &cb);                                                  \
   }
@@ -710,852 +720,103 @@ static NS_CYCLE_COLLECTION_INNERCLASS NS
 
 #define NS_IMPL_CYCLE_COLLECTION_CLASS(_class) \
  _class::NS_CYCLE_COLLECTION_INNERCLASS _class::NS_CYCLE_COLLECTION_INNERNAME;
 
 // NB: This is not something you usually want to use.  It is here to allow
 // adding things to the CC graph to help debugging via CC logs, but it does not
 // traverse or unlink anything, so it is useless for anything else.
 #define NS_IMPL_CYCLE_COLLECTION_0(_class)                                     \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_1(_class, _f)                                 \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f)                                           \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f)                                         \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_2(_class, _f1, _f2)                           \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_3(_class, _f1, _f2, _f3)                      \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_4(_class, _f1, _f2, _f3, _f4)                 \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_5(_class, _f1, _f2, _f3, _f4, _f5)            \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_6(_class, _f1, _f2, _f3, _f4, _f5, _f6)       \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
+  NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                       \
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                \
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                          \
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                              \
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-#define NS_IMPL_CYCLE_COLLECTION_7(_class, _f1, _f2, _f3, _f4, _f5, _f6, _f7)  \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_8(_class, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_9(_class, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_10(_class, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9, _f10) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
+#define NS_IMPL_CYCLE_COLLECTION(_class, ...)                                  \
+  NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                       \
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                \
+  NS_IMPL_CYCLE_COLLECTION_UNLINK(__VA_ARGS__)                                 \
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                          \
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                              \
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(__VA_ARGS__)                               \
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-#define NS_IMPL_CYCLE_COLLECTION_17(_class, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9, \
-                                    _f10, _f11, _f12, _f13, _f14, _f15, _f16, _f17)      \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f15)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f16)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f17)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f15)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f16)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f17)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_16(_class, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9, \
-                                    _f10, _f11, _f12, _f13, _f14, _f15, _f16) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)                                 \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f15)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f16)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)                               \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f15)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f16)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_1(_class, _base, _f1)               \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_2(_class, _base, _f1, _f2)          \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_3(_class, _base, _f1, _f2, _f3)     \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_4(_class, _base, _f1, _f2, _f3, _f4) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_5(_class, _base, _f1, _f2, _f3, _f4, _f5) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_6(_class, _base, _f1, _f2, _f3, _f4, _f5, _f6) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_7(_class, _base, _f1, _f2, _f3, _f4, _f5, _f6, _f7) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_8(_class, _base, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
+// TODO: Remove these after changing everything to the variadic variant.
+#define NS_IMPL_CYCLE_COLLECTION_1(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_2(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_3(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_4(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_5(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_6(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_7(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_8(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_9(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_10(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_16(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_17(_class, ...) \
+  NS_IMPL_CYCLE_COLLECTION(_class, __VA_ARGS__)
 
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_9(_class, _base, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_10(_class, _base, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9, _f10) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_11(_class, _base, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9, _f10, _f11) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_12(_class, _base, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9, _f10, _f11, _f12) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_13(_class, _base, _f1, _f2, _f3, _f4, _f5, _f6, _f7, _f8, _f9, _f10, _f11, _f12, _f13) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_14(_class, _base, _f1, _f2, _f3, _f4, _f5, \
-                                              _f6, _f7, _f8, _f9, _f10, _f11, _f12, _f13, _f14) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_15(_class, _base, _f1, _f2, _f3, _f4, _f5, \
-                                              _f6, _f7, _f8, _f9, _f10, _f11, _f12, _f13, _f14, \
-                                              _f15)                            \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f15)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f15)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, ...)                 \
+  NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                       \
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)               \
+  NS_IMPL_CYCLE_COLLECTION_UNLINK(__VA_ARGS__)                                 \
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                          \
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)             \
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(__VA_ARGS__)                               \
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_16(_class, _base, _f1, _f2, _f3, _f4, _f5, \
-                                              _f6, _f7, _f8, _f9, _f10, _f11, _f12, _f13, _f14, \
-                                              _f15, _f16)                      \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f15)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f16)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f15)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f16)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_17(_class, _base, _f1, _f2, _f3, _f4, _f5, \
-                                              _f6, _f7, _f8, _f9, _f10, _f11, _f12, _f13, _f14, \
-                                              _f15, _f16, _f17)                \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f15)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f16)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f17)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f15)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f16)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f17)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_18(_class, _base, _f1, _f2, _f3, _f4, _f5, \
-                                              _f6, _f7, _f8, _f9, _f10, _f11, _f12, _f13, _f14, \
-                                              _f15, _f16, _f17, _f18)          \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f15)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f16)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f17)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f18)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f15)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f16)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f17)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f18)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_19(_class, _base, _f1, _f2, _f3, _f4, _f5, \
-                                              _f6, _f7, _f8, _f9, _f10, _f11, _f12, _f13, _f14, \
-                                              _f15, _f16, _f17, _f18, _f19)    \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f15)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f16)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f17)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f18)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f19)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f15)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f16)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f17)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f18)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f19)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-#define NS_IMPL_CYCLE_COLLECTION_INHERITED_20(_class, _base, _f1, _f2, _f3, _f4, _f5, \
-                                              _f6, _f7, _f8, _f9, _f10, _f11, _f12, _f13, _f14, \
-                                              _f15, _f16, _f17, _f18, _f19, _f20) \
- NS_IMPL_CYCLE_COLLECTION_CLASS(_class)                                        \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(_class, _base)                \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f1)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f2)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f3)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f4)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f5)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f6)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f7)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f8)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f9)                                          \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f10)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f11)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f12)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f13)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f14)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f15)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f16)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f17)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f18)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f19)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK(_f20)                                         \
- NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                           \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(_class, _base)              \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f1)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f2)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f3)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f4)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f5)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f6)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f7)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f8)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f9)                                        \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f10)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f11)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f12)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f13)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f14)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f15)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f16)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f17)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f18)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f19)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_f20)                                       \
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
+// TODO: Remove these after changing everything to the variadic variant.
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_1(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_2(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_3(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_4(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_5(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_6(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_7(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_8(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_9(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_10(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_11(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_12(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_13(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_14(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_15(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_16(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_17(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_18(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_19(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
+#define NS_IMPL_CYCLE_COLLECTION_INHERITED_20(_class, _base, ...) \
+  NS_IMPL_CYCLE_COLLECTION_INHERITED(_class, _base, __VA_ARGS__)
 
 #define NS_CYCLE_COLLECTION_NOTE_EDGE_NAME CycleCollectionNoteEdgeName
 
 #endif // nsCycleCollectionParticipant_h__