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

Remove oopDesc inheritance relation from markOopDesc

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • 9
    • hotspot
    • None
    • gc

      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.

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

              Created:
              Updated:
              Resolved: