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

Change CodeBlobType from unscoped enum to enum class

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • None
    • b10

    Description

      Change:
      struct CodeBlobType {
        enum { [...] }
      }
      To:
      enum class CodeBlobType {
        [...]
      };

      Using C++11 scoped enums provides a more clear view of intent, as enums can be enforced by the type system instead of being passed around as ints. While still providing the underlying int type through static_cast when it is needed. (Such as marshalling to Java or JFR serialisation)

      Attachments

        Issue Links

          Activity

            People

              aboldtch Axel Boldt-Christmas
              aboldtch Axel Boldt-Christmas
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: