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

[lworld] Default implementation of Object::hashCode supports inline class

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      javac currently generates the equals/hashCode/toString method for inline type that is a indy call to ValueBootstrapMethods::makeBootstrapMethod

      `==` has been implemented for inline types and hence the equals method synthesized in an inline class can be dropped.

      The current implementation of Object::hashCode is an identity hash code. This issue is to investigate if VM can call ValueBootstrapMethods::hashCodeInvoker for inline types (similar to substitutability test) and stores the hash code in the object header.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dsimms David Simms
              Reporter:
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: