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

Explicit hashCode and equals for java.lang.runtime.SwitchBootstraps$TypePairs

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 23
    • None
    • core-libs
    • None
    • b20

    Description

      When bootstrapping a switch expression via SwitchBootstraps we unconditionally load and create a map of TypePairs.

      - This map construction means the hashCode and equals methods will be generated. Implementing them explicitly avoids this added early code gen when loading SwitchBootstraps.

      - The TypePairs map is not needed by some bootstraps; moving the static HashMap into TypePairs avoids loading TypePairs altogether in some cases.

      Attachments

        Issue Links

          Activity

            People

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: