Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-20 Thread Raffaello Giulietti
On Sat, 18 Jan 2025 00:58:36 GMT, Shaojin Wen wrote: >> Sorry, I was just reading the comment and not how DIGITS is initialized and >> used. >> >> The _correct_ comment should be something like >> >> * 97 -> '9' | ('7' << 8) -> 0x3739 >> >> so the `short` value was correct before, b

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-20 Thread Raffaello Giulietti
On Sat, 18 Jan 2025 00:58:36 GMT, Shaojin Wen wrote: >> Sorry, I was just reading the comment and not how DIGITS is initialized and >> used. >> >> The _correct_ comment should be something like >> >> * 97 -> '9' | ('7' << 8) -> 0x3739 >> >> so the `short` value was correct before, b

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-17 Thread Shaojin Wen
On Fri, 17 Jan 2025 15:29:32 GMT, Raffaello Giulietti wrote: >> fixed it > > Sorry, I was just reading the comment and not how DIGITS is initialized and > used. > > The _correct_ comment should be something like > > * 97 -> '9' | ('7' << 8) -> 0x3739 > > so the `short` value was co

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-17 Thread Raffaello Giulietti
On Fri, 17 Jan 2025 00:05:25 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 42: >> >>> 40: >>> 41: /** >>> 42: * Each element of the array represents the packaging of two ascii >>> characters based on little endian: >> >> The table be

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-16 Thread Shaojin Wen
On Thu, 16 Jan 2025 17:22:50 GMT, Raffaello Giulietti wrote: >> Shaojin Wen has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> co

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-16 Thread Raffaello Giulietti
On Wed, 11 Dec 2024 22:30:32 GMT, Shaojin Wen wrote: >> This PR is a resubmission after PR #21593 was rolled back, and the unsafe >> offset overflow issue has been fixed. >> >> 1) Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to >> reduce duplication. >> >> 2) HexDigi

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2025-01-13 Thread Claes Redestad
On Wed, 11 Dec 2024 22:30:32 GMT, Shaojin Wen wrote: >> This PR is a resubmission after PR #21593 was rolled back, and the unsafe >> offset overflow issue has been fixed. >> >> 1) Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to >> reduce duplication. >> >> 2) HexDigi

Re: RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]

2024-12-11 Thread Shaojin Wen
> This PR is a resubmission after PR #21593 was rolled back, and the unsafe > offset overflow issue has been fixed. > > 1) Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to > reduce duplication. > > 2) HexDigits and OctalDigits also include getCharsLatin1 and getCharsUTF