8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace

Reviewed-by: kvn, rriggs, mdoerr, gromero
This commit is contained in:
Michihiro Horie 2018-12-11 20:31:18 -05:00
parent d1ef9b19d7
commit 31fbc28af5
21 changed files with 468 additions and 38 deletions

View file

@ -25,6 +25,8 @@
package java.lang;
import jdk.internal.HotSpotIntrinsicCandidate;
/** The CharacterData class encapsulates the large tables found in
Java.lang.Character. */
@ -78,6 +80,23 @@ class CharacterDataLatin1 extends CharacterData {
return props;
}
@HotSpotIntrinsicCandidate
boolean isDigit(int ch) {
return '0' <= ch && ch <= '9';
}
@HotSpotIntrinsicCandidate
boolean isLowerCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.LOWERCASE_LETTER;
}
@HotSpotIntrinsicCandidate
boolean isUpperCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.UPPERCASE_LETTER;
}
boolean isOtherLowercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherLowercase) != 0;
@ -214,6 +233,7 @@ class CharacterDataLatin1 extends CharacterData {
return retval;
}
@HotSpotIntrinsicCandidate
boolean isWhitespace(int ch) {
int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace);