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

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

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 16
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: