RFR: 8336103: Clean up confusing Method::is_initializer [v4]
David Holmes
dholmes at openjdk.org
Tue Oct 15 12:13:11 UTC 2024
On Fri, 27 Sep 2024 09:57:06 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> All around Hotspot, we have calls to `method->is_initializer()`. That method tests for both instance and static initializers. In many cases, the uses imply we actually want to test for constructor, not static initializer. Sometimes we filter explicitly for `!m->is_static()`, sometimes we don't. At this point, I think the best way to prevent future accidents is to remove the confusing `is_initializer`.
>>
>> The behavioral changes have been handled by already integrated PRs, see the links in JBS. The changes left here are not (supposed to be) changing the behavior.
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>
> Fix
Simplified version looks good. Sorry I didn't spot this had been updated.
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20120#pullrequestreview-2369143119
More information about the hotspot-dev
mailing list