src/share/vm/memory/defNewGeneration.hpp

Print this page
rev 6796 : [mq]: templateOopIterate

@@ -34,10 +34,11 @@
 
 class EdenSpace;
 class ContiguousSpace;
 class ScanClosure;
 class STWGCTimer;
+class CSpaceCounters;
 
 // DefNewGeneration is a young generation containing eden, from- and
 // to-space.
 
 class DefNewGeneration: public Generation {

@@ -298,16 +299,12 @@
   bool no_allocs_since_save_marks();
 
   // Need to declare the full complement of closures, whether we'll
   // override them or not, or get message from the compiler:
   //   oop_since_save_marks_iterate_nv hides virtual function...
-#define DefNew_SINCE_SAVE_MARKS_DECL(OopClosureType, nv_suffix) \
-  void oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl);
-
-  ALL_SINCE_SAVE_MARKS_CLOSURES(DefNew_SINCE_SAVE_MARKS_DECL)
-
-#undef DefNew_SINCE_SAVE_MARKS_DECL
+  template <bool nv, typename OopClosureType>
+  void oop_since_save_marks_iterate(OopClosureType* cl);
 
   // For non-youngest collection, the DefNewGeneration can contribute
   // "to-space".
   virtual void contribute_scratch(ScratchBlock*& list, Generation* requestor,
                           size_t max_alloc_words);