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

Use C++11 forward declared enum to move CollectedHeap::named_heap

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • 16
    • hotspot
    • gc

      JDK-8247740 added CollectedHeap::named_heap, a protected helper function for accessing derived heap objects. Because it takes the CollectedHeap::Name of the intended collector, for error checking purposes, it had to be declared after the definition of the Name enum. This resulted in multiple public/protected transitions. C++11 permits forward declaration of enums, which would permit reordering.

      While we're at it, the Name enum should be a scoped enum.

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

              Created:
              Updated:
              Resolved: