mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8342650: Move getChars to DecimalDigits
Reviewed-by: liach
This commit is contained in:
parent
ca69a53b76
commit
e1d684c645
12 changed files with 405 additions and 376 deletions
|
@ -298,12 +298,12 @@ final class StringConcatHelper {
|
|||
static long prepend(long indexCoder, byte[] buf, int value, String prefix) {
|
||||
int index = (int)indexCoder;
|
||||
if (indexCoder < UTF16) {
|
||||
index = StringLatin1.getChars(value, index, buf);
|
||||
index = DecimalDigits.getCharsLatin1(value, index, buf);
|
||||
index -= prefix.length();
|
||||
prefix.getBytes(buf, index, String.LATIN1);
|
||||
return index;
|
||||
} else {
|
||||
index = StringUTF16.getChars(value, index, buf);
|
||||
index = DecimalDigits.getCharsUTF16(value, index, buf);
|
||||
index -= prefix.length();
|
||||
prefix.getBytes(buf, index, String.UTF16);
|
||||
return index | UTF16;
|
||||
|
@ -324,12 +324,12 @@ final class StringConcatHelper {
|
|||
static long prepend(long indexCoder, byte[] buf, long value, String prefix) {
|
||||
int index = (int)indexCoder;
|
||||
if (indexCoder < UTF16) {
|
||||
index = StringLatin1.getChars(value, index, buf);
|
||||
index = DecimalDigits.getCharsLatin1(value, index, buf);
|
||||
index -= prefix.length();
|
||||
prefix.getBytes(buf, index, String.LATIN1);
|
||||
return index;
|
||||
} else {
|
||||
index = StringUTF16.getChars(value, index, buf);
|
||||
index = DecimalDigits.getCharsUTF16(value, index, buf);
|
||||
index -= prefix.length();
|
||||
prefix.getBytes(buf, index, String.UTF16);
|
||||
return index | UTF16;
|
||||
|
@ -682,11 +682,11 @@ final class StringConcatHelper {
|
|||
*/
|
||||
static int prepend(int index, byte coder, byte[] buf, int value, String prefix) {
|
||||
if (coder == String.LATIN1) {
|
||||
index = StringLatin1.getChars(value, index, buf);
|
||||
index = DecimalDigits.getCharsLatin1(value, index, buf);
|
||||
index -= prefix.length();
|
||||
prefix.getBytes(buf, index, String.LATIN1);
|
||||
} else {
|
||||
index = StringUTF16.getChars(value, index, buf);
|
||||
index = DecimalDigits.getCharsUTF16(value, index, buf);
|
||||
index -= prefix.length();
|
||||
prefix.getBytes(buf, index, String.UTF16);
|
||||
}
|
||||
|
@ -706,11 +706,11 @@ final class StringConcatHelper {
|
|||
*/
|
||||
static int prepend(int index, byte coder, byte[] buf, long value, String prefix) {
|
||||
if (coder == String.LATIN1) {
|
||||
index = StringLatin1.getChars(value, index, buf);
|
||||
index = DecimalDigits.getCharsLatin1(value, index, buf);
|
||||
index -= prefix.length();
|
||||
prefix.getBytes(buf, index, String.LATIN1);
|
||||
} else {
|
||||
index = StringUTF16.getChars(value, index, buf);
|
||||
index = DecimalDigits.getCharsUTF16(value, index, buf);
|
||||
index -= prefix.length();
|
||||
prefix.getBytes(buf, index, String.UTF16);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue