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

Roland Westrelin roland at openjdk.org
Thu May 2 15:15:59 UTC 2024


On Thu, 2 May 2024 08:24:34 GMT, Dean Long <dlong at openjdk.org> wrote:

>> 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().

Right. Then I think it would be safer to add an assert for `!type->as_instance_klass()->is_interface()`.

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

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


More information about the hotspot-compiler-dev mailing list