8281146: Replace StringCoding.hasNegatives with countPositives

Co-authored-by: Lutz Schmidt <lucy@openjdk.org>
Co-authored-by: Martin Doerr <mdoerr@openjdk.org>
Reviewed-by: kvn, lucy, rriggs
This commit is contained in:
Claes Redestad 2022-03-17 09:20:24 +00:00
parent 249d553659
commit beedae1141
36 changed files with 552 additions and 335 deletions

View file

@ -32,6 +32,11 @@ public class Helper {
return StringCoding.hasNegatives(ba, off, len);
}
@jdk.internal.vm.annotation.ForceInline
public static int StringCodingCountPositives(byte[] ba, int off, int len) {
return StringCoding.countPositives(ba, off, len);
}
@jdk.internal.vm.annotation.ForceInline
public static byte[] compressByte(byte[] src, int srcOff, int dstSize, int dstOff, int len) {
byte[] dst = new byte[dstSize];