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

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

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Not an Issue
    • P4
    • tbd
    • 16
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: