RFR: L/Q again, step two [v2]
Tobias Hartmann
thartmann at openjdk.java.net
Wed May 19 13:56:12 UTC 2021
On Wed, 19 May 2021 13:01:41 GMT, Frederic Parain <fparain at openjdk.org> wrote:
>> 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).
Ah, right. Thanks for the explanation!
-------------
PR: https://git.openjdk.java.net/valhalla/pull/414
More information about the valhalla-dev
mailing list