mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8339320: Optimize ClassFile Utf8EntryImpl#inflate
Reviewed-by: liach
This commit is contained in:
parent
fcc9c8d570
commit
a24525b67b
1 changed files with 58 additions and 55 deletions
|
@ -246,8 +246,12 @@ public abstract sealed class AbstractPoolEntry {
|
||||||
this.contentHash = hash;
|
this.contentHash = hash;
|
||||||
charLen = rawLen;
|
charLen = rawLen;
|
||||||
state = State.BYTE;
|
state = State.BYTE;
|
||||||
|
} else {
|
||||||
|
inflateNonAscii(singleBytes, hash);
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
|
|
||||||
|
private void inflateNonAscii(int singleBytes, int hash) {
|
||||||
char[] chararr = new char[rawLen];
|
char[] chararr = new char[rawLen];
|
||||||
int chararr_count = singleBytes;
|
int chararr_count = singleBytes;
|
||||||
// Inflate prefix of bytes to characters
|
// Inflate prefix of bytes to characters
|
||||||
|
@ -306,7 +310,6 @@ public abstract sealed class AbstractPoolEntry {
|
||||||
this.chars = chararr;
|
this.chars = chararr;
|
||||||
state = State.CHAR;
|
state = State.CHAR;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private ConstantPoolException malformedInput(int px) {
|
private ConstantPoolException malformedInput(int px) {
|
||||||
return new ConstantPoolException("#%d: malformed modified UTF8 around byte %d".formatted(index(), px));
|
return new ConstantPoolException("#%d: malformed modified UTF8 around byte %d".formatted(index(), px));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue