Re: RFR: 8313785: Fix -Wconversion warnings in prims code [v2]

2023-08-08 Thread Coleen Phillimore
On Sat, 5 Aug 2023 16:21:57 GMT, Coleen Phillimore wrote: >> This patch fixes Wconversion in code in the src/hotspot/share/prims >> directory. Most of the changes correct the types. jfieldID's are created >> with the int offset returned by InstanceKlass::field_offset(). >> int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code [v2]

2023-08-07 Thread Dean Long
On Fri, 4 Aug 2023 23:24:45 GMT, Coleen Phillimore wrote: > Why not? It's the same and casts the int where it's needed to be an int. To me the checked_cast looks less ugly in the initialization vs at the uses sites, but in this case with only one use it doesn't really matter. - PR

Re: RFR: 8313785: Fix -Wconversion warnings in prims code [v2]

2023-08-07 Thread Coleen Phillimore
On Sat, 5 Aug 2023 16:21:57 GMT, Coleen Phillimore wrote: >> This patch fixes Wconversion in code in the src/hotspot/share/prims >> directory. Most of the changes correct the types. jfieldID's are created >> with the int offset returned by InstanceKlass::field_offset(). >> int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code [v2]

2023-08-06 Thread David Holmes
On Sat, 5 Aug 2023 16:21:57 GMT, Coleen Phillimore wrote: >> This patch fixes Wconversion in code in the src/hotspot/share/prims >> directory. Most of the changes correct the types. jfieldID's are created >> with the int offset returned by InstanceKlass::field_offset(). >> int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code [v2]

2023-08-06 Thread David Holmes
On Fri, 4 Aug 2023 23:06:54 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/jvm.cpp line 612: >> >>> 610: // as implemented in the classic virtual machine; return 0 if object >>> is null >>> 611: return handle == nullptr ? 0 : >>> 612:

Re: RFR: 8313785: Fix -Wconversion warnings in prims code [v2]

2023-08-05 Thread Coleen Phillimore
On Fri, 4 Aug 2023 21:11:05 GMT, Dean Long wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Dean's suggested changes. > > src/hotspot/share/prims/jni.cpp line 209: > >> 207: >> 208: >> 209: intptr_t

Re: RFR: 8313785: Fix -Wconversion warnings in prims code [v2]

2023-08-05 Thread Coleen Phillimore
> This patch fixes Wconversion in code in the src/hotspot/share/prims > directory. Most of the changes correct the types. jfieldID's are created > with the int offset returned by InstanceKlass::field_offset(). > int field_offset (int index) const { return >

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Dean Long
On Fri, 4 Aug 2023 14:37:07 GMT, Coleen Phillimore wrote: > This patch fixes Wconversion in code in the src/hotspot/share/prims > directory. Most of the changes correct the types. jfieldID's are created > with the int offset returned by InstanceKlass::field_offset(). > int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Dean Long
On Fri, 4 Aug 2023 14:37:07 GMT, Coleen Phillimore wrote: > This patch fixes Wconversion in code in the src/hotspot/share/prims > directory. Most of the changes correct the types. jfieldID's are created > with the int offset returned by InstanceKlass::field_offset(). > int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Dean Long
On Fri, 4 Aug 2023 14:37:07 GMT, Coleen Phillimore wrote: > This patch fixes Wconversion in code in the src/hotspot/share/prims > directory. Most of the changes correct the types. jfieldID's are created > with the int offset returned by InstanceKlass::field_offset(). > int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Dean Long
On Fri, 4 Aug 2023 14:37:07 GMT, Coleen Phillimore wrote: > This patch fixes Wconversion in code in the src/hotspot/share/prims > directory. Most of the changes correct the types. jfieldID's are created > with the int offset returned by InstanceKlass::field_offset(). > int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Dean Long
On Fri, 4 Aug 2023 14:37:07 GMT, Coleen Phillimore wrote: > This patch fixes Wconversion in code in the src/hotspot/share/prims > directory. Most of the changes correct the types. jfieldID's are created > with the int offset returned by InstanceKlass::field_offset(). > int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Serguei Spitsyn
On Fri, 4 Aug 2023 19:27:50 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/unsafe.cpp line 111: >> >>> 109: } >>> 110: >>> 111: static inline int field_offset_from_byte_offset(int byte_offset) { >> >> Nit: I wonder if the same fix is needed for the previous function at line >> 107

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Coleen Phillimore
On Fri, 4 Aug 2023 18:10:30 GMT, Serguei Spitsyn wrote: >> This patch fixes Wconversion in code in the src/hotspot/share/prims >> directory. Most of the changes correct the types. jfieldID's are created >> with the int offset returned by InstanceKlass::field_offset(). >> int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Coleen Phillimore
On Fri, 4 Aug 2023 14:37:07 GMT, Coleen Phillimore wrote: > This patch fixes Wconversion in code in the src/hotspot/share/prims > directory. Most of the changes correct the types. jfieldID's are created > with the int offset returned by InstanceKlass::field_offset(). > int

Re: RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Serguei Spitsyn
On Fri, 4 Aug 2023 14:37:07 GMT, Coleen Phillimore wrote: > This patch fixes Wconversion in code in the src/hotspot/share/prims > directory. Most of the changes correct the types. jfieldID's are created > with the int offset returned by InstanceKlass::field_offset(). > int

RFR: 8313785: Fix -Wconversion warnings in prims code

2023-08-04 Thread Coleen Phillimore
This patch fixes Wconversion in code in the src/hotspot/share/prims directory. Most of the changes correct the types. jfieldID's are created with the int offset returned by InstanceKlass::field_offset(). int field_offset (int index) const { return field(index).offset(); } So