RFR: 6312651: Compiler should only use verified interface types for optimization [v3]

Roland Westrelin roland at openjdk.org
Thu Nov 10 08:43:23 UTC 2022


On Thu, 10 Nov 2022 00:06:40 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request incrementally with five additional commits since the last revision:
>> 
>>  - review
>>  - review
>>  - review
>>  - review
>>  - review
>
> src/hotspot/share/ci/ciArrayKlass.cpp line 108:
> 
>> 106: }
>> 107: 
>> 108: GrowableArray<ciInstanceKlass*>* ciArrayKlass::interfaces() {
> 
> FTR there's a subtle asymmetry between `ciArrayKlass::interfaces()` and `ciInstanceKlass::transitive_interfaces()` when it comes to memory allocation: the former allocates from resource area while the latter from compiler arena.
> 
> It doesn't cause any problems since `ciArrayKlass::interfaces()` is used only in `Type::Initialize_shared()` to instantiate shared `TypeAryPtr::_array_interfaces`, but it took me some time to find that out. 
> 
> Maybe a helper method in `type.cpp` is a better place for that logic.

How would that work? ciArrayKlass::interfaces() has to transition into the vm which is not something that would feel right in type.cpp.

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

PR: https://git.openjdk.org/jdk/pull/10901


More information about the hotspot-compiler-dev mailing list