On Thu, 29 Jun 2023 12:17:23 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
> Please review change for mostly fixing return types in the constant pool and > metadata to fix -Wconversion warnings in JVMTI code. The order of preference > for changes are: 1. change the types to more distinct types (fields in the > constant pool are u2 because that's their size in the classfile), 2. add > direct int casts if the value has been checked in asserts above, and 3. > checked_cast<> if not verified, and 4. added some pointer_delta_as_ints where > needed. > Tested with tier1-4. Marked as reviewed by fparain (Reviewer). src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp line 399: > 397: int length = sizeof(u2); // num_bootstrap_methods > 398: for (int n = 0; n < num_bootstrap_methods; n++) { > 399: int num_bootstrap_arguments = cpool()->operand_argument_count_at(n); operand_arguments_count_at() returns an u2, I think it would make more sense to put the cast line 402 where num_bootstrap_arguments is used. ------------- PR Review: https://git.openjdk.org/jdk/pull/14710#pullrequestreview-1505437059 PR Review Comment: https://git.openjdk.org/jdk/pull/14710#discussion_r1246709628