Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8079082

VerifyNoCSetOopsClosure is derived twice from Closure

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • gc
    • b77
    • generic
    • generic

        The class VerifyNoCSetOopsClosure directly derives from both OopClosure and ObjectClosure, each of which derive (non-virtually) from Closure. Hence, the verify class contains two distinct Closure bases.

        That multiple inheritance was in support of different iteration functions that needed different closure types. However, the recent removal of SATB buffer checking (JDK-8073717) has eliminated the need for ObjectClosure support.

        So we can remove ObjectClosure from the base classes of the VerifyXXX class. Though it might be worth looking at the places where it is used, to see if we can instead use ObjectClosure in preference to OopClosure. OopClosure requires overloading do_oop on both oop* and narrowOop*, but the VerifyXXX class is only applied to oop* ranges and so defines the narrowOop* as ShouldNotReachHere().

              kbarrett Kim Barrett
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: