Those oop closures are used only by defNewGeneration.cpp, group them there. This means genOopClosures can be removed.
Semantically, there are five kinds of closures used for oops in various places/situations.
- OldGenScanClosure: used on dirty cards in old-gen (old -> young)
- PromoteFailureClosure: used for promote-failure on eden/from spaces
- YoungGenScanClosure: used on to-space
- RootScanClosure: used on locations outside heap
- CLDScanClosure: used on locations in CLD
It's clearer to have concrete types and one can different assertions in each of them.
Semantically, there are five kinds of closures used for oops in various places/situations.
- OldGenScanClosure: used on dirty cards in old-gen (old -> young)
- PromoteFailureClosure: used for promote-failure on eden/from spaces
- YoungGenScanClosure: used on to-space
- RootScanClosure: used on locations outside heap
- CLDScanClosure: used on locations in CLD
It's clearer to have concrete types and one can different assertions in each of them.