make/data/characterdata/CharacterDataLatin1.java.template

Print this page

        

@@ -23,10 +23,12 @@
  * questions.
  */
 
 package java.lang;
 
+import jdk.internal.HotSpotIntrinsicCandidate;
+
 /** The CharacterData class encapsulates the large tables found in
     Java.lang.Character. */
 
 class CharacterDataLatin1 extends CharacterData {
 

@@ -76,10 +78,27 @@
         char offset = (char)ch;
         int props = $$LookupEx(offset);
         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;
     }
 

@@ -212,10 +231,11 @@
                 break;
         }
         return retval;
     }
 
+    @HotSpotIntrinsicCandidate
     boolean isWhitespace(int ch) {
         int props = getProperties(ch);
         return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace);
     }