mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8212597: Optimize String concatenation setup when using primitive operands
Reviewed-by: shade
This commit is contained in:
parent
da989adeb7
commit
b3b41df70f
3 changed files with 45 additions and 72 deletions
|
@ -138,61 +138,6 @@ final class StringConcatHelper {
|
|||
return (byte)(current | value.coder());
|
||||
}
|
||||
|
||||
/**
|
||||
* Mix coder into current coder
|
||||
* @param current current coder
|
||||
* @param value value to mix in
|
||||
* @return new coder
|
||||
*/
|
||||
static byte mixCoder(byte current, boolean value) {
|
||||
// Booleans are represented with Latin1
|
||||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mix coder into current coder
|
||||
* @param current current coder
|
||||
* @param value value to mix in
|
||||
* @return new coder
|
||||
*/
|
||||
static byte mixCoder(byte current, byte value) {
|
||||
// Bytes are represented with Latin1
|
||||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mix coder into current coder
|
||||
* @param current current coder
|
||||
* @param value value to mix in
|
||||
* @return new coder
|
||||
*/
|
||||
static byte mixCoder(byte current, short value) {
|
||||
// Shorts are represented with Latin1
|
||||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mix coder into current coder
|
||||
* @param current current coder
|
||||
* @param value value to mix in
|
||||
* @return new coder
|
||||
*/
|
||||
static byte mixCoder(byte current, int value) {
|
||||
// Ints are represented with Latin1
|
||||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mix coder into current coder
|
||||
* @param current current coder
|
||||
* @param value value to mix in
|
||||
* @return new coder
|
||||
*/
|
||||
static byte mixCoder(byte current, long value) {
|
||||
// Longs are represented with Latin1
|
||||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepends the stringly representation of boolean value into buffer,
|
||||
* given the coder and final index. Index is measured in chars, not in bytes!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue