RFR: 8347248: Fingerprinter::size_of_parameters() should not be used for getting number of parameters

Ioi Lam iklam at openjdk.org
Tue Nov 18 22:19:06 UTC 2025


On Tue, 18 Nov 2025 22:01:21 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> The method size_of_parameters() is sometimes used as if it represents the number of arguments rather than the size in bytes of the arguments. This patch changes some of these instances to the correct result or renames some of the variables to the desired result. Verified with tier 1-5 tests.
>
> src/hotspot/share/oops/method.cpp line 736:
> 
>> 734:   for (SignatureStream ss(signature()); !ss.at_return_type(); ss.next()) {
>> 735:     count++;
>> 736:   }
> 
> Shouldn't we do this at construction time and store into a field and return that here?

That would increase footprint. It looks like we don't need this function after all.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28380#discussion_r2539793227


More information about the graal-dev mailing list