This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: RFA: Unicode 4 and Java 1.5 Character support
- From: Anthony Balkissoon <abalkiss at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Tue, 28 Mar 2006 11:13:16 -0500
- Subject: Re: RFA: Unicode 4 and Java 1.5 Character support
- References: <1142375356.21753.58.camel@tony.toronto.redhat.com>
This is now committed.
--Tony
On Tue, 2006-03-14 at 17:29 -0500, Anthony Balkissoon wrote:
> Approval is required for the (attached) patch described below.
>
> This patch adds Unicode 4 support to gcj.
>
> In the past, scripts/unicode-muncher.pl was used to parse the Unicode
> raw data and generate classpath/gnu/java/lang/CharData.java which stores
> the tables that Classpath uses. Since GCJ stores the tables differently
> than classpath, we'd then run scripts/MakeCharTables.java to convert
> CharData.java to include/java-chartables.h. However, the format of
> CharData changed with the upgrade to Unicode 4 and the scripts had to be
> revised. The choice was made to replace unicode-muncher.pl and
> MakeCharTables.java with one script (scripts/unicode-to-chartables.pl)
> that directly parses the Unicode raw data and generates the tables that
> gcj uses.
>
> This was done and java-chartables.h was regenerated.
> java/lang/natCharacter.cc and java/lang/Character.java were then edited
> to add new Java 1.5 methods that use the Unicode 4 support.
>
> make check was run both with and without this patch and the results were
> the same:
> # of expected passes 4065
> # of expected failures 10
> # of untested testcases 8
>
> 2006-03-14 Anthony Balkissoon <abalkiss@redhat.com>
>
> * scripts/unicode-muncher.pl: Removed this file.
> * scripts/MakeCharTables.java: Likewise.
> * scripts/unicode-to-chartables.pl: New file.
> * java/lang/natCharacter.cc:
> (UNASSIGNED_TYPE): New field.
> (UNASSIGNED_DIGIT): Likewise.
> (UNASSIGNED_DIRECTION): Likewise.
> (UNASSIGNED_NUMERIC_VALUE): Likewise.
> (PRIVATE_TYPE): Likewise.
> (PRIVATE_DIRECTION): Likewise.
> (readCodePoint): New method.
> (getType(jint)): Likewise.
> (toLowerCase(jint)): Likewise.
> (toUpperCase(jint)): Likewise.
> (toTitleCase(jint)): Likewise.
> (digit(jint, jint)): Likewise.
> (getNumericValue(jint)): Likewise.
> (getDirectionality(jint)): Likewise.
> (readChar),
> (getType(jchar)),
> (toLowerCase(jchar)),
> (toUpperCase(jchar)),
> (toTitleCase(jchar)),
> (digit(jchar, jint)),
> (getNumericValue(jchar)),
> (getDirectionality(jchar)): Changed references from data to data[0],
> blocks to blocks[0], direction to direction[0], numValue to
> numValue[0], upper to upper[0], lower to lower[0], and shift to
> shift[0] to reflect the new structures in java-chartables.h.
> * java/lang/Character.java:
> (readCodePoint): Declared new native method.
> (getType(int)): Likewise.
> (toLowerCase(int)): Likewise.
> (toUpperCase(int)): Likewise.
> (toTitleCase(int)): Likewise.
> (digit(int, int)): Likewise.
> (getNumericValue(int)): Likewise.
> (getDirectionality(int)): Likewise.
> (isLowerCase(int)): New method.
> (isUpperCase(int)): Likewise.
> (itTitleCase(int)): Likewise.
> (isDigit(int)): Likewise.
> (isDefined(int)): Likewise.
> (isLetter(int)): Likewise.
> (isLetterOrDigit(int)): Likewise.
> (isJavaIdentifierStart(int)): Likewise.
> (isJavaIdentifierPart(int)): Likewise.
> (isUnicodeIdentifierStart(int)): Likewise.
> (isUnicodeIdentifierPart(int)): Likewise.
> (isIdentifierIgnorable(int)): Likewise.
> (isSpaceChar(int)): Likewise.
> (isWhitespace(int)): Likewise.
> (isISOControl(int)): Likewise.
> (isMirrored(int)): Likewise.
> * include/java-chartables.h: Generated from
> scripts/unicode-to-chartables.h.
>
> --Tony