RFR: 8335925: Serial: Move allocation API from Generation to subclasses
Ivan Walulya
iwalulya at openjdk.org
Tue Jul 23 12:00:33 UTC 2024
On Wed, 10 Jul 2024 15:54:07 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Trivial moving methods from parent class to subclasses. The unused second arg is also removed along the way. The API names are descriptive enough so that the accompanying comments are dropped as well.
>
> A Generation class that doesn't have an allocation API seems really strange to
> me. And I disagree about the function names being sufficient to eliminate the
> comments.
>
> If all callers are applying the allocation functions to a known derived
> object, then any virtual overhead can be eliminated via "final" qualifiers.
> Interfaces can be a good thing, if they are well designed. Without that
> framework I would expect the different subclasses to (perhaps unintentionally)
> diverge over time. I would only think this change was appropriate if some
> useful point of divergence has already been identified.
I didn't add "Trivial" because of @kimbarrett concerns above, so only integrate after he gives approval.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20084#issuecomment-2245036384
More information about the hotspot-gc-dev
mailing list