[lworld] RFR: 8373567: [lworld] Move array copy exception throwing out of GC barriers [v2]
Stefan Karlsson
stefank at openjdk.org
Mon Dec 15 19:54:33 UTC 2025
On Mon, 15 Dec 2025 15:45:39 GMT, Dan Heidinga <heidinga at openjdk.org> wrote:
>> Stefan Karlsson has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Mark oop_arraycopy as nodiscard
>> - Terminate OopCopyResult in oop_arraycopy_raw
>
> src/hotspot/share/oops/access.hpp line 335:
>
>> 333: }
>> 334:
>> 335: [[nodiscard]]
>
> Is it worth leaving a comment on why the `[[nodiscard]]` annotation was used here?
I started to write a comment but they end up being something like:
// Make sure that the caller does not accidentally ignore the return value
which is sort-of what [[nodiscard]] means, so I'm not sure this is a good comment.
Maybe something talking about why it is important to not forget to check the return value:
The caller is responsible to throw an exception on failure
WDYT?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1792#discussion_r2620634111
More information about the valhalla-dev
mailing list