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

Galder Zamarreño galder at openjdk.org
Tue May 7 17:14:23 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().

@dean-long @rwestrel I've added the assert.

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

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


More information about the hotspot-compiler-dev mailing list