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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P4
    • tbd
    • Affects Version/s: 16
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: