Re: RFR: 8299807: newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-09 Thread Glavo
On Mon, 9 Jan 2023 17:07:53 GMT, Sergey Tsypanov wrote: > Why don't we just call `s.isLatin1()` instead of `coder == LATIN1 && > isASCII(val)`? The `isLatin1()` can only replace `coder == LATIN1`, and it is necessary to check whether it is ASCII. In the following, we also need to pass the `co

Re: RFR: 8299807: newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-09 Thread Sergey Tsypanov
On Mon, 9 Jan 2023 03:34:55 GMT, Glavo wrote: > `JavaLangAccess::newStringUTF8NoRepl` and > `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They > always copy arrays, rather than avoiding copying as much as possible as > javadoc says. > > I ran the tier1 test without any n

RFR: 8299807: newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-09 Thread Glavo
`JavaLangAccess::newStringUTF8NoRepl` and `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They always copy arrays, rather than avoiding copying as much as possible as javadoc says. I ran the tier1 test without any new errors. - Commit messages: - fix: newString

Re: RFR: 8299807: newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-09 Thread Glavo
On Mon, 9 Jan 2023 03:34:55 GMT, Glavo wrote: > `JavaLangAccess::newStringUTF8NoRepl` and > `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They > always copy arrays, rather than avoiding copying as much as possible as > javadoc says. > > I ran the tier1 test without any n