Hi!

The proposed patch replaces multiple boolean[256] tables with a single 
byte[256] one (the bit masks are used to set/test the corresponding properties).

ChangeLog entries:
        * java/io/StreamTokenizer.java:
        (whitespace): Replace with private final byte[] ctype.
        (alphabetic): Likewise.
        (numeric): Likewise.
        (quote): Likewise.
        (comment): Likewise.
        (CT_WHITESPACE): New private byte constant (bit mask).
        (CT_ALPHA): Likewise.
        (CT_NUMERIC): Likewise.
        (CT_QUOTE): Likewise.
        (CT_COMMENT): Likewise.
        (StreamTokenizer(InputStream)): Add Deprecated annotation.
        (commentChar(int)): Replace the code dealing with comment, whitespace,
        alphabetic, numeric, quote tables with the one dealing with ctype[].
        (isWhitespace(int)): Likewise.
        (isAlphabetic(int)): Likewise.
        (isNumeric(int)): Likewise.
        (isQuote(int)): Likewise.
        (isComment(int)): Likewise.
        (ordinaryChar(int)): Likewise.
        (ordinaryChars(int, int)): Likewise.
        (parseNumbers()): Likewise.
        (quoteChar(int)): Likewise.
        (whitespaceChars(int, int)): Likewise.
        (wordChars(int, int)): Likewise.
        (resetChar(int)): Remove unused private method.

Regards.

Attachment: classpath-ivmai-18.diff
Description: Binary data

Reply via email to