mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8165492: Reduce number of lambda forms generated by MethodHandleInlineCopyStrategy
Reviewed-by: mhaupt, vlivanov, psandoz, shade
This commit is contained in:
parent
ed6ffa4c96
commit
32f983128d
4 changed files with 173 additions and 79 deletions
|
@ -334,11 +334,15 @@ final class StringConcatHelper {
|
|||
/**
|
||||
* Instantiates the String with given buffer and coder
|
||||
* @param buf buffer to use
|
||||
* @param index remaining index
|
||||
* @param coder coder to use
|
||||
* @return String resulting string
|
||||
*/
|
||||
static String newString(byte[] buf, byte coder) {
|
||||
static String newString(byte[] buf, int index, byte coder) {
|
||||
// Use the private, non-copying constructor (unsafe!)
|
||||
if (index != 0) {
|
||||
throw new InternalError("Storage is not completely initialized, " + index + " bytes left");
|
||||
}
|
||||
return new String(buf, coder);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue