mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8213754: PPC64: Add Intrinsics for isDigit/isLowerCase/isUpperCase/isWhitespace
Reviewed-by: kvn, rriggs, mdoerr, gromero
This commit is contained in:
parent
d1ef9b19d7
commit
31fbc28af5
21 changed files with 468 additions and 38 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue