RFR: 8310577: Fix -Wconversion warnings in interpreter and oops [v2]
Matias Saavedra Silva
matsaave at openjdk.org
Thu Jun 22 15:53:06 UTC 2023
On Thu, 22 Jun 2023 14:19:16 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Please review this change that's mostly casts and a few int type narrowing changes. The casts are for size calculations between two addresses within the same area so can be int and are never going to be 64 bit.
>> I didn't change CompileThreshold to be 'int' because SA and JVMCI code expects it to be intx. Maybe that should change though.
>> Tested with tier1 on Oracle platforms, and tier1-4 linux and windows x64.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Fred's suggestion.
Looks good! I have a couple of concerns but they might not be an issue.
src/hotspot/share/interpreter/bytecodeUtils.cpp line 356:
> 354: StackSlotAnalysisData::StackSlotAnalysisData(BasicType type) : _bci(INVALID), _type(type) {}
> 355:
> 356: StackSlotAnalysisData::StackSlotAnalysisData(int bci, BasicType type) : _bci((u2)bci), _type(type) {
Looking at this more closely, it seems like bci is meant to be a u2 but it needs one extra bit for the "INVALID" value. Maybe it's possible to represent invalid bci's differently? That way we can just set _bci to be a u2.
src/hotspot/share/interpreter/bytecodes.cpp line 443:
> 441: #endif
> 442: jchar bc_flags = 0;
> 443: if (can_trap) bc_flags |= _bc_can_trap;
I believe that bitwise-or will promote the operands to int. Will this cause any issues here?
-------------
Marked as reviewed by matsaave (Committer).
PR Review: https://git.openjdk.org/jdk/pull/14604#pullrequestreview-1493479959
PR Review Comment: https://git.openjdk.org/jdk/pull/14604#discussion_r1238698168
PR Review Comment: https://git.openjdk.org/jdk/pull/14604#discussion_r1238721770
More information about the hotspot-dev
mailing list