RFR: 8310332: Fix -Wconversion warnings in MethodData
Coleen Phillimore
coleenp at openjdk.org
Tue Jun 20 12:58:38 UTC 2023
On Tue, 20 Jun 2023 12:39:19 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Please review this change to narrow parameter and return types to avoid implicit casts, add casts where obvious, add checked_cast<> where not obvious and changed the size of a couple parameters to not cast to the smaller size.
>> I didn't change TypeProfileWidth and BciProfileWidth because jvmci and SA care about the sizes.
>> Tested tier1 all Oracle supported platforms, and tier1-4 linux + windows x64.
>
> src/hotspot/share/oops/methodData.cpp line 483:
>
>> 481: for (uint row = 0; row < row_limit(); row++) {
>> 482: if (bci(row) == no_bci) {
>> 483: set_bci_displacement(row, (int)(mdp - dp()));
>
> `checked_cast` here?
I picked a straight cast because dp() is the address of _data inside this mdp, but now I'm not so sure. I'll change this one.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14557#discussion_r1235227255
More information about the hotspot-dev
mailing list