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

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

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: