8339320: Optimize ClassFile Utf8EntryImpl#inflate

Reviewed-by: liach
This commit is contained in:
Shaojin Wen 2024-10-09 17:21:59 +00:00
parent fcc9c8d570
commit a24525b67b

View file

@ -246,8 +246,12 @@ public abstract sealed class AbstractPoolEntry {
this.contentHash = hash;
charLen = rawLen;
state = State.BYTE;
} else {
inflateNonAscii(singleBytes, hash);
}
else {
}
private void inflateNonAscii(int singleBytes, int hash) {
char[] chararr = new char[rawLen];
int chararr_count = singleBytes;
// Inflate prefix of bytes to characters
@ -306,7 +310,6 @@ public abstract sealed class AbstractPoolEntry {
this.chars = chararr;
state = State.CHAR;
}
}
private ConstantPoolException malformedInput(int px) {
return new ConstantPoolException("#%d: malformed modified UTF8 around byte %d".formatted(index(), px));