On Sun, 24 Jan 2021 15:50:01 GMT, Anton Kozlov <akoz...@openjdk.org> wrote:

>> 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

This is new code, and it should not repeat the mistakes of the past. There's no 
need to refactor the similar existing code as part of this patch.

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

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

Reply via email to