RFR: 8343693: [JVMCI] Override ModifiersProvider.isConcrete in ResolvedJavaType to be isArray() || !isAbstract()
Tom Rodriguez
never at openjdk.org
Mon Nov 18 20:20:49 UTC 2024
On Thu, 14 Nov 2024 16:42:31 GMT, Yudi Zheng <yzheng at openjdk.org> wrote:
> The `isArray() || !isAbstract()` idiom is often used in Graal for expressing if a type is concrete and can be instantiated. This PR overrides `ModifiersProvider.isConcrete` in `ResolvedJavaType` to provide this idiom.
I think you need to add a unit test for isConcrete now:
java.lang.AssertionError: test missing for public default boolean jdk.vm.ci.meta.ResolvedJavaType.isConcrete()
src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ModifiersProvider.java line 140:
> 138:
> 139: /**
> 140: * Checks that this element is concrete and not abstract.
It might be worth clarifying that we don't mean `isAbstract()` here. We specifically mean that it corresponds to a method with a real implementation or a type which can be instantiated.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22111#issuecomment-2484044896
PR Review Comment: https://git.openjdk.org/jdk/pull/22111#discussion_r1847215563
More information about the hotspot-compiler-dev
mailing list