Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-11 Thread Chen Liang
On Tue, 8 Oct 2024 21:13:47 GMT, Mandy Chung wrote: >> So like `if (rank <= 0) throw ConstantUtils.rankNotPositive(rank);` at >> individual use sites? > > I meant no need to have a utility method. Just do this: > > Suggestion: > > public static void validateArrayDepth(int rank) { >

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 21:04:47 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/constant/ConstantUtils.java line >> 313: >> >>> 311: throw new IllegalArgumentException("rank " + rank + " is >>> not a positive value"); >>> 312: } >>> 313: } >> >> Suggest

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 19:42:14 GMT, Mandy Chung wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> mlchung suggestions: elementType, improve utility methods > > src/java.base/share/classes/jdk/internal/constant/ConstantUti

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 20:46:13 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/constant/ClassDesc.java line 281: >> >>> 279: * >>> 280: * @implSpec >>> 281: * The implementations return the simple name >> >> Suggestion: >> >> * The implementation returns the si

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 19:47:06 GMT, Mandy Chung wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> mlchung suggestions: elementType, improve utility methods > > src/java.base/share/classes/java/lang/constant/ClassDesc.java

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 19:32:34 GMT, Chen Liang wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or interface

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 19:32:34 GMT, Chen Liang wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or interface

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Chen Liang
> @cl4es discovered that Stack Map generation in ClassFile API uses > `componentType` and `arrayType` for `aaload` `aastore` instructions, which > are currently quite slow. We can split out array class descriptors from class > or interfaces to support faster `arrayType` and `componentType` opera