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

[lworld] ValueObject isSubstutiable comparison of float/double should use raw bits

    XMLWordPrintable

Details

    Description

      For value objects, the `acmp` bytecode compares two values field by field recursively. When comparing the values of float and double fields the comparison should be returning `true` if the values are the same.
      Comparing using the `raw` bits meets this requirement.
      This differs from the equals and compare methods that map the `NaN` values to a normalized form, losing information of the difference between different `NaN` values.

      The behavior is specified by updates for Valhalla to JVMS Chapter 6 instructions: if_acmpeq and if_acmpne.

      Attachments

        Issue Links

          Activity

            People

              rriggs Roger Riggs
              rriggs Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: