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

XMLWordPrintable

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

      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.

            Assignee:
            David Simms
            Reporter:
            Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: