[lworld] Optimization added by JDK-8228622 only applies to null-free, flat arrays

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: hotspot

      The optimization added by JDK-8228622 assumes that when we load from an unknown array via 'Parse::load_from_unknown_flat_array' and then cast the result to a non-value class, we can deduce that the array is not flat if the cast succeeds. That only applies to null-free, flat but not to nullable, flat arrays (since JDK-8341767) because null will pass the cast. As a result, the optimization does not kick in anymore after the fix for JDK-8355317 and the relevant tests in TestLWorld.java failed. I adapted them and marked them with "// TODO 8355382".

      See https://mail.openjdk.org/pipermail/valhalla-dev/2019-September/006325.html for details of JDK-8228622.

      We need to fix JDK-8228622 so that it works with nullable arrays as well.

            Assignee:
            Unassigned
            Reporter:
            Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: