RFR: 8329750: Change Universe functions to return more specific Klass* types [v2]
Stefan Karlsson
stefank at openjdk.org
Mon Apr 8 13:46:32 UTC 2024
On Mon, 8 Apr 2024 13:28:34 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/classfile/systemDictionary.cpp line 372:
>>
>>> 370: TypeArrayKlass* tak = Universe::typeArrayKlass(t);
>>> 371: k = tak->array_klass(ndims, CHECK_NULL);
>>> 372: k = k->array_klass(ndims, CHECK_NULL);
>>
>> this looks puzzling. Why are there two array_klass calls now? Add short comments to explain.
>
> I sort of see now but am getting squint lines. It's not important for performance to eliminate a virtual call here.
Hmm. Having two `array_klass` calls were not intentional. I accepted Dean's suggestion in the GitHub UI, but that didn't remove the old `array_klass`. I think I'll revert that change given that it is not important to devirtualize this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18652#discussion_r1555870229
More information about the graal-dev
mailing list