RFR: L/Q again, step two [v2]
Frederic Parain
fparain at openjdk.java.net
Wed May 19 13:05:00 UTC 2021
On Wed, 19 May 2021 12:12:10 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Change error message in test
>
> src/hotspot/share/ci/ciEnv.cpp line 478:
>
>> 476: if (elem_klass != NULL && elem_klass->is_loaded()) {
>> 477: // Now make an array for it
>> 478: bool null_free_array = sym->is_Q_array_signature() && sym->char_at(1) == JVM_SIGNATURE_INLINE_TYPE;
>
> Why do we need the `sym->char_at(1) == JVM_SIGNATURE_INLINE_TYPE` check? Isn't that part of `is_Q_array_signature()`?
The problem with is_Q_array_signature() is that it returns true for arrays of any dimension with the last dimension element klass being a null-free primitive class. It returns true for [QFoo; but also for [[[QFoo;. But for the [[[QFoo; array, the first two dimensions are regular nullable object arrays, only the last array is a null-free array (possibly flattened).
-------------
PR: https://git.openjdk.java.net/valhalla/pull/414
More information about the valhalla-dev
mailing list