Integrated: 8336103: Clean up confusing Method::is_initializer

Aleksey Shipilev shade at openjdk.org
Tue Oct 15 12:19:20 UTC 2024


On Wed, 10 Jul 2024 17:15:49 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.

This pull request has now been integrated.

Changeset: 54c9348c
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/54c9348c8c0f5b363d1ef31166179fe9ac61ab9c
Stats:     24 lines in 7 files changed: 4 ins; 13 del; 7 mod

8336103: Clean up confusing Method::is_initializer

Reviewed-by: dholmes, coleenp

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

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


More information about the graal-dev mailing list