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

Replace the macro based implementation of oop_oop_iterate with a template based solution

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • None
    • gc
    • b64

        Replace the macro based implementation of the oop_oop_iterate specialization. The macros are used to generate specialized, overloaded versions of the oop_oop_iterate functions, that knows the concrete type of the passed down oop closure.

        The suggestion is to replace the implementation with a template base version to make it easier to read, change and debug the oop iterators.

        The macros are also used by MarkSweep, ParallelCompat and ParallelScavenge, so they will have to start using the new template versions as well.

        The change will still leave a thin macro layer to allow us to pass down the concrete closure type past the virtual Klass::oop_oop_iterate_nv functions. This is needed since we can't use virtual template functions.

        A future change could potentially remove those macros, and the specialized_oop_closures.hpp file, if we introduce our own sub-Klass dispatching mechanism.

              stefank Stefan Karlsson
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: