[lworld] Integrated: 8348215: [lworld] Unsafe.getValue() and Unsafe.putValue() need nullable flat layout support
Frederic Parain
fparain at openjdk.org
Wed Jan 22 12:50:51 UTC 2025
On Tue, 21 Jan 2025 21:53:36 GMT, Frederic Parain <fparain at openjdk.org> wrote:
> Quick fix to Unsafe.getValue() and Unsafe.putValue() in order to support nullable flat fields and elements. This will fix the substitutability test when values have nullable flat fields.
>
> This is a temporary implementation, the call to find_field_from_offset() being too costly for an Unsafe method. A better fix would be to allow Unsafe to get the layout kind of the field, to cache it and to pass it back to the VM when calling getValue() or putValue(), the same way it proceeds with the field offset.
>
> But this would imply changing all the JDK codes and tests currently using getValue() or putValue(). So this following step will be addressed in a different CR (fixing the substitutability test being more urgent).
>
> The changeset also fixes several bugs encountered while fixing Unsafe.
>
> Fred
This pull request has now been integrated.
Changeset: 25520ca1
Author: Frederic Parain <fparain at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/25520ca1f63f3b805b9cbfea740867244041acad
Stats: 176 lines in 4 files changed: 157 ins; 16 del; 3 mod
8348215: [lworld] Unsafe.getValue() and Unsafe.putValue() need nullable flat layout support
-------------
PR: https://git.openjdk.org/valhalla/pull/1334
More information about the valhalla-dev
mailing list