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

Remove oopDesc inheritance relation from markOopDesc

    Details

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

      Description

      For some ancient reason markOop inherits from oopDesc, while not being an oop at all.

      This is very confusing, and even misleading since you cannot actually call methods from oopDesc on a markOop because markOop is in essence nothing but an integer.

      Further, to avoid name clashes, naming to access the values encoded in this integer is somewhat unnatural or incomplete. I.e. it would be much better if for example it were possible to retrieve the forwarding pointer using a forwardee() method (instead of oop_decode_pointer() because forwardee() is already taken from oopDesc), or is_forwarded() instead of is_marked() because of the same reason.

      Remove this inheritance relation, and introduce nice method names to retrieve the components of the various fields and their overloads.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tschatzl Thomas Schatzl
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: