On Sat, 23 Jan 2021 11:10:17 GMT, Andrew Haley <a...@openjdk.org> wrote:

>> Anton Kozlov has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Address feedback for signature generators
>>  - Enable -Wformat-nonliteral back
>
> src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp line 86:
> 
>> 84: 
>> 85:   switch (_num_int_args) {
>> 86:   case 0:
> 
> I don't think you need such a large switch statement. I think this can be 
> expressed as
> if (num_int_args <= 6) {
>     ldr(as_Register(num_int_args + r1.encoding()), src);
> ... etc.

I like the suggestion. For the defense, new functions were made this way 
intentionally, to match existing `pass_int`, `pass_long`,.. I take your comment 
as a blessing to fix all of them. But I feel that refactoring of existing code 
should go in a separate commit. Especially after `pass_int` used `ldr/str` 
instead of `ldrw/strw`, which looks wrong. 
https://github.com/openjdk/jdk/pull/2200/files#diff-1ff58ce70aeea7e9842d34e8d8fd9c94dd91182999d455618b2a171efd8f742cL87-R122

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

PR: https://git.openjdk.java.net/jdk/pull/2200

Reply via email to