RFR: 8301997: Move method resolution information out of the cpCache [v6]
Martin Doerr
mdoerr at openjdk.org
Wed Nov 1 18:56:13 UTC 2023
On Wed, 1 Nov 2023 09:18:18 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> This exists in x86 as well in each of the `load_resolved_method_entry_...()` methods. Some of these only have three arguments which cannot be reused so there is the option to include `index` as an argument, but this introduces an inconsistency among these similar methods.
>>
>> Should all of these methods take `index` which can be a reused register?
>
> If you add an extra argument then please name it `temp` or something equally clear as to the fact that this is for storing a local scratch value rather than an input/output. n.b. this is the main reason for resisting the urge to move register declarations+initializations up the call chain. It makes it less obvious that a register is only being used local to a callee.
I think `index` is only used before `flags` and `method` get assigned. Can't we use one of them?
Otherwise, passing `temp` would be fine, too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15455#discussion_r1379186125
More information about the hotspot-dev
mailing list