RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v5]
Yi Yang
yyang at openjdk.org
Mon Sep 11 01:35:50 UTC 2023
On Mon, 11 Sep 2023 01:12:25 GMT, 温绍锦 <duke at openjdk.org> 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, which is also needed in other places, such as:
>> https://github.com/openjdk/jdk/pull/15555
>
> 温绍锦 has updated the pull request incrementally with one additional commit since the last revision:
>
> remove java.util.Digits
src/java.base/share/classes/java/lang/Integer.java line 459:
> 457: }
> 458:
> 459: /**
Would better to update related comments as well
https://github.com/openjdk/jdk/blob/d2e11593006dc32fb8ebbaf12488b8758c8a19ee/src/hotspot/share/opto/stringopts.cpp#L1163-L1165
There are several occurrences in stringopt phase, grep to find them.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15651#discussion_r1320912610
More information about the core-libs-dev
mailing list