RFR: 8253566: clazz.isAssignableFrom will return false for interface implementors [v2]
Roland Westrelin
roland at openjdk.java.net
Fri Oct 9 10:52:19 UTC 2020
On Fri, 9 Oct 2020 10:43:46 GMT, Evgeny Nikitin <enikitin at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The pull request now
>> contains three commits:
>> - comment
>> - test
>> - trichotomy opt should not be applied to subtype check
>
> test/hotspot/jtreg/compiler/types/TestSubTypeCheckMacroTrichotomy.java line 47:
>
>> 45:
>> 46: private static int test(Class<?> c1, Class<?> c2) {
>> 47: if (c1 == null) {
>
> I'd like to ask why we have these empty null checks? To silence some warnings?
If profiling reports the branch not taken, C2 compiles:
if (o == null) { }
to:
if (o == null) { trap; }
o = cast_to_non_null(o);
It's a way to control where in the compiled code a particular object is null checked
-------------
PR: https://git.openjdk.java.net/jdk/pull/422
More information about the hotspot-compiler-dev
mailing list