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

Remove dubious type conversions from oop

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b08

      Description

      When running with fastdebug and CHECK_UNHANDLED_OOPS oop is not a simple oopDesc* but a class. This class has a number of type conversions with the comment:

        // Explict user conversions

      However, these are not only *explicit* conversions. They can be invoked implicitly as well.

      I propose that we get rid of most of these and only leave these two:
       operator void* () const
       operator oopDesc* () const

      so that we get better type safety in the code.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stefank Stefan Karlsson
                Reporter:
                stefank Stefan Karlsson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: