RFR: 8302850: Implement C1 clone intrinsic that reuses arraycopy code for primitive arrays [v13]

Dean Long dlong at openjdk.org
Thu May 2 08:26:59 UTC 2024


On Thu, 2 May 2024 07:29:04 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> We can't see an interface here because it will get rejected by `ciInstanceKlass::exact_klass`, so we could even assert for that here if we wanted.
>
> Then, I think we should add an assert that `!type->as_instance_klass()->is_interface()` and also that it's not and array of interfaces (using `base_element_klass()`)

An array of interfaces can be exact:

    new Interface[20].getClasss();

and it seems like it would be safe to allow this, so I think we only need one assert for `!type->as_instance_klass()->is_interface()` if we don't trust the result of exact_type().

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17667#discussion_r1587252944


More information about the hotspot-compiler-dev mailing list