Re: RFR: 8278518: String(byte[], int, int, Charset) constructor and String.translateEscapes() misses bounds check elimination

2021-12-13 Thread Сергей Цыпанов
On Mon, 13 Dec 2021 09:55:36 GMT, Alan Bateman wrote: >> Originally this was spotted by by Amir Hadadi in >> https://stackoverflow.com/questions/70272651/missing-bounds-checking-elimination-in-string-constructor >> >> It looks like in the following code in `String(byte[], int, int, Charset)`

Re: RFR: 8278518: String(byte[], int, int, Charset) constructor and String.translateEscapes() misses bounds check elimination

2021-12-13 Thread Alan Bateman
On Mon, 13 Dec 2021 09:39:55 GMT, Сергей Цыпанов wrote: > Originally this was spotted by by Amir Hadadi in > https://stackoverflow.com/questions/70272651/missing-bounds-checking-elimination-in-string-constructor Before anyone looks at this, can you confirm that the patch does not include any

RFR: 8278518: String(byte[], int, int, Charset) constructor and String.translateEscapes() misses bounds check elimination

2021-12-13 Thread Сергей Цыпанов
Originally this was spotted by by Amir Hadadi in https://stackoverflow.com/questions/70272651/missing-bounds-checking-elimination-in-string-constructor It looks like in the following code in `String(byte[], int, int, Charset)` while (offset < sl) { int b1 = bytes[offset]; if (b1 >= 0) {