RFR: 8339115: Rename TypeKind enum constants to follow code style [v3]

Chen Liang liach at openjdk.org
Thu Aug 29 11:34:20 UTC 2024


On Thu, 29 Aug 2024 07:07:13 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   space
>
> src/java.base/share/classes/java/lang/classfile/CodeBuilder.java line 564:
> 
>> 562:                 case INT -> {
>> 563:                     switch (computationalFrom) {
>> 564:                         case FLOAT -> f2i();
> 
> Actual implementation shows complete conversion table as nested switches.
> What is the advantage of the proposed change?

Smaller switches reduce code size. A single switch case in the range adds 4 bytes to the size. This may be further optimized later.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20737#discussion_r1736034410


More information about the core-libs-dev mailing list