8212597: Optimize String concatenation setup when using primitive operands

Reviewed-by: shade
This commit is contained in:
Claes Redestad 2018-10-17 17:35:26 +02:00
parent da989adeb7
commit b3b41df70f
3 changed files with 45 additions and 72 deletions

View file

@ -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!