On Tue, 3 Sep 2024 09:11:06 GMT, Claes Redestad <redes...@openjdk.org> wrote:
>> Shaojin Wen has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - code style >> - remove unsafe > > src/java.base/share/classes/jdk/internal/classfile/impl/BufWriterImpl.java > line 182: > >> 180: byte[] elems = this.elems; >> 181: >> 182: str.getBytes(0, countGreaterThanZero, elems, offset); > > Might be beneficial to non-latin1 case to move this up into the latin1 block. > > Could you verify the 256 limit is useful? Add a couple of cases to the micro > with much longer latin1 strings; both ASCII and with non-ASCII at the end. > Would be nice if we can keep this simple and the "too long" check feels a bit > premature. I verified locally that the 256 limit didn't help, so I removed it. In fact, some MethodTypeDesc may exceed 256. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20772#discussion_r1741803150