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

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, 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
@ -217,6 +217,21 @@ class CharacterData0E extends CharacterData {
return retval;
}
boolean isDigit(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.DECIMAL_DIGIT_NUMBER;
}
boolean isLowerCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.LOWERCASE_LETTER;
}
boolean isUpperCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.UPPERCASE_LETTER;
}
boolean isWhitespace(int ch) {
int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace);