RFR: L/Q again, step two [v2]

Frederic Parain fparain at openjdk.java.net
Wed May 19 13:15:24 UTC 2021


On Wed, 19 May 2021 12:16:25 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/ciArrayKlass.cpp line 124:
> 
>> 122:         } else {
>> 123:           if (ak != NULL && ak->is_flatArray_klass()) {
>> 124:             is_array_flattened = true;
> 
> Why is that boolean needed? Can't we simply return `ciFlatArrayKlass::make(klass)` here?

Boolean removed in the latest commit.

> src/hotspot/share/ci/ciArrayKlass.cpp line 134:
> 
>> 132:       }
>> 133:     } else {
>> 134:       return ciEnv::unloaded_ciobjarrayklass();
> 
> Can't we delegate handling the unloaded case to `ciObjArrayKlass::make(klass)` below? I.e. check for `if (null_free && klass->is_loaded())` above.

I can change that. This was the way it was implemented initially, then I changed it to have the whole logic in a single method, but I don't have a strong opinion about this one.
Updated in the latest commit.

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

PR: https://git.openjdk.java.net/valhalla/pull/414


More information about the valhalla-dev mailing list