Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 10:33:10 GMT, 温绍锦 wrote: >> These weren't in `java.util.DecimalDigits` but have been copied from >> `java.lang.StringLatin1` - part of an unfinished refactoring? There's no >> clear-cut answer where these best fits but it seems reasonable to keep them >> in `StringLatin1`

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 09:38:44 GMT, Claes Redestad wrote: >> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 201: >> >>> 199: * @return index of the most significant digit or minus sign, if >>> present >>> 200: */ >>> 201: public static int getChars(int i, int

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread Claes Redestad
On Mon, 11 Sep 2023 08:49:18 GMT, Andrey Turbanov wrote: >> 温绍锦 has updated the pull request incrementally with two additional commits >> since the last revision: >> >> - remove duplicate stringSize >> - update related comments > >

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread Andrey Turbanov
On Mon, 11 Sep 2023 04:00:34 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess,

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-10 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: >