Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v9]

2024-05-15 Thread Chen Liang
On Wed, 15 May 2024 07:16:37 GMT, Claes Redestad wrote: >> src/java.base/share/classes/java/lang/constant/ClassDesc.java line 226: >> >>> 224: for (int i = 0; i < rank; i++) { >>> 225: sb.append('['); >>> 226: } >> >> Would `sb.repeat("[", rank);` be better here? >>

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v9]

2024-05-15 Thread Claes Redestad
On Tue, 14 May 2024 20:20:59 GMT, Chen Liang wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add microbenchmark for ClassDesc methods + a few optimizations > > src/java.base/share/classes/java/lang/constant/Class

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v9]

2024-05-14 Thread Chen Liang
On Tue, 14 May 2024 17:25:37 GMT, Claes Redestad wrote: >> This PR suggests refactoring the implementation classes of >> java.lang.constant into a new package jdk.internal.constant to enable >> sharing some trusted static factory methods with users elsewhere in >> java.base, such as java.lang.

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v9]

2024-05-14 Thread Claes Redestad
On Tue, 14 May 2024 17:25:37 GMT, Claes Redestad wrote: >> This PR suggests refactoring the implementation classes of >> java.lang.constant into a new package jdk.internal.constant to enable >> sharing some trusted static factory methods with users elsewhere in >> java.base, such as java.lang.

Re: RFR: 8331724: Refactor j.l.constant implementation to internal package [v9]

2024-05-14 Thread Claes Redestad
> This PR suggests refactoring the implementation classes of java.lang.constant > into a new package jdk.internal.constant to enable sharing some trusted > static factory methods with users elsewhere in java.base, such as > java.lang.invoke and java.lang.classfile. The refactoring also adds some