[lworld] RFR: 8334546: [lworld] C2: Calling clone() on non-allocated inline types fails with "Should have been buffered"
Tobias Hartmann
thartmann at openjdk.org
Thu Jun 27 14:16:20 UTC 2024
On Thu, 27 Jun 2024 13:30:55 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> We are currently not handling inline types in the `clone()` instrinsic because it was not possible for a value class to implement `Cloneable`. This changed with [JDK-8332243](https://bugs.openjdk.org/browse/JDK-8332243). A value class now trivially returns the inline type because it has no identity. We need to do the same in the C2 intrinsic for `clone()` when we have an inline type (currently, we are hitting an assert later).
>
> Thanks,
> Christian
Looks good to me!
-------------
Marked as reviewed by thartmann (Committer).
PR Review: https://git.openjdk.org/valhalla/pull/1149#pullrequestreview-2145519212
More information about the valhalla-dev
mailing list