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

Fold layout helper check for objects implementing non-array interfaces

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P2 P2
    • 25
    • 25
    • hotspot

      C2 will fold the layout helper load if it can determine that the object is not an array. Currently, this does not work for an object that implements a "non-array" interface, i.e. an interface that is not 'Serializable' and not 'Cloneable':
      https://github.com/openjdk/jdk/blob/c33c1cfe7349ac657cd7bf54861227709d3c8f1b/src/hotspot/share/opto/memnode.cpp#L2215-L2223

      This is probably an oversight from JDK-8297933 that now causes issues like the one described in JDK-8348631 where data is folded but control is not.

      The fix should also undo the change to 'LibraryCallKit::generate_array_guard_common':
      https://github.com/openjdk/jdk/pull/23331

            mchevalier Marc Chevalier
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: