RFR: 8261954: Dependencies: Improve iteration over class hierarchy under context class
Coleen Phillimore
coleenp at openjdk.java.net
Fri Feb 19 13:03:42 UTC 2021
On Fri, 19 Feb 2021 12:07:47 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> src/hotspot/share/code/dependencies.cpp line 1345:
>>
>>> 1343: } else if (nof_impls == 1) { // unique implementor
>>> 1344: assert(context_type != context_type->implementor(), "not unique");
>>> 1345: context_type = InstanceKlass::cast(context_type->implementor());
>>
>> There's no reason that implementor() should return Klass* rather than InstanceKlass* ? We can clean that up also later to reduce casts. (I thought I already tried to do this once).
>
> Yes, I don't see a compelling reason for `implementor()` to return `Klass*` instead of `InstanceKlass*`. Would be nice to clean it up. Do you want me to file an RFE?
I just filed one. We've been trying to make metadata types more specific for years and must have missed this one.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2630
More information about the hotspot-compiler-dev
mailing list