RFR: 8302780: Add support for vectorized arraycopy GC barriers [v4]
Erik Österlund
eosterlund at openjdk.org
Fri Feb 24 12:37:38 UTC 2023
On Fri, 24 Feb 2023 11:19:52 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> I tried both, but I actually found it less clear with switch as I then have to worry about a missing break; which would be accepted by the compiler and just yield subtly incorrect machine code. I'm open to doing switch though if you really do think it is more clear then. What do you think?
>
> I think `switch` looks better; it's not that this code will be updated frequently, adding/removing cases. (Ofc, this is subjective.)
>
>
> switch(byte) {
> case 1: ...; break;
> case 2: ...; break;
> ...
> default: should-not-reach;
> }
Okay.
-------------
PR: https://git.openjdk.org/jdk/pull/12670
More information about the hotspot-dev
mailing list