Integrated: 8373801: Adopt arraycopy OopCopyResult from the lworld branch

Stefan Karlsson stefank at openjdk.org
Fri Dec 19 10:55:52 UTC 2025


On Tue, 16 Dec 2025 14:47:15 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> In the Valhalla project there's code to restrict nulls in object arrays. In the GC arraycopy barrier we there have to both do null checks in addition to the already existing cast checks. If one of these two failed the code needs to propagate this up through the callers to the code that asked to do the checks. There it will throw the suitable exception. Previously, it was enough to say success or failed, and a boolean was enough. Now we need three states. So the bool was replaced with an OopCopyResult enum.
> 
> See: https://github.com/openjdk/valhalla/pull/1792
> 
> I propose that we bring this over to the mainline to lower the diff between lworld and the openjdk/jdk.

This pull request has now been integrated.

Changeset: 53e77d21
Author:    Stefan Karlsson <stefank at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/53e77d21c2308daad7d4aecf05da56609ed0291c
Stats:     192 lines in 12 files changed: 63 ins; 13 del; 116 mod

8373801: Adopt arraycopy OopCopyResult from the lworld branch

Reviewed-by: jsikstro, tschatzl, aboldtch

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

PR: https://git.openjdk.org/jdk/pull/28850


More information about the shenandoah-dev mailing list