8263677: Improve Character.isLowerCase/isUpperCase lookups

Reviewed-by: erikj, ihse, naoto, rriggs
This commit is contained in:
Claes Redestad 2021-03-17 15:22:06 +00:00
parent b63b5d4c4b
commit e152cc0312
8 changed files with 144 additions and 266 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -493,13 +493,11 @@ class CharacterData01 extends CharacterData {
}
boolean isLowerCase(int ch) {
return (getProperties(ch) & $$maskType) == Character.LOWERCASE_LETTER
|| (getPropertiesEx(ch) & $$maskOtherLowercase) != 0;
return (getPropertiesEx(ch) & $$maskOtherLowercase) != 0;
}
boolean isUpperCase(int ch) {
return (getProperties(ch) & $$maskType) == Character.UPPERCASE_LETTER
|| (getPropertiesEx(ch) & $$maskOtherUppercase) != 0;
return (getPropertiesEx(ch) & $$maskOtherUppercase) != 0;
}
boolean isWhitespace(int ch) {