[JDK-8379514](https://bugs.openjdk.org/browse/JDK-8379514) Restructured the 
code and left the LayoutKind parameter unused in new_flatArray.

While removing that parameter I realized that the other overload of 
new_flatArray is inconsistent with the other new_*Array functions. It's first 
element is the klass that is going to be used to allocate an instance, whereas 
all the other functions take the element klass as the first parameter. I 
propose that we remove overload and inline its single line into the single call 
site.

I've also updated new_flatArray to take an InlineKlass* instead of a Klass*.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - 8382622: [lworld] Cleanup new_flatArray

Changes: https://git.openjdk.org/valhalla/pull/2347/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2347&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8382622
  Stats: 17 lines in 4 files changed: 3 ins; 8 del; 6 mod
  Patch: https://git.openjdk.org/valhalla/pull/2347.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2347/head:pull/2347

PR: https://git.openjdk.org/valhalla/pull/2347

Reply via email to