[lworld] RFR: 8334546: [lworld] C2: Calling clone() on non-allocated inline types fails with "Should have been buffered"

duke duke at openjdk.org
Fri Jun 28 09:09:34 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

@chhagedorn 
Your change (at version bd1d725da26c4f78ae4950a1ffc03c1f1f5fa784) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/valhalla/pull/1149#issuecomment-2196462433


More information about the valhalla-dev mailing list