[llvm-commits] [llvm-gcc-4.2] r43913 [70/80] - in /llvm-gcc-4.2/trunk: boehm-gc/ boehm-gc/Mac_files/ boehm-gc/cord/ boehm-gc/doc/ boehm-gc/include/ boehm-gc/include/private/ boehm-gc/tests/ libffi/ libffi/include/ libffi/src/ libffi/src/alpha/ libffi/src/arm/ libffi/src/cris/ libffi/src/frv/ libffi/src/ia64/ libffi/src/m32r/ libffi/src/m68k/ libffi/src/mips/ libffi/src/pa/ libffi/src/powerpc/ libffi/src/s390/ libffi/src/sh/ libffi/src/sh64/ libffi/src/sparc/ libffi/src/x86/ libffi/testsuite/ libffi/testsuite/config/ li...

Bill Wendling isanbard at gmail.com
Thu Nov 8 14:57:11 PST 2007


Added: llvm-gcc-4.2/trunk/libjava/include/java-chardecomp.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/java-chardecomp.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/java-chardecomp.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/java-chardecomp.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,3510 @@
+// java-chardecomp.h - Decomposition character tables -*- c++ -*-
+
+#ifndef __JAVA_CHARDECOMP_H__
+#define __JAVA_CHARDECOMP_H__
+
+
+// These tables are automatically generated by the scripts/unicode-decomp.pl
+// script.  DO NOT EDIT the tables.  Instead, fix the script
+// and run it again.
+
+// This file should only be included by natCollator.cc
+
+struct decomp_entry
+{
+  jchar key;
+  const char *value;
+};
+
+static const decomp_entry canonical_decomposition[] =
+{
+  { 0x00c0, "\x00\x41\x03\x00" },
+  { 0x00c1, "\x00\x41\x03\x01" },
+  { 0x00c2, "\x00\x41\x03\x02" },
+  { 0x00c3, "\x00\x41\x03\x03" },
+  { 0x00c4, "\x00\x41\x03\x08" },
+  { 0x00c5, "\x00\x41\x03\x0a" },
+  { 0x00c7, "\x00\x43\x03\x27" },
+  { 0x00c8, "\x00\x45\x03\x00" },
+  { 0x00c9, "\x00\x45\x03\x01" },
+  { 0x00ca, "\x00\x45\x03\x02" },
+  { 0x00cb, "\x00\x45\x03\x08" },
+  { 0x00cc, "\x00\x49\x03\x00" },
+  { 0x00cd, "\x00\x49\x03\x01" },
+  { 0x00ce, "\x00\x49\x03\x02" },
+  { 0x00cf, "\x00\x49\x03\x08" },
+  { 0x00d1, "\x00\x4e\x03\x03" },
+  { 0x00d2, "\x00\x4f\x03\x00" },
+  { 0x00d3, "\x00\x4f\x03\x01" },
+  { 0x00d4, "\x00\x4f\x03\x02" },
+  { 0x00d5, "\x00\x4f\x03\x03" },
+  { 0x00d6, "\x00\x4f\x03\x08" },
+  { 0x00d9, "\x00\x55\x03\x00" },
+  { 0x00da, "\x00\x55\x03\x01" },
+  { 0x00db, "\x00\x55\x03\x02" },
+  { 0x00dc, "\x00\x55\x03\x08" },
+  { 0x00dd, "\x00\x59\x03\x01" },
+  { 0x00e0, "\x00\x61\x03\x00" },
+  { 0x00e1, "\x00\x61\x03\x01" },
+  { 0x00e2, "\x00\x61\x03\x02" },
+  { 0x00e3, "\x00\x61\x03\x03" },
+  { 0x00e4, "\x00\x61\x03\x08" },
+  { 0x00e5, "\x00\x61\x03\x0a" },
+  { 0x00e7, "\x00\x63\x03\x27" },
+  { 0x00e8, "\x00\x65\x03\x00" },
+  { 0x00e9, "\x00\x65\x03\x01" },
+  { 0x00ea, "\x00\x65\x03\x02" },
+  { 0x00eb, "\x00\x65\x03\x08" },
+  { 0x00ec, "\x00\x69\x03\x00" },
+  { 0x00ed, "\x00\x69\x03\x01" },
+  { 0x00ee, "\x00\x69\x03\x02" },
+  { 0x00ef, "\x00\x69\x03\x08" },
+  { 0x00f1, "\x00\x6e\x03\x03" },
+  { 0x00f2, "\x00\x6f\x03\x00" },
+  { 0x00f3, "\x00\x6f\x03\x01" },
+  { 0x00f4, "\x00\x6f\x03\x02" },
+  { 0x00f5, "\x00\x6f\x03\x03" },
+  { 0x00f6, "\x00\x6f\x03\x08" },
+  { 0x00f9, "\x00\x75\x03\x00" },
+  { 0x00fa, "\x00\x75\x03\x01" },
+  { 0x00fb, "\x00\x75\x03\x02" },
+  { 0x00fc, "\x00\x75\x03\x08" },
+  { 0x00fd, "\x00\x79\x03\x01" },
+  { 0x00ff, "\x00\x79\x03\x08" },
+  { 0x0100, "\x00\x41\x03\x04" },
+  { 0x0101, "\x00\x61\x03\x04" },
+  { 0x0102, "\x00\x41\x03\x06" },
+  { 0x0103, "\x00\x61\x03\x06" },
+  { 0x0104, "\x00\x41\x03\x28" },
+  { 0x0105, "\x00\x61\x03\x28" },
+  { 0x0106, "\x00\x43\x03\x01" },
+  { 0x0107, "\x00\x63\x03\x01" },
+  { 0x0108, "\x00\x43\x03\x02" },
+  { 0x0109, "\x00\x63\x03\x02" },
+  { 0x010a, "\x00\x43\x03\x07" },
+  { 0x010b, "\x00\x63\x03\x07" },
+  { 0x010c, "\x00\x43\x03\x0c" },
+  { 0x010d, "\x00\x63\x03\x0c" },
+  { 0x010e, "\x00\x44\x03\x0c" },
+  { 0x010f, "\x00\x64\x03\x0c" },
+  { 0x0112, "\x00\x45\x03\x04" },
+  { 0x0113, "\x00\x65\x03\x04" },
+  { 0x0114, "\x00\x45\x03\x06" },
+  { 0x0115, "\x00\x65\x03\x06" },
+  { 0x0116, "\x00\x45\x03\x07" },
+  { 0x0117, "\x00\x65\x03\x07" },
+  { 0x0118, "\x00\x45\x03\x28" },
+  { 0x0119, "\x00\x65\x03\x28" },
+  { 0x011a, "\x00\x45\x03\x0c" },
+  { 0x011b, "\x00\x65\x03\x0c" },
+  { 0x011c, "\x00\x47\x03\x02" },
+  { 0x011d, "\x00\x67\x03\x02" },
+  { 0x011e, "\x00\x47\x03\x06" },
+  { 0x011f, "\x00\x67\x03\x06" },
+  { 0x0120, "\x00\x47\x03\x07" },
+  { 0x0121, "\x00\x67\x03\x07" },
+  { 0x0122, "\x00\x47\x03\x27" },
+  { 0x0123, "\x00\x67\x03\x27" },
+  { 0x0124, "\x00\x48\x03\x02" },
+  { 0x0125, "\x00\x68\x03\x02" },
+  { 0x0128, "\x00\x49\x03\x03" },
+  { 0x0129, "\x00\x69\x03\x03" },
+  { 0x012a, "\x00\x49\x03\x04" },
+  { 0x012b, "\x00\x69\x03\x04" },
+  { 0x012c, "\x00\x49\x03\x06" },
+  { 0x012d, "\x00\x69\x03\x06" },
+  { 0x012e, "\x00\x49\x03\x28" },
+  { 0x012f, "\x00\x69\x03\x28" },
+  { 0x0130, "\x00\x49\x03\x07" },
+  { 0x0134, "\x00\x4a\x03\x02" },
+  { 0x0135, "\x00\x6a\x03\x02" },
+  { 0x0136, "\x00\x4b\x03\x27" },
+  { 0x0137, "\x00\x6b\x03\x27" },
+  { 0x0139, "\x00\x4c\x03\x01" },
+  { 0x013a, "\x00\x6c\x03\x01" },
+  { 0x013b, "\x00\x4c\x03\x27" },
+  { 0x013c, "\x00\x6c\x03\x27" },
+  { 0x013d, "\x00\x4c\x03\x0c" },
+  { 0x013e, "\x00\x6c\x03\x0c" },
+  { 0x0143, "\x00\x4e\x03\x01" },
+  { 0x0144, "\x00\x6e\x03\x01" },
+  { 0x0145, "\x00\x4e\x03\x27" },
+  { 0x0146, "\x00\x6e\x03\x27" },
+  { 0x0147, "\x00\x4e\x03\x0c" },
+  { 0x0148, "\x00\x6e\x03\x0c" },
+  { 0x014c, "\x00\x4f\x03\x04" },
+  { 0x014d, "\x00\x6f\x03\x04" },
+  { 0x014e, "\x00\x4f\x03\x06" },
+  { 0x014f, "\x00\x6f\x03\x06" },
+  { 0x0150, "\x00\x4f\x03\x0b" },
+  { 0x0151, "\x00\x6f\x03\x0b" },
+  { 0x0154, "\x00\x52\x03\x01" },
+  { 0x0155, "\x00\x72\x03\x01" },
+  { 0x0156, "\x00\x52\x03\x27" },
+  { 0x0157, "\x00\x72\x03\x27" },
+  { 0x0158, "\x00\x52\x03\x0c" },
+  { 0x0159, "\x00\x72\x03\x0c" },
+  { 0x015a, "\x00\x53\x03\x01" },
+  { 0x015b, "\x00\x73\x03\x01" },
+  { 0x015c, "\x00\x53\x03\x02" },
+  { 0x015d, "\x00\x73\x03\x02" },
+  { 0x015e, "\x00\x53\x03\x27" },
+  { 0x015f, "\x00\x73\x03\x27" },
+  { 0x0160, "\x00\x53\x03\x0c" },
+  { 0x0161, "\x00\x73\x03\x0c" },
+  { 0x0162, "\x00\x54\x03\x27" },
+  { 0x0163, "\x00\x74\x03\x27" },
+  { 0x0164, "\x00\x54\x03\x0c" },
+  { 0x0165, "\x00\x74\x03\x0c" },
+  { 0x0168, "\x00\x55\x03\x03" },
+  { 0x0169, "\x00\x75\x03\x03" },
+  { 0x016a, "\x00\x55\x03\x04" },
+  { 0x016b, "\x00\x75\x03\x04" },
+  { 0x016c, "\x00\x55\x03\x06" },
+  { 0x016d, "\x00\x75\x03\x06" },
+  { 0x016e, "\x00\x55\x03\x0a" },
+  { 0x016f, "\x00\x75\x03\x0a" },
+  { 0x0170, "\x00\x55\x03\x0b" },
+  { 0x0171, "\x00\x75\x03\x0b" },
+  { 0x0172, "\x00\x55\x03\x28" },
+  { 0x0173, "\x00\x75\x03\x28" },
+  { 0x0174, "\x00\x57\x03\x02" },
+  { 0x0175, "\x00\x77\x03\x02" },
+  { 0x0176, "\x00\x59\x03\x02" },
+  { 0x0177, "\x00\x79\x03\x02" },
+  { 0x0178, "\x00\x59\x03\x08" },
+  { 0x0179, "\x00\x5a\x03\x01" },
+  { 0x017a, "\x00\x7a\x03\x01" },
+  { 0x017b, "\x00\x5a\x03\x07" },
+  { 0x017c, "\x00\x7a\x03\x07" },
+  { 0x017d, "\x00\x5a\x03\x0c" },
+  { 0x017e, "\x00\x7a\x03\x0c" },
+  { 0x01a0, "\x00\x4f\x03\x1b" },
+  { 0x01a1, "\x00\x6f\x03\x1b" },
+  { 0x01af, "\x00\x55\x03\x1b" },
+  { 0x01b0, "\x00\x75\x03\x1b" },
+  { 0x01cd, "\x00\x41\x03\x0c" },
+  { 0x01ce, "\x00\x61\x03\x0c" },
+  { 0x01cf, "\x00\x49\x03\x0c" },
+  { 0x01d0, "\x00\x69\x03\x0c" },
+  { 0x01d1, "\x00\x4f\x03\x0c" },
+  { 0x01d2, "\x00\x6f\x03\x0c" },
+  { 0x01d3, "\x00\x55\x03\x0c" },
+  { 0x01d4, "\x00\x75\x03\x0c" },
+  { 0x01d5, "\x00\xdc\x03\x04" },
+  { 0x01d6, "\x00\xfc\x03\x04" },
+  { 0x01d7, "\x00\xdc\x03\x01" },
+  { 0x01d8, "\x00\xfc\x03\x01" },
+  { 0x01d9, "\x00\xdc\x03\x0c" },
+  { 0x01da, "\x00\xfc\x03\x0c" },
+  { 0x01db, "\x00\xdc\x03\x00" },
+  { 0x01dc, "\x00\xfc\x03\x00" },
+  { 0x01de, "\x00\xc4\x03\x04" },
+  { 0x01df, "\x00\xe4\x03\x04" },
+  { 0x01e0, "\x02\x26\x03\x04" },
+  { 0x01e1, "\x02\x27\x03\x04" },
+  { 0x01e2, "\x00\xc6\x03\x04" },
+  { 0x01e3, "\x00\xe6\x03\x04" },
+  { 0x01e6, "\x00\x47\x03\x0c" },
+  { 0x01e7, "\x00\x67\x03\x0c" },
+  { 0x01e8, "\x00\x4b\x03\x0c" },
+  { 0x01e9, "\x00\x6b\x03\x0c" },
+  { 0x01ea, "\x00\x4f\x03\x28" },
+  { 0x01eb, "\x00\x6f\x03\x28" },
+  { 0x01ec, "\x01\xea\x03\x04" },
+  { 0x01ed, "\x01\xeb\x03\x04" },
+  { 0x01ee, "\x01\xb7\x03\x0c" },
+  { 0x01ef, "\x02\x92\x03\x0c" },
+  { 0x01f0, "\x00\x6a\x03\x0c" },
+  { 0x01f4, "\x00\x47\x03\x01" },
+  { 0x01f5, "\x00\x67\x03\x01" },
+  { 0x01f8, "\x00\x4e\x03\x00" },
+  { 0x01f9, "\x00\x6e\x03\x00" },
+  { 0x01fa, "\x00\xc5\x03\x01" },
+  { 0x01fb, "\x00\xe5\x03\x01" },
+  { 0x01fc, "\x00\xc6\x03\x01" },
+  { 0x01fd, "\x00\xe6\x03\x01" },
+  { 0x01fe, "\x00\xd8\x03\x01" },
+  { 0x01ff, "\x00\xf8\x03\x01" },
+  { 0x0200, "\x00\x41\x03\x0f" },
+  { 0x0201, "\x00\x61\x03\x0f" },
+  { 0x0202, "\x00\x41\x03\x11" },
+  { 0x0203, "\x00\x61\x03\x11" },
+  { 0x0204, "\x00\x45\x03\x0f" },
+  { 0x0205, "\x00\x65\x03\x0f" },
+  { 0x0206, "\x00\x45\x03\x11" },
+  { 0x0207, "\x00\x65\x03\x11" },
+  { 0x0208, "\x00\x49\x03\x0f" },
+  { 0x0209, "\x00\x69\x03\x0f" },
+  { 0x020a, "\x00\x49\x03\x11" },
+  { 0x020b, "\x00\x69\x03\x11" },
+  { 0x020c, "\x00\x4f\x03\x0f" },
+  { 0x020d, "\x00\x6f\x03\x0f" },
+  { 0x020e, "\x00\x4f\x03\x11" },
+  { 0x020f, "\x00\x6f\x03\x11" },
+  { 0x0210, "\x00\x52\x03\x0f" },
+  { 0x0211, "\x00\x72\x03\x0f" },
+  { 0x0212, "\x00\x52\x03\x11" },
+  { 0x0213, "\x00\x72\x03\x11" },
+  { 0x0214, "\x00\x55\x03\x0f" },
+  { 0x0215, "\x00\x75\x03\x0f" },
+  { 0x0216, "\x00\x55\x03\x11" },
+  { 0x0217, "\x00\x75\x03\x11" },
+  { 0x0218, "\x00\x53\x03\x26" },
+  { 0x0219, "\x00\x73\x03\x26" },
+  { 0x021a, "\x00\x54\x03\x26" },
+  { 0x021b, "\x00\x74\x03\x26" },
+  { 0x021e, "\x00\x48\x03\x0c" },
+  { 0x021f, "\x00\x68\x03\x0c" },
+  { 0x0226, "\x00\x41\x03\x07" },
+  { 0x0227, "\x00\x61\x03\x07" },
+  { 0x0228, "\x00\x45\x03\x27" },
+  { 0x0229, "\x00\x65\x03\x27" },
+  { 0x022a, "\x00\xd6\x03\x04" },
+  { 0x022b, "\x00\xf6\x03\x04" },
+  { 0x022c, "\x00\xd5\x03\x04" },
+  { 0x022d, "\x00\xf5\x03\x04" },
+  { 0x022e, "\x00\x4f\x03\x07" },
+  { 0x022f, "\x00\x6f\x03\x07" },
+  { 0x0230, "\x02\x2e\x03\x04" },
+  { 0x0231, "\x02\x2f\x03\x04" },
+  { 0x0232, "\x00\x59\x03\x04" },
+  { 0x0233, "\x00\x79\x03\x04" },
+  { 0x0340, "\x03\x00" },
+  { 0x0341, "\x03\x01" },
+  { 0x0343, "\x03\x13" },
+  { 0x0344, "\x03\x08\x03\x01" },
+  { 0x0374, "\x02\xb9" },
+  { 0x037e, "\x00\x3b" },
+  { 0x0385, "\x00\xa8\x03\x01" },
+  { 0x0386, "\x03\x91\x03\x01" },
+  { 0x0387, "\x00\xb7" },
+  { 0x0388, "\x03\x95\x03\x01" },
+  { 0x0389, "\x03\x97\x03\x01" },
+  { 0x038a, "\x03\x99\x03\x01" },
+  { 0x038c, "\x03\x9f\x03\x01" },
+  { 0x038e, "\x03\xa5\x03\x01" },
+  { 0x038f, "\x03\xa9\x03\x01" },
+  { 0x0390, "\x03\xca\x03\x01" },
+  { 0x03aa, "\x03\x99\x03\x08" },
+  { 0x03ab, "\x03\xa5\x03\x08" },
+  { 0x03ac, "\x03\xb1\x03\x01" },
+  { 0x03ad, "\x03\xb5\x03\x01" },
+  { 0x03ae, "\x03\xb7\x03\x01" },
+  { 0x03af, "\x03\xb9\x03\x01" },
+  { 0x03b0, "\x03\xcb\x03\x01" },
+  { 0x03ca, "\x03\xb9\x03\x08" },
+  { 0x03cb, "\x03\xc5\x03\x08" },
+  { 0x03cc, "\x03\xbf\x03\x01" },
+  { 0x03cd, "\x03\xc5\x03\x01" },
+  { 0x03ce, "\x03\xc9\x03\x01" },
+  { 0x03d3, "\x03\xd2\x03\x01" },
+  { 0x03d4, "\x03\xd2\x03\x08" },
+  { 0x0400, "\x04\x15\x03\x00" },
+  { 0x0401, "\x04\x15\x03\x08" },
+  { 0x0403, "\x04\x13\x03\x01" },
+  { 0x0407, "\x04\x06\x03\x08" },
+  { 0x040c, "\x04\x1a\x03\x01" },
+  { 0x040d, "\x04\x18\x03\x00" },
+  { 0x040e, "\x04\x23\x03\x06" },
+  { 0x0419, "\x04\x18\x03\x06" },
+  { 0x0439, "\x04\x38\x03\x06" },
+  { 0x0450, "\x04\x35\x03\x00" },
+  { 0x0451, "\x04\x35\x03\x08" },
+  { 0x0453, "\x04\x33\x03\x01" },
+  { 0x0457, "\x04\x56\x03\x08" },
+  { 0x045c, "\x04\x3a\x03\x01" },
+  { 0x045d, "\x04\x38\x03\x00" },
+  { 0x045e, "\x04\x43\x03\x06" },
+  { 0x0476, "\x04\x74\x03\x0f" },
+  { 0x0477, "\x04\x75\x03\x0f" },
+  { 0x04c1, "\x04\x16\x03\x06" },
+  { 0x04c2, "\x04\x36\x03\x06" },
+  { 0x04d0, "\x04\x10\x03\x06" },
+  { 0x04d1, "\x04\x30\x03\x06" },
+  { 0x04d2, "\x04\x10\x03\x08" },
+  { 0x04d3, "\x04\x30\x03\x08" },
+  { 0x04d6, "\x04\x15\x03\x06" },
+  { 0x04d7, "\x04\x35\x03\x06" },
+  { 0x04da, "\x04\xd8\x03\x08" },
+  { 0x04db, "\x04\xd9\x03\x08" },
+  { 0x04dc, "\x04\x16\x03\x08" },
+  { 0x04dd, "\x04\x36\x03\x08" },
+  { 0x04de, "\x04\x17\x03\x08" },
+  { 0x04df, "\x04\x37\x03\x08" },
+  { 0x04e2, "\x04\x18\x03\x04" },
+  { 0x04e3, "\x04\x38\x03\x04" },
+  { 0x04e4, "\x04\x18\x03\x08" },
+  { 0x04e5, "\x04\x38\x03\x08" },
+  { 0x04e6, "\x04\x1e\x03\x08" },
+  { 0x04e7, "\x04\x3e\x03\x08" },
+  { 0x04ea, "\x04\xe8\x03\x08" },
+  { 0x04eb, "\x04\xe9\x03\x08" },
+  { 0x04ec, "\x04\x2d\x03\x08" },
+  { 0x04ed, "\x04\x4d\x03\x08" },
+  { 0x04ee, "\x04\x23\x03\x04" },
+  { 0x04ef, "\x04\x43\x03\x04" },
+  { 0x04f0, "\x04\x23\x03\x08" },
+  { 0x04f1, "\x04\x43\x03\x08" },
+  { 0x04f2, "\x04\x23\x03\x0b" },
+  { 0x04f3, "\x04\x43\x03\x0b" },
+  { 0x04f4, "\x04\x27\x03\x08" },
+  { 0x04f5, "\x04\x47\x03\x08" },
+  { 0x04f8, "\x04\x2b\x03\x08" },
+  { 0x04f9, "\x04\x4b\x03\x08" },
+  { 0x0622, "\x06\x27\x06\x53" },
+  { 0x0623, "\x06\x27\x06\x54" },
+  { 0x0624, "\x06\x48\x06\x54" },
+  { 0x0625, "\x06\x27\x06\x55" },
+  { 0x0626, "\x06\x4a\x06\x54" },
+  { 0x06c0, "\x06\xd5\x06\x54" },
+  { 0x06c2, "\x06\xc1\x06\x54" },
+  { 0x06d3, "\x06\xd2\x06\x54" },
+  { 0x0929, "\x09\x28\x09\x3c" },
+  { 0x0931, "\x09\x30\x09\x3c" },
+  { 0x0934, "\x09\x33\x09\x3c" },
+  { 0x0958, "\x09\x15\x09\x3c" },
+  { 0x0959, "\x09\x16\x09\x3c" },
+  { 0x095a, "\x09\x17\x09\x3c" },
+  { 0x095b, "\x09\x1c\x09\x3c" },
+  { 0x095c, "\x09\x21\x09\x3c" },
+  { 0x095d, "\x09\x22\x09\x3c" },
+  { 0x095e, "\x09\x2b\x09\x3c" },
+  { 0x095f, "\x09\x2f\x09\x3c" },
+  { 0x09cb, "\x09\xc7\x09\xbe" },
+  { 0x09cc, "\x09\xc7\x09\xd7" },
+  { 0x09dc, "\x09\xa1\x09\xbc" },
+  { 0x09dd, "\x09\xa2\x09\xbc" },
+  { 0x09df, "\x09\xaf\x09\xbc" },
+  { 0x0a33, "\x0a\x32\x0a\x3c" },
+  { 0x0a36, "\x0a\x38\x0a\x3c" },
+  { 0x0a59, "\x0a\x16\x0a\x3c" },
+  { 0x0a5a, "\x0a\x17\x0a\x3c" },
+  { 0x0a5b, "\x0a\x1c\x0a\x3c" },
+  { 0x0a5e, "\x0a\x2b\x0a\x3c" },
+  { 0x0b48, "\x0b\x47\x0b\x56" },
+  { 0x0b4b, "\x0b\x47\x0b\x3e" },
+  { 0x0b4c, "\x0b\x47\x0b\x57" },
+  { 0x0b5c, "\x0b\x21\x0b\x3c" },
+  { 0x0b5d, "\x0b\x22\x0b\x3c" },
+  { 0x0b94, "\x0b\x92\x0b\xd7" },
+  { 0x0bca, "\x0b\xc6\x0b\xbe" },
+  { 0x0bcb, "\x0b\xc7\x0b\xbe" },
+  { 0x0bcc, "\x0b\xc6\x0b\xd7" },
+  { 0x0c48, "\x0c\x46\x0c\x56" },
+  { 0x0cc0, "\x0c\xbf\x0c\xd5" },
+  { 0x0cc7, "\x0c\xc6\x0c\xd5" },
+  { 0x0cc8, "\x0c\xc6\x0c\xd6" },
+  { 0x0cca, "\x0c\xc6\x0c\xc2" },
+  { 0x0ccb, "\x0c\xca\x0c\xd5" },
+  { 0x0d4a, "\x0d\x46\x0d\x3e" },
+  { 0x0d4b, "\x0d\x47\x0d\x3e" },
+  { 0x0d4c, "\x0d\x46\x0d\x57" },
+  { 0x0dda, "\x0d\xd9\x0d\xca" },
+  { 0x0ddc, "\x0d\xd9\x0d\xcf" },
+  { 0x0ddd, "\x0d\xdc\x0d\xca" },
+  { 0x0dde, "\x0d\xd9\x0d\xdf" },
+  { 0x0f43, "\x0f\x42\x0f\xb7" },
+  { 0x0f4d, "\x0f\x4c\x0f\xb7" },
+  { 0x0f52, "\x0f\x51\x0f\xb7" },
+  { 0x0f57, "\x0f\x56\x0f\xb7" },
+  { 0x0f5c, "\x0f\x5b\x0f\xb7" },
+  { 0x0f69, "\x0f\x40\x0f\xb5" },
+  { 0x0f73, "\x0f\x71\x0f\x72" },
+  { 0x0f75, "\x0f\x71\x0f\x74" },
+  { 0x0f76, "\x0f\xb2\x0f\x80" },
+  { 0x0f78, "\x0f\xb3\x0f\x80" },
+  { 0x0f81, "\x0f\x71\x0f\x80" },
+  { 0x0f93, "\x0f\x92\x0f\xb7" },
+  { 0x0f9d, "\x0f\x9c\x0f\xb7" },
+  { 0x0fa2, "\x0f\xa1\x0f\xb7" },
+  { 0x0fa7, "\x0f\xa6\x0f\xb7" },
+  { 0x0fac, "\x0f\xab\x0f\xb7" },
+  { 0x0fb9, "\x0f\x90\x0f\xb5" },
+  { 0x1026, "\x10\x25\x10\x2e" },
+  { 0x1e00, "\x00\x41\x03\x25" },
+  { 0x1e01, "\x00\x61\x03\x25" },
+  { 0x1e02, "\x00\x42\x03\x07" },
+  { 0x1e03, "\x00\x62\x03\x07" },
+  { 0x1e04, "\x00\x42\x03\x23" },
+  { 0x1e05, "\x00\x62\x03\x23" },
+  { 0x1e06, "\x00\x42\x03\x31" },
+  { 0x1e07, "\x00\x62\x03\x31" },
+  { 0x1e08, "\x00\xc7\x03\x01" },
+  { 0x1e09, "\x00\xe7\x03\x01" },
+  { 0x1e0a, "\x00\x44\x03\x07" },
+  { 0x1e0b, "\x00\x64\x03\x07" },
+  { 0x1e0c, "\x00\x44\x03\x23" },
+  { 0x1e0d, "\x00\x64\x03\x23" },
+  { 0x1e0e, "\x00\x44\x03\x31" },
+  { 0x1e0f, "\x00\x64\x03\x31" },
+  { 0x1e10, "\x00\x44\x03\x27" },
+  { 0x1e11, "\x00\x64\x03\x27" },
+  { 0x1e12, "\x00\x44\x03\x2d" },
+  { 0x1e13, "\x00\x64\x03\x2d" },
+  { 0x1e14, "\x01\x12\x03\x00" },
+  { 0x1e15, "\x01\x13\x03\x00" },
+  { 0x1e16, "\x01\x12\x03\x01" },
+  { 0x1e17, "\x01\x13\x03\x01" },
+  { 0x1e18, "\x00\x45\x03\x2d" },
+  { 0x1e19, "\x00\x65\x03\x2d" },
+  { 0x1e1a, "\x00\x45\x03\x30" },
+  { 0x1e1b, "\x00\x65\x03\x30" },
+  { 0x1e1c, "\x02\x28\x03\x06" },
+  { 0x1e1d, "\x02\x29\x03\x06" },
+  { 0x1e1e, "\x00\x46\x03\x07" },
+  { 0x1e1f, "\x00\x66\x03\x07" },
+  { 0x1e20, "\x00\x47\x03\x04" },
+  { 0x1e21, "\x00\x67\x03\x04" },
+  { 0x1e22, "\x00\x48\x03\x07" },
+  { 0x1e23, "\x00\x68\x03\x07" },
+  { 0x1e24, "\x00\x48\x03\x23" },
+  { 0x1e25, "\x00\x68\x03\x23" },
+  { 0x1e26, "\x00\x48\x03\x08" },
+  { 0x1e27, "\x00\x68\x03\x08" },
+  { 0x1e28, "\x00\x48\x03\x27" },
+  { 0x1e29, "\x00\x68\x03\x27" },
+  { 0x1e2a, "\x00\x48\x03\x2e" },
+  { 0x1e2b, "\x00\x68\x03\x2e" },
+  { 0x1e2c, "\x00\x49\x03\x30" },
+  { 0x1e2d, "\x00\x69\x03\x30" },
+  { 0x1e2e, "\x00\xcf\x03\x01" },
+  { 0x1e2f, "\x00\xef\x03\x01" },
+  { 0x1e30, "\x00\x4b\x03\x01" },
+  { 0x1e31, "\x00\x6b\x03\x01" },
+  { 0x1e32, "\x00\x4b\x03\x23" },
+  { 0x1e33, "\x00\x6b\x03\x23" },
+  { 0x1e34, "\x00\x4b\x03\x31" },
+  { 0x1e35, "\x00\x6b\x03\x31" },
+  { 0x1e36, "\x00\x4c\x03\x23" },
+  { 0x1e37, "\x00\x6c\x03\x23" },
+  { 0x1e38, "\x1e\x36\x03\x04" },
+  { 0x1e39, "\x1e\x37\x03\x04" },
+  { 0x1e3a, "\x00\x4c\x03\x31" },
+  { 0x1e3b, "\x00\x6c\x03\x31" },
+  { 0x1e3c, "\x00\x4c\x03\x2d" },
+  { 0x1e3d, "\x00\x6c\x03\x2d" },
+  { 0x1e3e, "\x00\x4d\x03\x01" },
+  { 0x1e3f, "\x00\x6d\x03\x01" },
+  { 0x1e40, "\x00\x4d\x03\x07" },
+  { 0x1e41, "\x00\x6d\x03\x07" },
+  { 0x1e42, "\x00\x4d\x03\x23" },
+  { 0x1e43, "\x00\x6d\x03\x23" },
+  { 0x1e44, "\x00\x4e\x03\x07" },
+  { 0x1e45, "\x00\x6e\x03\x07" },
+  { 0x1e46, "\x00\x4e\x03\x23" },
+  { 0x1e47, "\x00\x6e\x03\x23" },
+  { 0x1e48, "\x00\x4e\x03\x31" },
+  { 0x1e49, "\x00\x6e\x03\x31" },
+  { 0x1e4a, "\x00\x4e\x03\x2d" },
+  { 0x1e4b, "\x00\x6e\x03\x2d" },
+  { 0x1e4c, "\x00\xd5\x03\x01" },
+  { 0x1e4d, "\x00\xf5\x03\x01" },
+  { 0x1e4e, "\x00\xd5\x03\x08" },
+  { 0x1e4f, "\x00\xf5\x03\x08" },
+  { 0x1e50, "\x01\x4c\x03\x00" },
+  { 0x1e51, "\x01\x4d\x03\x00" },
+  { 0x1e52, "\x01\x4c\x03\x01" },
+  { 0x1e53, "\x01\x4d\x03\x01" },
+  { 0x1e54, "\x00\x50\x03\x01" },
+  { 0x1e55, "\x00\x70\x03\x01" },
+  { 0x1e56, "\x00\x50\x03\x07" },
+  { 0x1e57, "\x00\x70\x03\x07" },
+  { 0x1e58, "\x00\x52\x03\x07" },
+  { 0x1e59, "\x00\x72\x03\x07" },
+  { 0x1e5a, "\x00\x52\x03\x23" },
+  { 0x1e5b, "\x00\x72\x03\x23" },
+  { 0x1e5c, "\x1e\x5a\x03\x04" },
+  { 0x1e5d, "\x1e\x5b\x03\x04" },
+  { 0x1e5e, "\x00\x52\x03\x31" },
+  { 0x1e5f, "\x00\x72\x03\x31" },
+  { 0x1e60, "\x00\x53\x03\x07" },
+  { 0x1e61, "\x00\x73\x03\x07" },
+  { 0x1e62, "\x00\x53\x03\x23" },
+  { 0x1e63, "\x00\x73\x03\x23" },
+  { 0x1e64, "\x01\x5a\x03\x07" },
+  { 0x1e65, "\x01\x5b\x03\x07" },
+  { 0x1e66, "\x01\x60\x03\x07" },
+  { 0x1e67, "\x01\x61\x03\x07" },
+  { 0x1e68, "\x1e\x62\x03\x07" },
+  { 0x1e69, "\x1e\x63\x03\x07" },
+  { 0x1e6a, "\x00\x54\x03\x07" },
+  { 0x1e6b, "\x00\x74\x03\x07" },
+  { 0x1e6c, "\x00\x54\x03\x23" },
+  { 0x1e6d, "\x00\x74\x03\x23" },
+  { 0x1e6e, "\x00\x54\x03\x31" },
+  { 0x1e6f, "\x00\x74\x03\x31" },
+  { 0x1e70, "\x00\x54\x03\x2d" },
+  { 0x1e71, "\x00\x74\x03\x2d" },
+  { 0x1e72, "\x00\x55\x03\x24" },
+  { 0x1e73, "\x00\x75\x03\x24" },
+  { 0x1e74, "\x00\x55\x03\x30" },
+  { 0x1e75, "\x00\x75\x03\x30" },
+  { 0x1e76, "\x00\x55\x03\x2d" },
+  { 0x1e77, "\x00\x75\x03\x2d" },
+  { 0x1e78, "\x01\x68\x03\x01" },
+  { 0x1e79, "\x01\x69\x03\x01" },
+  { 0x1e7a, "\x01\x6a\x03\x08" },
+  { 0x1e7b, "\x01\x6b\x03\x08" },
+  { 0x1e7c, "\x00\x56\x03\x03" },
+  { 0x1e7d, "\x00\x76\x03\x03" },
+  { 0x1e7e, "\x00\x56\x03\x23" },
+  { 0x1e7f, "\x00\x76\x03\x23" },
+  { 0x1e80, "\x00\x57\x03\x00" },
+  { 0x1e81, "\x00\x77\x03\x00" },
+  { 0x1e82, "\x00\x57\x03\x01" },
+  { 0x1e83, "\x00\x77\x03\x01" },
+  { 0x1e84, "\x00\x57\x03\x08" },
+  { 0x1e85, "\x00\x77\x03\x08" },
+  { 0x1e86, "\x00\x57\x03\x07" },
+  { 0x1e87, "\x00\x77\x03\x07" },
+  { 0x1e88, "\x00\x57\x03\x23" },
+  { 0x1e89, "\x00\x77\x03\x23" },
+  { 0x1e8a, "\x00\x58\x03\x07" },
+  { 0x1e8b, "\x00\x78\x03\x07" },
+  { 0x1e8c, "\x00\x58\x03\x08" },
+  { 0x1e8d, "\x00\x78\x03\x08" },
+  { 0x1e8e, "\x00\x59\x03\x07" },
+  { 0x1e8f, "\x00\x79\x03\x07" },
+  { 0x1e90, "\x00\x5a\x03\x02" },
+  { 0x1e91, "\x00\x7a\x03\x02" },
+  { 0x1e92, "\x00\x5a\x03\x23" },
+  { 0x1e93, "\x00\x7a\x03\x23" },
+  { 0x1e94, "\x00\x5a\x03\x31" },
+  { 0x1e95, "\x00\x7a\x03\x31" },
+  { 0x1e96, "\x00\x68\x03\x31" },
+  { 0x1e97, "\x00\x74\x03\x08" },
+  { 0x1e98, "\x00\x77\x03\x0a" },
+  { 0x1e99, "\x00\x79\x03\x0a" },
+  { 0x1e9b, "\x01\x7f\x03\x07" },
+  { 0x1ea0, "\x00\x41\x03\x23" },
+  { 0x1ea1, "\x00\x61\x03\x23" },
+  { 0x1ea2, "\x00\x41\x03\x09" },
+  { 0x1ea3, "\x00\x61\x03\x09" },
+  { 0x1ea4, "\x00\xc2\x03\x01" },
+  { 0x1ea5, "\x00\xe2\x03\x01" },
+  { 0x1ea6, "\x00\xc2\x03\x00" },
+  { 0x1ea7, "\x00\xe2\x03\x00" },
+  { 0x1ea8, "\x00\xc2\x03\x09" },
+  { 0x1ea9, "\x00\xe2\x03\x09" },
+  { 0x1eaa, "\x00\xc2\x03\x03" },
+  { 0x1eab, "\x00\xe2\x03\x03" },
+  { 0x1eac, "\x1e\xa0\x03\x02" },
+  { 0x1ead, "\x1e\xa1\x03\x02" },
+  { 0x1eae, "\x01\x02\x03\x01" },
+  { 0x1eaf, "\x01\x03\x03\x01" },
+  { 0x1eb0, "\x01\x02\x03\x00" },
+  { 0x1eb1, "\x01\x03\x03\x00" },
+  { 0x1eb2, "\x01\x02\x03\x09" },
+  { 0x1eb3, "\x01\x03\x03\x09" },
+  { 0x1eb4, "\x01\x02\x03\x03" },
+  { 0x1eb5, "\x01\x03\x03\x03" },
+  { 0x1eb6, "\x1e\xa0\x03\x06" },
+  { 0x1eb7, "\x1e\xa1\x03\x06" },
+  { 0x1eb8, "\x00\x45\x03\x23" },
+  { 0x1eb9, "\x00\x65\x03\x23" },
+  { 0x1eba, "\x00\x45\x03\x09" },
+  { 0x1ebb, "\x00\x65\x03\x09" },
+  { 0x1ebc, "\x00\x45\x03\x03" },
+  { 0x1ebd, "\x00\x65\x03\x03" },
+  { 0x1ebe, "\x00\xca\x03\x01" },
+  { 0x1ebf, "\x00\xea\x03\x01" },
+  { 0x1ec0, "\x00\xca\x03\x00" },
+  { 0x1ec1, "\x00\xea\x03\x00" },
+  { 0x1ec2, "\x00\xca\x03\x09" },
+  { 0x1ec3, "\x00\xea\x03\x09" },
+  { 0x1ec4, "\x00\xca\x03\x03" },
+  { 0x1ec5, "\x00\xea\x03\x03" },
+  { 0x1ec6, "\x1e\xb8\x03\x02" },
+  { 0x1ec7, "\x1e\xb9\x03\x02" },
+  { 0x1ec8, "\x00\x49\x03\x09" },
+  { 0x1ec9, "\x00\x69\x03\x09" },
+  { 0x1eca, "\x00\x49\x03\x23" },
+  { 0x1ecb, "\x00\x69\x03\x23" },
+  { 0x1ecc, "\x00\x4f\x03\x23" },
+  { 0x1ecd, "\x00\x6f\x03\x23" },
+  { 0x1ece, "\x00\x4f\x03\x09" },
+  { 0x1ecf, "\x00\x6f\x03\x09" },
+  { 0x1ed0, "\x00\xd4\x03\x01" },
+  { 0x1ed1, "\x00\xf4\x03\x01" },
+  { 0x1ed2, "\x00\xd4\x03\x00" },
+  { 0x1ed3, "\x00\xf4\x03\x00" },
+  { 0x1ed4, "\x00\xd4\x03\x09" },
+  { 0x1ed5, "\x00\xf4\x03\x09" },
+  { 0x1ed6, "\x00\xd4\x03\x03" },
+  { 0x1ed7, "\x00\xf4\x03\x03" },
+  { 0x1ed8, "\x1e\xcc\x03\x02" },
+  { 0x1ed9, "\x1e\xcd\x03\x02" },
+  { 0x1eda, "\x01\xa0\x03\x01" },
+  { 0x1edb, "\x01\xa1\x03\x01" },
+  { 0x1edc, "\x01\xa0\x03\x00" },
+  { 0x1edd, "\x01\xa1\x03\x00" },
+  { 0x1ede, "\x01\xa0\x03\x09" },
+  { 0x1edf, "\x01\xa1\x03\x09" },
+  { 0x1ee0, "\x01\xa0\x03\x03" },
+  { 0x1ee1, "\x01\xa1\x03\x03" },
+  { 0x1ee2, "\x01\xa0\x03\x23" },
+  { 0x1ee3, "\x01\xa1\x03\x23" },
+  { 0x1ee4, "\x00\x55\x03\x23" },
+  { 0x1ee5, "\x00\x75\x03\x23" },
+  { 0x1ee6, "\x00\x55\x03\x09" },
+  { 0x1ee7, "\x00\x75\x03\x09" },
+  { 0x1ee8, "\x01\xaf\x03\x01" },
+  { 0x1ee9, "\x01\xb0\x03\x01" },
+  { 0x1eea, "\x01\xaf\x03\x00" },
+  { 0x1eeb, "\x01\xb0\x03\x00" },
+  { 0x1eec, "\x01\xaf\x03\x09" },
+  { 0x1eed, "\x01\xb0\x03\x09" },
+  { 0x1eee, "\x01\xaf\x03\x03" },
+  { 0x1eef, "\x01\xb0\x03\x03" },
+  { 0x1ef0, "\x01\xaf\x03\x23" },
+  { 0x1ef1, "\x01\xb0\x03\x23" },
+  { 0x1ef2, "\x00\x59\x03\x00" },
+  { 0x1ef3, "\x00\x79\x03\x00" },
+  { 0x1ef4, "\x00\x59\x03\x23" },
+  { 0x1ef5, "\x00\x79\x03\x23" },
+  { 0x1ef6, "\x00\x59\x03\x09" },
+  { 0x1ef7, "\x00\x79\x03\x09" },
+  { 0x1ef8, "\x00\x59\x03\x03" },
+  { 0x1ef9, "\x00\x79\x03\x03" },
+  { 0x1f00, "\x03\xb1\x03\x13" },
+  { 0x1f01, "\x03\xb1\x03\x14" },
+  { 0x1f02, "\x1f\x00\x03\x00" },
+  { 0x1f03, "\x1f\x01\x03\x00" },
+  { 0x1f04, "\x1f\x00\x03\x01" },
+  { 0x1f05, "\x1f\x01\x03\x01" },
+  { 0x1f06, "\x1f\x00\x03\x42" },
+  { 0x1f07, "\x1f\x01\x03\x42" },
+  { 0x1f08, "\x03\x91\x03\x13" },
+  { 0x1f09, "\x03\x91\x03\x14" },
+  { 0x1f0a, "\x1f\x08\x03\x00" },
+  { 0x1f0b, "\x1f\x09\x03\x00" },
+  { 0x1f0c, "\x1f\x08\x03\x01" },
+  { 0x1f0d, "\x1f\x09\x03\x01" },
+  { 0x1f0e, "\x1f\x08\x03\x42" },
+  { 0x1f0f, "\x1f\x09\x03\x42" },
+  { 0x1f10, "\x03\xb5\x03\x13" },
+  { 0x1f11, "\x03\xb5\x03\x14" },
+  { 0x1f12, "\x1f\x10\x03\x00" },
+  { 0x1f13, "\x1f\x11\x03\x00" },
+  { 0x1f14, "\x1f\x10\x03\x01" },
+  { 0x1f15, "\x1f\x11\x03\x01" },
+  { 0x1f18, "\x03\x95\x03\x13" },
+  { 0x1f19, "\x03\x95\x03\x14" },
+  { 0x1f1a, "\x1f\x18\x03\x00" },
+  { 0x1f1b, "\x1f\x19\x03\x00" },
+  { 0x1f1c, "\x1f\x18\x03\x01" },
+  { 0x1f1d, "\x1f\x19\x03\x01" },
+  { 0x1f20, "\x03\xb7\x03\x13" },
+  { 0x1f21, "\x03\xb7\x03\x14" },
+  { 0x1f22, "\x1f\x20\x03\x00" },
+  { 0x1f23, "\x1f\x21\x03\x00" },
+  { 0x1f24, "\x1f\x20\x03\x01" },
+  { 0x1f25, "\x1f\x21\x03\x01" },
+  { 0x1f26, "\x1f\x20\x03\x42" },
+  { 0x1f27, "\x1f\x21\x03\x42" },
+  { 0x1f28, "\x03\x97\x03\x13" },
+  { 0x1f29, "\x03\x97\x03\x14" },
+  { 0x1f2a, "\x1f\x28\x03\x00" },
+  { 0x1f2b, "\x1f\x29\x03\x00" },
+  { 0x1f2c, "\x1f\x28\x03\x01" },
+  { 0x1f2d, "\x1f\x29\x03\x01" },
+  { 0x1f2e, "\x1f\x28\x03\x42" },
+  { 0x1f2f, "\x1f\x29\x03\x42" },
+  { 0x1f30, "\x03\xb9\x03\x13" },
+  { 0x1f31, "\x03\xb9\x03\x14" },
+  { 0x1f32, "\x1f\x30\x03\x00" },
+  { 0x1f33, "\x1f\x31\x03\x00" },
+  { 0x1f34, "\x1f\x30\x03\x01" },
+  { 0x1f35, "\x1f\x31\x03\x01" },
+  { 0x1f36, "\x1f\x30\x03\x42" },
+  { 0x1f37, "\x1f\x31\x03\x42" },
+  { 0x1f38, "\x03\x99\x03\x13" },
+  { 0x1f39, "\x03\x99\x03\x14" },
+  { 0x1f3a, "\x1f\x38\x03\x00" },
+  { 0x1f3b, "\x1f\x39\x03\x00" },
+  { 0x1f3c, "\x1f\x38\x03\x01" },
+  { 0x1f3d, "\x1f\x39\x03\x01" },
+  { 0x1f3e, "\x1f\x38\x03\x42" },
+  { 0x1f3f, "\x1f\x39\x03\x42" },
+  { 0x1f40, "\x03\xbf\x03\x13" },
+  { 0x1f41, "\x03\xbf\x03\x14" },
+  { 0x1f42, "\x1f\x40\x03\x00" },
+  { 0x1f43, "\x1f\x41\x03\x00" },
+  { 0x1f44, "\x1f\x40\x03\x01" },
+  { 0x1f45, "\x1f\x41\x03\x01" },
+  { 0x1f48, "\x03\x9f\x03\x13" },
+  { 0x1f49, "\x03\x9f\x03\x14" },
+  { 0x1f4a, "\x1f\x48\x03\x00" },
+  { 0x1f4b, "\x1f\x49\x03\x00" },
+  { 0x1f4c, "\x1f\x48\x03\x01" },
+  { 0x1f4d, "\x1f\x49\x03\x01" },
+  { 0x1f50, "\x03\xc5\x03\x13" },
+  { 0x1f51, "\x03\xc5\x03\x14" },
+  { 0x1f52, "\x1f\x50\x03\x00" },
+  { 0x1f53, "\x1f\x51\x03\x00" },
+  { 0x1f54, "\x1f\x50\x03\x01" },
+  { 0x1f55, "\x1f\x51\x03\x01" },
+  { 0x1f56, "\x1f\x50\x03\x42" },
+  { 0x1f57, "\x1f\x51\x03\x42" },
+  { 0x1f59, "\x03\xa5\x03\x14" },
+  { 0x1f5b, "\x1f\x59\x03\x00" },
+  { 0x1f5d, "\x1f\x59\x03\x01" },
+  { 0x1f5f, "\x1f\x59\x03\x42" },
+  { 0x1f60, "\x03\xc9\x03\x13" },
+  { 0x1f61, "\x03\xc9\x03\x14" },
+  { 0x1f62, "\x1f\x60\x03\x00" },
+  { 0x1f63, "\x1f\x61\x03\x00" },
+  { 0x1f64, "\x1f\x60\x03\x01" },
+  { 0x1f65, "\x1f\x61\x03\x01" },
+  { 0x1f66, "\x1f\x60\x03\x42" },
+  { 0x1f67, "\x1f\x61\x03\x42" },
+  { 0x1f68, "\x03\xa9\x03\x13" },
+  { 0x1f69, "\x03\xa9\x03\x14" },
+  { 0x1f6a, "\x1f\x68\x03\x00" },
+  { 0x1f6b, "\x1f\x69\x03\x00" },
+  { 0x1f6c, "\x1f\x68\x03\x01" },
+  { 0x1f6d, "\x1f\x69\x03\x01" },
+  { 0x1f6e, "\x1f\x68\x03\x42" },
+  { 0x1f6f, "\x1f\x69\x03\x42" },
+  { 0x1f70, "\x03\xb1\x03\x00" },
+  { 0x1f71, "\x03\xac" },
+  { 0x1f72, "\x03\xb5\x03\x00" },
+  { 0x1f73, "\x03\xad" },
+  { 0x1f74, "\x03\xb7\x03\x00" },
+  { 0x1f75, "\x03\xae" },
+  { 0x1f76, "\x03\xb9\x03\x00" },
+  { 0x1f77, "\x03\xaf" },
+  { 0x1f78, "\x03\xbf\x03\x00" },
+  { 0x1f79, "\x03\xcc" },
+  { 0x1f7a, "\x03\xc5\x03\x00" },
+  { 0x1f7b, "\x03\xcd" },
+  { 0x1f7c, "\x03\xc9\x03\x00" },
+  { 0x1f7d, "\x03\xce" },
+  { 0x1f80, "\x1f\x00\x03\x45" },
+  { 0x1f81, "\x1f\x01\x03\x45" },
+  { 0x1f82, "\x1f\x02\x03\x45" },
+  { 0x1f83, "\x1f\x03\x03\x45" },
+  { 0x1f84, "\x1f\x04\x03\x45" },
+  { 0x1f85, "\x1f\x05\x03\x45" },
+  { 0x1f86, "\x1f\x06\x03\x45" },
+  { 0x1f87, "\x1f\x07\x03\x45" },
+  { 0x1f88, "\x1f\x08\x03\x45" },
+  { 0x1f89, "\x1f\x09\x03\x45" },
+  { 0x1f8a, "\x1f\x0a\x03\x45" },
+  { 0x1f8b, "\x1f\x0b\x03\x45" },
+  { 0x1f8c, "\x1f\x0c\x03\x45" },
+  { 0x1f8d, "\x1f\x0d\x03\x45" },
+  { 0x1f8e, "\x1f\x0e\x03\x45" },
+  { 0x1f8f, "\x1f\x0f\x03\x45" },
+  { 0x1f90, "\x1f\x20\x03\x45" },
+  { 0x1f91, "\x1f\x21\x03\x45" },
+  { 0x1f92, "\x1f\x22\x03\x45" },
+  { 0x1f93, "\x1f\x23\x03\x45" },
+  { 0x1f94, "\x1f\x24\x03\x45" },
+  { 0x1f95, "\x1f\x25\x03\x45" },
+  { 0x1f96, "\x1f\x26\x03\x45" },
+  { 0x1f97, "\x1f\x27\x03\x45" },
+  { 0x1f98, "\x1f\x28\x03\x45" },
+  { 0x1f99, "\x1f\x29\x03\x45" },
+  { 0x1f9a, "\x1f\x2a\x03\x45" },
+  { 0x1f9b, "\x1f\x2b\x03\x45" },
+  { 0x1f9c, "\x1f\x2c\x03\x45" },
+  { 0x1f9d, "\x1f\x2d\x03\x45" },
+  { 0x1f9e, "\x1f\x2e\x03\x45" },
+  { 0x1f9f, "\x1f\x2f\x03\x45" },
+  { 0x1fa0, "\x1f\x60\x03\x45" },
+  { 0x1fa1, "\x1f\x61\x03\x45" },
+  { 0x1fa2, "\x1f\x62\x03\x45" },
+  { 0x1fa3, "\x1f\x63\x03\x45" },
+  { 0x1fa4, "\x1f\x64\x03\x45" },
+  { 0x1fa5, "\x1f\x65\x03\x45" },
+  { 0x1fa6, "\x1f\x66\x03\x45" },
+  { 0x1fa7, "\x1f\x67\x03\x45" },
+  { 0x1fa8, "\x1f\x68\x03\x45" },
+  { 0x1fa9, "\x1f\x69\x03\x45" },
+  { 0x1faa, "\x1f\x6a\x03\x45" },
+  { 0x1fab, "\x1f\x6b\x03\x45" },
+  { 0x1fac, "\x1f\x6c\x03\x45" },
+  { 0x1fad, "\x1f\x6d\x03\x45" },
+  { 0x1fae, "\x1f\x6e\x03\x45" },
+  { 0x1faf, "\x1f\x6f\x03\x45" },
+  { 0x1fb0, "\x03\xb1\x03\x06" },
+  { 0x1fb1, "\x03\xb1\x03\x04" },
+  { 0x1fb2, "\x1f\x70\x03\x45" },
+  { 0x1fb3, "\x03\xb1\x03\x45" },
+  { 0x1fb4, "\x03\xac\x03\x45" },
+  { 0x1fb6, "\x03\xb1\x03\x42" },
+  { 0x1fb7, "\x1f\xb6\x03\x45" },
+  { 0x1fb8, "\x03\x91\x03\x06" },
+  { 0x1fb9, "\x03\x91\x03\x04" },
+  { 0x1fba, "\x03\x91\x03\x00" },
+  { 0x1fbb, "\x03\x86" },
+  { 0x1fbc, "\x03\x91\x03\x45" },
+  { 0x1fbe, "\x03\xb9" },
+  { 0x1fc1, "\x00\xa8\x03\x42" },
+  { 0x1fc2, "\x1f\x74\x03\x45" },
+  { 0x1fc3, "\x03\xb7\x03\x45" },
+  { 0x1fc4, "\x03\xae\x03\x45" },
+  { 0x1fc6, "\x03\xb7\x03\x42" },
+  { 0x1fc7, "\x1f\xc6\x03\x45" },
+  { 0x1fc8, "\x03\x95\x03\x00" },
+  { 0x1fc9, "\x03\x88" },
+  { 0x1fca, "\x03\x97\x03\x00" },
+  { 0x1fcb, "\x03\x89" },
+  { 0x1fcc, "\x03\x97\x03\x45" },
+  { 0x1fcd, "\x1f\xbf\x03\x00" },
+  { 0x1fce, "\x1f\xbf\x03\x01" },
+  { 0x1fcf, "\x1f\xbf\x03\x42" },
+  { 0x1fd0, "\x03\xb9\x03\x06" },
+  { 0x1fd1, "\x03\xb9\x03\x04" },
+  { 0x1fd2, "\x03\xca\x03\x00" },
+  { 0x1fd3, "\x03\x90" },
+  { 0x1fd6, "\x03\xb9\x03\x42" },
+  { 0x1fd7, "\x03\xca\x03\x42" },
+  { 0x1fd8, "\x03\x99\x03\x06" },
+  { 0x1fd9, "\x03\x99\x03\x04" },
+  { 0x1fda, "\x03\x99\x03\x00" },
+  { 0x1fdb, "\x03\x8a" },
+  { 0x1fdd, "\x1f\xfe\x03\x00" },
+  { 0x1fde, "\x1f\xfe\x03\x01" },
+  { 0x1fdf, "\x1f\xfe\x03\x42" },
+  { 0x1fe0, "\x03\xc5\x03\x06" },
+  { 0x1fe1, "\x03\xc5\x03\x04" },
+  { 0x1fe2, "\x03\xcb\x03\x00" },
+  { 0x1fe3, "\x03\xb0" },
+  { 0x1fe4, "\x03\xc1\x03\x13" },
+  { 0x1fe5, "\x03\xc1\x03\x14" },
+  { 0x1fe6, "\x03\xc5\x03\x42" },
+  { 0x1fe7, "\x03\xcb\x03\x42" },
+  { 0x1fe8, "\x03\xa5\x03\x06" },
+  { 0x1fe9, "\x03\xa5\x03\x04" },
+  { 0x1fea, "\x03\xa5\x03\x00" },
+  { 0x1feb, "\x03\x8e" },
+  { 0x1fec, "\x03\xa1\x03\x14" },
+  { 0x1fed, "\x00\xa8\x03\x00" },
+  { 0x1fee, "\x03\x85" },
+  { 0x1fef, "\x00\x60" },
+  { 0x1ff2, "\x1f\x7c\x03\x45" },
+  { 0x1ff3, "\x03\xc9\x03\x45" },
+  { 0x1ff4, "\x03\xce\x03\x45" },
+  { 0x1ff6, "\x03\xc9\x03\x42" },
+  { 0x1ff7, "\x1f\xf6\x03\x45" },
+  { 0x1ff8, "\x03\x9f\x03\x00" },
+  { 0x1ff9, "\x03\x8c" },
+  { 0x1ffa, "\x03\xa9\x03\x00" },
+  { 0x1ffb, "\x03\x8f" },
+  { 0x1ffc, "\x03\xa9\x03\x45" },
+  { 0x1ffd, "\x00\xb4" },
+  { 0x2000, "\x20\x02" },
+  { 0x2001, "\x20\x03" },
+  { 0x2126, "\x03\xa9" },
+  { 0x212a, "\x00\x4b" },
+  { 0x212b, "\x00\xc5" },
+  { 0x219a, "\x21\x90\x03\x38" },
+  { 0x219b, "\x21\x92\x03\x38" },
+  { 0x21ae, "\x21\x94\x03\x38" },
+  { 0x21cd, "\x21\xd0\x03\x38" },
+  { 0x21ce, "\x21\xd4\x03\x38" },
+  { 0x21cf, "\x21\xd2\x03\x38" },
+  { 0x2204, "\x22\x03\x03\x38" },
+  { 0x2209, "\x22\x08\x03\x38" },
+  { 0x220c, "\x22\x0b\x03\x38" },
+  { 0x2224, "\x22\x23\x03\x38" },
+  { 0x2226, "\x22\x25\x03\x38" },
+  { 0x2241, "\x22\x3c\x03\x38" },
+  { 0x2244, "\x22\x43\x03\x38" },
+  { 0x2247, "\x22\x45\x03\x38" },
+  { 0x2249, "\x22\x48\x03\x38" },
+  { 0x2260, "\x00\x3d\x03\x38" },
+  { 0x2262, "\x22\x61\x03\x38" },
+  { 0x226d, "\x22\x4d\x03\x38" },
+  { 0x226e, "\x00\x3c\x03\x38" },
+  { 0x226f, "\x00\x3e\x03\x38" },
+  { 0x2270, "\x22\x64\x03\x38" },
+  { 0x2271, "\x22\x65\x03\x38" },
+  { 0x2274, "\x22\x72\x03\x38" },
+  { 0x2275, "\x22\x73\x03\x38" },
+  { 0x2278, "\x22\x76\x03\x38" },
+  { 0x2279, "\x22\x77\x03\x38" },
+  { 0x2280, "\x22\x7a\x03\x38" },
+  { 0x2281, "\x22\x7b\x03\x38" },
+  { 0x2284, "\x22\x82\x03\x38" },
+  { 0x2285, "\x22\x83\x03\x38" },
+  { 0x2288, "\x22\x86\x03\x38" },
+  { 0x2289, "\x22\x87\x03\x38" },
+  { 0x22ac, "\x22\xa2\x03\x38" },
+  { 0x22ad, "\x22\xa8\x03\x38" },
+  { 0x22ae, "\x22\xa9\x03\x38" },
+  { 0x22af, "\x22\xab\x03\x38" },
+  { 0x22e0, "\x22\x7c\x03\x38" },
+  { 0x22e1, "\x22\x7d\x03\x38" },
+  { 0x22e2, "\x22\x91\x03\x38" },
+  { 0x22e3, "\x22\x92\x03\x38" },
+  { 0x22ea, "\x22\xb2\x03\x38" },
+  { 0x22eb, "\x22\xb3\x03\x38" },
+  { 0x22ec, "\x22\xb4\x03\x38" },
+  { 0x22ed, "\x22\xb5\x03\x38" },
+  { 0x2329, "\x30\x08" },
+  { 0x232a, "\x30\x09" },
+  { 0x304c, "\x30\x4b\x30\x99" },
+  { 0x304e, "\x30\x4d\x30\x99" },
+  { 0x3050, "\x30\x4f\x30\x99" },
+  { 0x3052, "\x30\x51\x30\x99" },
+  { 0x3054, "\x30\x53\x30\x99" },
+  { 0x3056, "\x30\x55\x30\x99" },
+  { 0x3058, "\x30\x57\x30\x99" },
+  { 0x305a, "\x30\x59\x30\x99" },
+  { 0x305c, "\x30\x5b\x30\x99" },
+  { 0x305e, "\x30\x5d\x30\x99" },
+  { 0x3060, "\x30\x5f\x30\x99" },
+  { 0x3062, "\x30\x61\x30\x99" },
+  { 0x3065, "\x30\x64\x30\x99" },
+  { 0x3067, "\x30\x66\x30\x99" },
+  { 0x3069, "\x30\x68\x30\x99" },
+  { 0x3070, "\x30\x6f\x30\x99" },
+  { 0x3071, "\x30\x6f\x30\x9a" },
+  { 0x3073, "\x30\x72\x30\x99" },
+  { 0x3074, "\x30\x72\x30\x9a" },
+  { 0x3076, "\x30\x75\x30\x99" },
+  { 0x3077, "\x30\x75\x30\x9a" },
+  { 0x3079, "\x30\x78\x30\x99" },
+  { 0x307a, "\x30\x78\x30\x9a" },
+  { 0x307c, "\x30\x7b\x30\x99" },
+  { 0x307d, "\x30\x7b\x30\x9a" },
+  { 0x3094, "\x30\x46\x30\x99" },
+  { 0x309e, "\x30\x9d\x30\x99" },
+  { 0x30ac, "\x30\xab\x30\x99" },
+  { 0x30ae, "\x30\xad\x30\x99" },
+  { 0x30b0, "\x30\xaf\x30\x99" },
+  { 0x30b2, "\x30\xb1\x30\x99" },
+  { 0x30b4, "\x30\xb3\x30\x99" },
+  { 0x30b6, "\x30\xb5\x30\x99" },
+  { 0x30b8, "\x30\xb7\x30\x99" },
+  { 0x30ba, "\x30\xb9\x30\x99" },
+  { 0x30bc, "\x30\xbb\x30\x99" },
+  { 0x30be, "\x30\xbd\x30\x99" },
+  { 0x30c0, "\x30\xbf\x30\x99" },
+  { 0x30c2, "\x30\xc1\x30\x99" },
+  { 0x30c5, "\x30\xc4\x30\x99" },
+  { 0x30c7, "\x30\xc6\x30\x99" },
+  { 0x30c9, "\x30\xc8\x30\x99" },
+  { 0x30d0, "\x30\xcf\x30\x99" },
+  { 0x30d1, "\x30\xcf\x30\x9a" },
+  { 0x30d3, "\x30\xd2\x30\x99" },
+  { 0x30d4, "\x30\xd2\x30\x9a" },
+  { 0x30d6, "\x30\xd5\x30\x99" },
+  { 0x30d7, "\x30\xd5\x30\x9a" },
+  { 0x30d9, "\x30\xd8\x30\x99" },
+  { 0x30da, "\x30\xd8\x30\x9a" },
+  { 0x30dc, "\x30\xdb\x30\x99" },
+  { 0x30dd, "\x30\xdb\x30\x9a" },
+  { 0x30f4, "\x30\xa6\x30\x99" },
+  { 0x30f7, "\x30\xef\x30\x99" },
+  { 0x30f8, "\x30\xf0\x30\x99" },
+  { 0x30f9, "\x30\xf1\x30\x99" },
+  { 0x30fa, "\x30\xf2\x30\x99" },
+  { 0x30fe, "\x30\xfd\x30\x99" },
+  { 0xf900, "\x8c\x48" },
+  { 0xf901, "\x66\xf4" },
+  { 0xf902, "\x8e\xca" },
+  { 0xf903, "\x8c\xc8" },
+  { 0xf904, "\x6e\xd1" },
+  { 0xf905, "\x4e\x32" },
+  { 0xf906, "\x53\xe5" },
+  { 0xf907, "\x9f\x9c" },
+  { 0xf908, "\x9f\x9c" },
+  { 0xf909, "\x59\x51" },
+  { 0xf90a, "\x91\xd1" },
+  { 0xf90b, "\x55\x87" },
+  { 0xf90c, "\x59\x48" },
+  { 0xf90d, "\x61\xf6" },
+  { 0xf90e, "\x76\x69" },
+  { 0xf90f, "\x7f\x85" },
+  { 0xf910, "\x86\x3f" },
+  { 0xf911, "\x87\xba" },
+  { 0xf912, "\x88\xf8" },
+  { 0xf913, "\x90\x8f" },
+  { 0xf914, "\x6a\x02" },
+  { 0xf915, "\x6d\x1b" },
+  { 0xf916, "\x70\xd9" },
+  { 0xf917, "\x73\xde" },
+  { 0xf918, "\x84\x3d" },
+  { 0xf919, "\x91\x6a" },
+  { 0xf91a, "\x99\xf1" },
+  { 0xf91b, "\x4e\x82" },
+  { 0xf91c, "\x53\x75" },
+  { 0xf91d, "\x6b\x04" },
+  { 0xf91e, "\x72\x1b" },
+  { 0xf91f, "\x86\x2d" },
+  { 0xf920, "\x9e\x1e" },
+  { 0xf921, "\x5d\x50" },
+  { 0xf922, "\x6f\xeb" },
+  { 0xf923, "\x85\xcd" },
+  { 0xf924, "\x89\x64" },
+  { 0xf925, "\x62\xc9" },
+  { 0xf926, "\x81\xd8" },
+  { 0xf927, "\x88\x1f" },
+  { 0xf928, "\x5e\xca" },
+  { 0xf929, "\x67\x17" },
+  { 0xf92a, "\x6d\x6a" },
+  { 0xf92b, "\x72\xfc" },
+  { 0xf92c, "\x90\xce" },
+  { 0xf92d, "\x4f\x86" },
+  { 0xf92e, "\x51\xb7" },
+  { 0xf92f, "\x52\xde" },
+  { 0xf930, "\x64\xc4" },
+  { 0xf931, "\x6a\xd3" },
+  { 0xf932, "\x72\x10" },
+  { 0xf933, "\x76\xe7" },
+  { 0xf934, "\x80\x01" },
+  { 0xf935, "\x86\x06" },
+  { 0xf936, "\x86\x5c" },
+  { 0xf937, "\x8d\xef" },
+  { 0xf938, "\x97\x32" },
+  { 0xf939, "\x9b\x6f" },
+  { 0xf93a, "\x9d\xfa" },
+  { 0xf93b, "\x78\x8c" },
+  { 0xf93c, "\x79\x7f" },
+  { 0xf93d, "\x7d\xa0" },
+  { 0xf93e, "\x83\xc9" },
+  { 0xf93f, "\x93\x04" },
+  { 0xf940, "\x9e\x7f" },
+  { 0xf941, "\x8a\xd6" },
+  { 0xf942, "\x58\xdf" },
+  { 0xf943, "\x5f\x04" },
+  { 0xf944, "\x7c\x60" },
+  { 0xf945, "\x80\x7e" },
+  { 0xf946, "\x72\x62" },
+  { 0xf947, "\x78\xca" },
+  { 0xf948, "\x8c\xc2" },
+  { 0xf949, "\x96\xf7" },
+  { 0xf94a, "\x58\xd8" },
+  { 0xf94b, "\x5c\x62" },
+  { 0xf94c, "\x6a\x13" },
+  { 0xf94d, "\x6d\xda" },
+  { 0xf94e, "\x6f\x0f" },
+  { 0xf94f, "\x7d\x2f" },
+  { 0xf950, "\x7e\x37" },
+  { 0xf951, "\x96\xfb" },
+  { 0xf952, "\x52\xd2" },
+  { 0xf953, "\x80\x8b" },
+  { 0xf954, "\x51\xdc" },
+  { 0xf955, "\x51\xcc" },
+  { 0xf956, "\x7a\x1c" },
+  { 0xf957, "\x7d\xbe" },
+  { 0xf958, "\x83\xf1" },
+  { 0xf959, "\x96\x75" },
+  { 0xf95a, "\x8b\x80" },
+  { 0xf95b, "\x62\xcf" },
+  { 0xf95c, "\x6a\x02" },
+  { 0xf95d, "\x8a\xfe" },
+  { 0xf95e, "\x4e\x39" },
+  { 0xf95f, "\x5b\xe7" },
+  { 0xf960, "\x60\x12" },
+  { 0xf961, "\x73\x87" },
+  { 0xf962, "\x75\x70" },
+  { 0xf963, "\x53\x17" },
+  { 0xf964, "\x78\xfb" },
+  { 0xf965, "\x4f\xbf" },
+  { 0xf966, "\x5f\xa9" },
+  { 0xf967, "\x4e\x0d" },
+  { 0xf968, "\x6c\xcc" },
+  { 0xf969, "\x65\x78" },
+  { 0xf96a, "\x7d\x22" },
+  { 0xf96b, "\x53\xc3" },
+  { 0xf96c, "\x58\x5e" },
+  { 0xf96d, "\x77\x01" },
+  { 0xf96e, "\x84\x49" },
+  { 0xf96f, "\x8a\xaa" },
+  { 0xf970, "\x6b\xba" },
+  { 0xf971, "\x8f\xb0" },
+  { 0xf972, "\x6c\x88" },
+  { 0xf973, "\x62\xfe" },
+  { 0xf974, "\x82\xe5" },
+  { 0xf975, "\x63\xa0" },
+  { 0xf976, "\x75\x65" },
+  { 0xf977, "\x4e\xae" },
+  { 0xf978, "\x51\x69" },
+  { 0xf979, "\x51\xc9" },
+  { 0xf97a, "\x68\x81" },
+  { 0xf97b, "\x7c\xe7" },
+  { 0xf97c, "\x82\x6f" },
+  { 0xf97d, "\x8a\xd2" },
+  { 0xf97e, "\x91\xcf" },
+  { 0xf97f, "\x52\xf5" },
+  { 0xf980, "\x54\x42" },
+  { 0xf981, "\x59\x73" },
+  { 0xf982, "\x5e\xec" },
+  { 0xf983, "\x65\xc5" },
+  { 0xf984, "\x6f\xfe" },
+  { 0xf985, "\x79\x2a" },
+  { 0xf986, "\x95\xad" },
+  { 0xf987, "\x9a\x6a" },
+  { 0xf988, "\x9e\x97" },
+  { 0xf989, "\x9e\xce" },
+  { 0xf98a, "\x52\x9b" },
+  { 0xf98b, "\x66\xc6" },
+  { 0xf98c, "\x6b\x77" },
+  { 0xf98d, "\x8f\x62" },
+  { 0xf98e, "\x5e\x74" },
+  { 0xf98f, "\x61\x90" },
+  { 0xf990, "\x62\x00" },
+  { 0xf991, "\x64\x9a" },
+  { 0xf992, "\x6f\x23" },
+  { 0xf993, "\x71\x49" },
+  { 0xf994, "\x74\x89" },
+  { 0xf995, "\x79\xca" },
+  { 0xf996, "\x7d\xf4" },
+  { 0xf997, "\x80\x6f" },
+  { 0xf998, "\x8f\x26" },
+  { 0xf999, "\x84\xee" },
+  { 0xf99a, "\x90\x23" },
+  { 0xf99b, "\x93\x4a" },
+  { 0xf99c, "\x52\x17" },
+  { 0xf99d, "\x52\xa3" },
+  { 0xf99e, "\x54\xbd" },
+  { 0xf99f, "\x70\xc8" },
+  { 0xf9a0, "\x88\xc2" },
+  { 0xf9a1, "\x8a\xaa" },
+  { 0xf9a2, "\x5e\xc9" },
+  { 0xf9a3, "\x5f\xf5" },
+  { 0xf9a4, "\x63\x7b" },
+  { 0xf9a5, "\x6b\xae" },
+  { 0xf9a6, "\x7c\x3e" },
+  { 0xf9a7, "\x73\x75" },
+  { 0xf9a8, "\x4e\xe4" },
+  { 0xf9a9, "\x56\xf9" },
+  { 0xf9aa, "\x5b\xe7" },
+  { 0xf9ab, "\x5d\xba" },
+  { 0xf9ac, "\x60\x1c" },
+  { 0xf9ad, "\x73\xb2" },
+  { 0xf9ae, "\x74\x69" },
+  { 0xf9af, "\x7f\x9a" },
+  { 0xf9b0, "\x80\x46" },
+  { 0xf9b1, "\x92\x34" },
+  { 0xf9b2, "\x96\xf6" },
+  { 0xf9b3, "\x97\x48" },
+  { 0xf9b4, "\x98\x18" },
+  { 0xf9b5, "\x4f\x8b" },
+  { 0xf9b6, "\x79\xae" },
+  { 0xf9b7, "\x91\xb4" },
+  { 0xf9b8, "\x96\xb8" },
+  { 0xf9b9, "\x60\xe1" },
+  { 0xf9ba, "\x4e\x86" },
+  { 0xf9bb, "\x50\xda" },
+  { 0xf9bc, "\x5b\xee" },
+  { 0xf9bd, "\x5c\x3f" },
+  { 0xf9be, "\x65\x99" },
+  { 0xf9bf, "\x6a\x02" },
+  { 0xf9c0, "\x71\xce" },
+  { 0xf9c1, "\x76\x42" },
+  { 0xf9c2, "\x84\xfc" },
+  { 0xf9c3, "\x90\x7c" },
+  { 0xf9c4, "\x9f\x8d" },
+  { 0xf9c5, "\x66\x88" },
+  { 0xf9c6, "\x96\x2e" },
+  { 0xf9c7, "\x52\x89" },
+  { 0xf9c8, "\x67\x7b" },
+  { 0xf9c9, "\x67\xf3" },
+  { 0xf9ca, "\x6d\x41" },
+  { 0xf9cb, "\x6e\x9c" },
+  { 0xf9cc, "\x74\x09" },
+  { 0xf9cd, "\x75\x59" },
+  { 0xf9ce, "\x78\x6b" },
+  { 0xf9cf, "\x7d\x10" },
+  { 0xf9d0, "\x98\x5e" },
+  { 0xf9d1, "\x51\x6d" },
+  { 0xf9d2, "\x62\x2e" },
+  { 0xf9d3, "\x96\x78" },
+  { 0xf9d4, "\x50\x2b" },
+  { 0xf9d5, "\x5d\x19" },
+  { 0xf9d6, "\x6d\xea" },
+  { 0xf9d7, "\x8f\x2a" },
+  { 0xf9d8, "\x5f\x8b" },
+  { 0xf9d9, "\x61\x44" },
+  { 0xf9da, "\x68\x17" },
+  { 0xf9db, "\x73\x87" },
+  { 0xf9dc, "\x96\x86" },
+  { 0xf9dd, "\x52\x29" },
+  { 0xf9de, "\x54\x0f" },
+  { 0xf9df, "\x5c\x65" },
+  { 0xf9e0, "\x66\x13" },
+  { 0xf9e1, "\x67\x4e" },
+  { 0xf9e2, "\x68\xa8" },
+  { 0xf9e3, "\x6c\xe5" },
+  { 0xf9e4, "\x74\x06" },
+  { 0xf9e5, "\x75\xe2" },
+  { 0xf9e6, "\x7f\x79" },
+  { 0xf9e7, "\x88\xcf" },
+  { 0xf9e8, "\x88\xe1" },
+  { 0xf9e9, "\x91\xcc" },
+  { 0xf9ea, "\x96\xe2" },
+  { 0xf9eb, "\x53\x3f" },
+  { 0xf9ec, "\x6e\xba" },
+  { 0xf9ed, "\x54\x1d" },
+  { 0xf9ee, "\x71\xd0" },
+  { 0xf9ef, "\x74\x98" },
+  { 0xf9f0, "\x85\xfa" },
+  { 0xf9f1, "\x96\xa3" },
+  { 0xf9f2, "\x9c\x57" },
+  { 0xf9f3, "\x9e\x9f" },
+  { 0xf9f4, "\x67\x97" },
+  { 0xf9f5, "\x6d\xcb" },
+  { 0xf9f6, "\x81\xe8" },
+  { 0xf9f7, "\x7a\xcb" },
+  { 0xf9f8, "\x7b\x20" },
+  { 0xf9f9, "\x7c\x92" },
+  { 0xf9fa, "\x72\xc0" },
+  { 0xf9fb, "\x70\x99" },
+  { 0xf9fc, "\x8b\x58" },
+  { 0xf9fd, "\x4e\xc0" },
+  { 0xf9fe, "\x83\x36" },
+  { 0xf9ff, "\x52\x3a" },
+  { 0xfa00, "\x52\x07" },
+  { 0xfa01, "\x5e\xa6" },
+  { 0xfa02, "\x62\xd3" },
+  { 0xfa03, "\x7c\xd6" },
+  { 0xfa04, "\x5b\x85" },
+  { 0xfa05, "\x6d\x1e" },
+  { 0xfa06, "\x66\xb4" },
+  { 0xfa07, "\x8f\x3b" },
+  { 0xfa08, "\x88\x4c" },
+  { 0xfa09, "\x96\x4d" },
+  { 0xfa0a, "\x89\x8b" },
+  { 0xfa0b, "\x5e\xd3" },
+  { 0xfa0c, "\x51\x40" },
+  { 0xfa0d, "\x55\xc0" },
+  { 0xfa10, "\x58\x5a" },
+  { 0xfa12, "\x66\x74" },
+  { 0xfa15, "\x51\xde" },
+  { 0xfa16, "\x73\x2a" },
+  { 0xfa17, "\x76\xca" },
+  { 0xfa18, "\x79\x3c" },
+  { 0xfa19, "\x79\x5e" },
+  { 0xfa1a, "\x79\x65" },
+  { 0xfa1b, "\x79\x8f" },
+  { 0xfa1c, "\x97\x56" },
+  { 0xfa1d, "\x7c\xbe" },
+  { 0xfa1e, "\x7f\xbd" },
+  { 0xfa20, "\x86\x12" },
+  { 0xfa22, "\x8a\xf8" },
+  { 0xfa25, "\x90\x38" },
+  { 0xfa26, "\x90\xfd" },
+  { 0xfa2a, "\x98\xef" },
+  { 0xfa2b, "\x98\xfc" },
+  { 0xfa2c, "\x99\x28" },
+  { 0xfa2d, "\x9d\xb4" },
+  { 0xfb1d, "\x05\xd9\x05\xb4" },
+  { 0xfb1f, "\x05\xf2\x05\xb7" },
+  { 0xfb2a, "\x05\xe9\x05\xc1" },
+  { 0xfb2b, "\x05\xe9\x05\xc2" },
+  { 0xfb2c, "\xfb\x49\x05\xc1" },
+  { 0xfb2d, "\xfb\x49\x05\xc2" },
+  { 0xfb2e, "\x05\xd0\x05\xb7" },
+  { 0xfb2f, "\x05\xd0\x05\xb8" },
+  { 0xfb30, "\x05\xd0\x05\xbc" },
+  { 0xfb31, "\x05\xd1\x05\xbc" },
+  { 0xfb32, "\x05\xd2\x05\xbc" },
+  { 0xfb33, "\x05\xd3\x05\xbc" },
+  { 0xfb34, "\x05\xd4\x05\xbc" },
+  { 0xfb35, "\x05\xd5\x05\xbc" },
+  { 0xfb36, "\x05\xd6\x05\xbc" },
+  { 0xfb38, "\x05\xd8\x05\xbc" },
+  { 0xfb39, "\x05\xd9\x05\xbc" },
+  { 0xfb3a, "\x05\xda\x05\xbc" },
+  { 0xfb3b, "\x05\xdb\x05\xbc" },
+  { 0xfb3c, "\x05\xdc\x05\xbc" },
+  { 0xfb3e, "\x05\xde\x05\xbc" },
+  { 0xfb40, "\x05\xe0\x05\xbc" },
+  { 0xfb41, "\x05\xe1\x05\xbc" },
+  { 0xfb43, "\x05\xe3\x05\xbc" },
+  { 0xfb44, "\x05\xe4\x05\xbc" },
+  { 0xfb46, "\x05\xe6\x05\xbc" },
+  { 0xfb47, "\x05\xe7\x05\xbc" },
+  { 0xfb48, "\x05\xe8\x05\xbc" },
+  { 0xfb49, "\x05\xe9\x05\xbc" },
+  { 0xfb4a, "\x05\xea\x05\xbc" },
+  { 0xfb4b, "\x05\xd5\x05\xb9" },
+  { 0xfb4c, "\x05\xd1\x05\xbf" },
+  { 0xfb4d, "\x05\xdb\x05\xbf" },
+  { 0xfb4e, "\x05\xe4\x05\xbf" }
+};
+
+static const decomp_entry full_decomposition[] =
+{
+  { 0x00a0, "\x00\x20" },
+  { 0x00a8, "\x00\x20\x03\x08" },
+  { 0x00aa, "\x00\x61" },
+  { 0x00af, "\x00\x20\x03\x04" },
+  { 0x00b2, "\x00\x32" },
+  { 0x00b3, "\x00\x33" },
+  { 0x00b4, "\x00\x20\x03\x01" },
+  { 0x00b5, "\x03\xbc" },
+  { 0x00b8, "\x00\x20\x03\x27" },
+  { 0x00b9, "\x00\x31" },
+  { 0x00ba, "\x00\x6f" },
+  { 0x00bc, "\x00\x31\x20\x44\x00\x34" },
+  { 0x00bd, "\x00\x31\x20\x44\x00\x32" },
+  { 0x00be, "\x00\x33\x20\x44\x00\x34" },
+  { 0x0132, "\x00\x49\x00\x4a" },
+  { 0x0133, "\x00\x69\x00\x6a" },
+  { 0x013f, "\x00\x4c\x00\xb7" },
+  { 0x0140, "\x00\x6c\x00\xb7" },
+  { 0x0149, "\x02\xbc\x00\x6e" },
+  { 0x017f, "\x00\x73" },
+  { 0x01c4, "\x00\x44\x01\x7d" },
+  { 0x01c5, "\x00\x44\x01\x7e" },
+  { 0x01c6, "\x00\x64\x01\x7e" },
+  { 0x01c7, "\x00\x4c\x00\x4a" },
+  { 0x01c8, "\x00\x4c\x00\x6a" },
+  { 0x01c9, "\x00\x6c\x00\x6a" },
+  { 0x01ca, "\x00\x4e\x00\x4a" },
+  { 0x01cb, "\x00\x4e\x00\x6a" },
+  { 0x01cc, "\x00\x6e\x00\x6a" },
+  { 0x01f1, "\x00\x44\x00\x5a" },
+  { 0x01f2, "\x00\x44\x00\x7a" },
+  { 0x01f3, "\x00\x64\x00\x7a" },
+  { 0x02b0, "\x00\x68" },
+  { 0x02b1, "\x02\x66" },
+  { 0x02b2, "\x00\x6a" },
+  { 0x02b3, "\x00\x72" },
+  { 0x02b4, "\x02\x79" },
+  { 0x02b5, "\x02\x7b" },
+  { 0x02b6, "\x02\x81" },
+  { 0x02b7, "\x00\x77" },
+  { 0x02b8, "\x00\x79" },
+  { 0x02d8, "\x00\x20\x03\x06" },
+  { 0x02d9, "\x00\x20\x03\x07" },
+  { 0x02da, "\x00\x20\x03\x0a" },
+  { 0x02db, "\x00\x20\x03\x28" },
+  { 0x02dc, "\x00\x20\x03\x03" },
+  { 0x02dd, "\x00\x20\x03\x0b" },
+  { 0x02e0, "\x02\x63" },
+  { 0x02e1, "\x00\x6c" },
+  { 0x02e2, "\x00\x73" },
+  { 0x02e3, "\x00\x78" },
+  { 0x02e4, "\x02\x95" },
+  { 0x037a, "\x00\x20\x03\x45" },
+  { 0x0384, "\x00\x20\x03\x01" },
+  { 0x03d0, "\x03\xb2" },
+  { 0x03d1, "\x03\xb8" },
+  { 0x03d2, "\x03\xa5" },
+  { 0x03d5, "\x03\xc6" },
+  { 0x03d6, "\x03\xc0" },
+  { 0x03f0, "\x03\xba" },
+  { 0x03f1, "\x03\xc1" },
+  { 0x03f2, "\x03\xc2" },
+  { 0x0587, "\x05\x65\x05\x82" },
+  { 0x0675, "\x06\x27\x06\x74" },
+  { 0x0676, "\x06\x48\x06\x74" },
+  { 0x0677, "\x06\xc7\x06\x74" },
+  { 0x0678, "\x06\x4a\x06\x74" },
+  { 0x0e33, "\x0e\x4d\x0e\x32" },
+  { 0x0eb3, "\x0e\xcd\x0e\xb2" },
+  { 0x0edc, "\x0e\xab\x0e\x99" },
+  { 0x0edd, "\x0e\xab\x0e\xa1" },
+  { 0x0f0c, "\x0f\x0b" },
+  { 0x0f77, "\x0f\xb2\x0f\x81" },
+  { 0x0f79, "\x0f\xb3\x0f\x81" },
+  { 0x1e9a, "\x00\x61\x02\xbe" },
+  { 0x1fbd, "\x00\x20\x03\x13" },
+  { 0x1fbf, "\x00\x20\x03\x13" },
+  { 0x1fc0, "\x00\x20\x03\x42" },
+  { 0x1ffe, "\x00\x20\x03\x14" },
+  { 0x2002, "\x00\x20" },
+  { 0x2003, "\x00\x20" },
+  { 0x2004, "\x00\x20" },
+  { 0x2005, "\x00\x20" },
+  { 0x2006, "\x00\x20" },
+  { 0x2007, "\x00\x20" },
+  { 0x2008, "\x00\x20" },
+  { 0x2009, "\x00\x20" },
+  { 0x200a, "\x00\x20" },
+  { 0x2011, "\x20\x10" },
+  { 0x2017, "\x00\x20\x03\x33" },
+  { 0x2024, "\x00\x2e" },
+  { 0x2025, "\x00\x2e\x00\x2e" },
+  { 0x2026, "\x00\x2e\x00\x2e\x00\x2e" },
+  { 0x202f, "\x00\x20" },
+  { 0x2033, "\x20\x32\x20\x32" },
+  { 0x2034, "\x20\x32\x20\x32\x20\x32" },
+  { 0x2036, "\x20\x35\x20\x35" },
+  { 0x2037, "\x20\x35\x20\x35\x20\x35" },
+  { 0x203c, "\x00\x21\x00\x21" },
+  { 0x203e, "\x00\x20\x03\x05" },
+  { 0x2048, "\x00\x3f\x00\x21" },
+  { 0x2049, "\x00\x21\x00\x3f" },
+  { 0x2070, "\x00\x30" },
+  { 0x2074, "\x00\x34" },
+  { 0x2075, "\x00\x35" },
+  { 0x2076, "\x00\x36" },
+  { 0x2077, "\x00\x37" },
+  { 0x2078, "\x00\x38" },
+  { 0x2079, "\x00\x39" },
+  { 0x207a, "\x00\x2b" },
+  { 0x207b, "\x22\x12" },
+  { 0x207c, "\x00\x3d" },
+  { 0x207d, "\x00\x28" },
+  { 0x207e, "\x00\x29" },
+  { 0x207f, "\x00\x6e" },
+  { 0x2080, "\x00\x30" },
+  { 0x2081, "\x00\x31" },
+  { 0x2082, "\x00\x32" },
+  { 0x2083, "\x00\x33" },
+  { 0x2084, "\x00\x34" },
+  { 0x2085, "\x00\x35" },
+  { 0x2086, "\x00\x36" },
+  { 0x2087, "\x00\x37" },
+  { 0x2088, "\x00\x38" },
+  { 0x2089, "\x00\x39" },
+  { 0x208a, "\x00\x2b" },
+  { 0x208b, "\x22\x12" },
+  { 0x208c, "\x00\x3d" },
+  { 0x208d, "\x00\x28" },
+  { 0x208e, "\x00\x29" },
+  { 0x20a8, "\x00\x52\x00\x73" },
+  { 0x2100, "\x00\x61\x00\x2f\x00\x63" },
+  { 0x2101, "\x00\x61\x00\x2f\x00\x73" },
+  { 0x2102, "\x00\x43" },
+  { 0x2103, "\x00\xb0\x00\x43" },
+  { 0x2105, "\x00\x63\x00\x2f\x00\x6f" },
+  { 0x2106, "\x00\x63\x00\x2f\x00\x75" },
+  { 0x2107, "\x01\x90" },
+  { 0x2109, "\x00\xb0\x00\x46" },
+  { 0x210a, "\x00\x67" },
+  { 0x210b, "\x00\x48" },
+  { 0x210c, "\x00\x48" },
+  { 0x210d, "\x00\x48" },
+  { 0x210e, "\x00\x68" },
+  { 0x210f, "\x01\x27" },
+  { 0x2110, "\x00\x49" },
+  { 0x2111, "\x00\x49" },
+  { 0x2112, "\x00\x4c" },
+  { 0x2113, "\x00\x6c" },
+  { 0x2115, "\x00\x4e" },
+  { 0x2116, "\x00\x4e\x00\x6f" },
+  { 0x2119, "\x00\x50" },
+  { 0x211a, "\x00\x51" },
+  { 0x211b, "\x00\x52" },
+  { 0x211c, "\x00\x52" },
+  { 0x211d, "\x00\x52" },
+  { 0x2120, "\x00\x53\x00\x4d" },
+  { 0x2121, "\x00\x54\x00\x45\x00\x4c" },
+  { 0x2122, "\x00\x54\x00\x4d" },
+  { 0x2124, "\x00\x5a" },
+  { 0x2128, "\x00\x5a" },
+  { 0x212c, "\x00\x42" },
+  { 0x212d, "\x00\x43" },
+  { 0x212f, "\x00\x65" },
+  { 0x2130, "\x00\x45" },
+  { 0x2131, "\x00\x46" },
+  { 0x2133, "\x00\x4d" },
+  { 0x2134, "\x00\x6f" },
+  { 0x2135, "\x05\xd0" },
+  { 0x2136, "\x05\xd1" },
+  { 0x2137, "\x05\xd2" },
+  { 0x2138, "\x05\xd3" },
+  { 0x2139, "\x00\x69" },
+  { 0x2153, "\x00\x31\x20\x44\x00\x33" },
+  { 0x2154, "\x00\x32\x20\x44\x00\x33" },
+  { 0x2155, "\x00\x31\x20\x44\x00\x35" },
+  { 0x2156, "\x00\x32\x20\x44\x00\x35" },
+  { 0x2157, "\x00\x33\x20\x44\x00\x35" },
+  { 0x2158, "\x00\x34\x20\x44\x00\x35" },
+  { 0x2159, "\x00\x31\x20\x44\x00\x36" },
+  { 0x215a, "\x00\x35\x20\x44\x00\x36" },
+  { 0x215b, "\x00\x31\x20\x44\x00\x38" },
+  { 0x215c, "\x00\x33\x20\x44\x00\x38" },
+  { 0x215d, "\x00\x35\x20\x44\x00\x38" },
+  { 0x215e, "\x00\x37\x20\x44\x00\x38" },
+  { 0x215f, "\x00\x31\x20\x44" },
+  { 0x2160, "\x00\x49" },
+  { 0x2161, "\x00\x49\x00\x49" },
+  { 0x2162, "\x00\x49\x00\x49\x00\x49" },
+  { 0x2163, "\x00\x49\x00\x56" },
+  { 0x2164, "\x00\x56" },
+  { 0x2165, "\x00\x56\x00\x49" },
+  { 0x2166, "\x00\x56\x00\x49\x00\x49" },
+  { 0x2167, "\x00\x56\x00\x49\x00\x49\x00\x49" },
+  { 0x2168, "\x00\x49\x00\x58" },
+  { 0x2169, "\x00\x58" },
+  { 0x216a, "\x00\x58\x00\x49" },
+  { 0x216b, "\x00\x58\x00\x49\x00\x49" },
+  { 0x216c, "\x00\x4c" },
+  { 0x216d, "\x00\x43" },
+  { 0x216e, "\x00\x44" },
+  { 0x216f, "\x00\x4d" },
+  { 0x2170, "\x00\x69" },
+  { 0x2171, "\x00\x69\x00\x69" },
+  { 0x2172, "\x00\x69\x00\x69\x00\x69" },
+  { 0x2173, "\x00\x69\x00\x76" },
+  { 0x2174, "\x00\x76" },
+  { 0x2175, "\x00\x76\x00\x69" },
+  { 0x2176, "\x00\x76\x00\x69\x00\x69" },
+  { 0x2177, "\x00\x76\x00\x69\x00\x69\x00\x69" },
+  { 0x2178, "\x00\x69\x00\x78" },
+  { 0x2179, "\x00\x78" },
+  { 0x217a, "\x00\x78\x00\x69" },
+  { 0x217b, "\x00\x78\x00\x69\x00\x69" },
+  { 0x217c, "\x00\x6c" },
+  { 0x217d, "\x00\x63" },
+  { 0x217e, "\x00\x64" },
+  { 0x217f, "\x00\x6d" },
+  { 0x222c, "\x22\x2b\x22\x2b" },
+  { 0x222d, "\x22\x2b\x22\x2b\x22\x2b" },
+  { 0x222f, "\x22\x2e\x22\x2e" },
+  { 0x2230, "\x22\x2e\x22\x2e\x22\x2e" },
+  { 0x2460, "\x00\x31" },
+  { 0x2461, "\x00\x32" },
+  { 0x2462, "\x00\x33" },
+  { 0x2463, "\x00\x34" },
+  { 0x2464, "\x00\x35" },
+  { 0x2465, "\x00\x36" },
+  { 0x2466, "\x00\x37" },
+  { 0x2467, "\x00\x38" },
+  { 0x2468, "\x00\x39" },
+  { 0x2469, "\x00\x31\x00\x30" },
+  { 0x246a, "\x00\x31\x00\x31" },
+  { 0x246b, "\x00\x31\x00\x32" },
+  { 0x246c, "\x00\x31\x00\x33" },
+  { 0x246d, "\x00\x31\x00\x34" },
+  { 0x246e, "\x00\x31\x00\x35" },
+  { 0x246f, "\x00\x31\x00\x36" },
+  { 0x2470, "\x00\x31\x00\x37" },
+  { 0x2471, "\x00\x31\x00\x38" },
+  { 0x2472, "\x00\x31\x00\x39" },
+  { 0x2473, "\x00\x32\x00\x30" },
+  { 0x2474, "\x00\x28\x00\x31\x00\x29" },
+  { 0x2475, "\x00\x28\x00\x32\x00\x29" },
+  { 0x2476, "\x00\x28\x00\x33\x00\x29" },
+  { 0x2477, "\x00\x28\x00\x34\x00\x29" },
+  { 0x2478, "\x00\x28\x00\x35\x00\x29" },
+  { 0x2479, "\x00\x28\x00\x36\x00\x29" },
+  { 0x247a, "\x00\x28\x00\x37\x00\x29" },
+  { 0x247b, "\x00\x28\x00\x38\x00\x29" },
+  { 0x247c, "\x00\x28\x00\x39\x00\x29" },
+  { 0x247d, "\x00\x28\x00\x31\x00\x30\x00\x29" },
+  { 0x247e, "\x00\x28\x00\x31\x00\x31\x00\x29" },
+  { 0x247f, "\x00\x28\x00\x31\x00\x32\x00\x29" },
+  { 0x2480, "\x00\x28\x00\x31\x00\x33\x00\x29" },
+  { 0x2481, "\x00\x28\x00\x31\x00\x34\x00\x29" },
+  { 0x2482, "\x00\x28\x00\x31\x00\x35\x00\x29" },
+  { 0x2483, "\x00\x28\x00\x31\x00\x36\x00\x29" },
+  { 0x2484, "\x00\x28\x00\x31\x00\x37\x00\x29" },
+  { 0x2485, "\x00\x28\x00\x31\x00\x38\x00\x29" },
+  { 0x2486, "\x00\x28\x00\x31\x00\x39\x00\x29" },
+  { 0x2487, "\x00\x28\x00\x32\x00\x30\x00\x29" },
+  { 0x2488, "\x00\x31\x00\x2e" },
+  { 0x2489, "\x00\x32\x00\x2e" },
+  { 0x248a, "\x00\x33\x00\x2e" },
+  { 0x248b, "\x00\x34\x00\x2e" },
+  { 0x248c, "\x00\x35\x00\x2e" },
+  { 0x248d, "\x00\x36\x00\x2e" },
+  { 0x248e, "\x00\x37\x00\x2e" },
+  { 0x248f, "\x00\x38\x00\x2e" },
+  { 0x2490, "\x00\x39\x00\x2e" },
+  { 0x2491, "\x00\x31\x00\x30\x00\x2e" },
+  { 0x2492, "\x00\x31\x00\x31\x00\x2e" },
+  { 0x2493, "\x00\x31\x00\x32\x00\x2e" },
+  { 0x2494, "\x00\x31\x00\x33\x00\x2e" },
+  { 0x2495, "\x00\x31\x00\x34\x00\x2e" },
+  { 0x2496, "\x00\x31\x00\x35\x00\x2e" },
+  { 0x2497, "\x00\x31\x00\x36\x00\x2e" },
+  { 0x2498, "\x00\x31\x00\x37\x00\x2e" },
+  { 0x2499, "\x00\x31\x00\x38\x00\x2e" },
+  { 0x249a, "\x00\x31\x00\x39\x00\x2e" },
+  { 0x249b, "\x00\x32\x00\x30\x00\x2e" },
+  { 0x249c, "\x00\x28\x00\x61\x00\x29" },
+  { 0x249d, "\x00\x28\x00\x62\x00\x29" },
+  { 0x249e, "\x00\x28\x00\x63\x00\x29" },
+  { 0x249f, "\x00\x28\x00\x64\x00\x29" },
+  { 0x24a0, "\x00\x28\x00\x65\x00\x29" },
+  { 0x24a1, "\x00\x28\x00\x66\x00\x29" },
+  { 0x24a2, "\x00\x28\x00\x67\x00\x29" },
+  { 0x24a3, "\x00\x28\x00\x68\x00\x29" },
+  { 0x24a4, "\x00\x28\x00\x69\x00\x29" },
+  { 0x24a5, "\x00\x28\x00\x6a\x00\x29" },
+  { 0x24a6, "\x00\x28\x00\x6b\x00\x29" },
+  { 0x24a7, "\x00\x28\x00\x6c\x00\x29" },
+  { 0x24a8, "\x00\x28\x00\x6d\x00\x29" },
+  { 0x24a9, "\x00\x28\x00\x6e\x00\x29" },
+  { 0x24aa, "\x00\x28\x00\x6f\x00\x29" },
+  { 0x24ab, "\x00\x28\x00\x70\x00\x29" },
+  { 0x24ac, "\x00\x28\x00\x71\x00\x29" },
+  { 0x24ad, "\x00\x28\x00\x72\x00\x29" },
+  { 0x24ae, "\x00\x28\x00\x73\x00\x29" },
+  { 0x24af, "\x00\x28\x00\x74\x00\x29" },
+  { 0x24b0, "\x00\x28\x00\x75\x00\x29" },
+  { 0x24b1, "\x00\x28\x00\x76\x00\x29" },
+  { 0x24b2, "\x00\x28\x00\x77\x00\x29" },
+  { 0x24b3, "\x00\x28\x00\x78\x00\x29" },
+  { 0x24b4, "\x00\x28\x00\x79\x00\x29" },
+  { 0x24b5, "\x00\x28\x00\x7a\x00\x29" },
+  { 0x24b6, "\x00\x41" },
+  { 0x24b7, "\x00\x42" },
+  { 0x24b8, "\x00\x43" },
+  { 0x24b9, "\x00\x44" },
+  { 0x24ba, "\x00\x45" },
+  { 0x24bb, "\x00\x46" },
+  { 0x24bc, "\x00\x47" },
+  { 0x24bd, "\x00\x48" },
+  { 0x24be, "\x00\x49" },
+  { 0x24bf, "\x00\x4a" },
+  { 0x24c0, "\x00\x4b" },
+  { 0x24c1, "\x00\x4c" },
+  { 0x24c2, "\x00\x4d" },
+  { 0x24c3, "\x00\x4e" },
+  { 0x24c4, "\x00\x4f" },
+  { 0x24c5, "\x00\x50" },
+  { 0x24c6, "\x00\x51" },
+  { 0x24c7, "\x00\x52" },
+  { 0x24c8, "\x00\x53" },
+  { 0x24c9, "\x00\x54" },
+  { 0x24ca, "\x00\x55" },
+  { 0x24cb, "\x00\x56" },
+  { 0x24cc, "\x00\x57" },
+  { 0x24cd, "\x00\x58" },
+  { 0x24ce, "\x00\x59" },
+  { 0x24cf, "\x00\x5a" },
+  { 0x24d0, "\x00\x61" },
+  { 0x24d1, "\x00\x62" },
+  { 0x24d2, "\x00\x63" },
+  { 0x24d3, "\x00\x64" },
+  { 0x24d4, "\x00\x65" },
+  { 0x24d5, "\x00\x66" },
+  { 0x24d6, "\x00\x67" },
+  { 0x24d7, "\x00\x68" },
+  { 0x24d8, "\x00\x69" },
+  { 0x24d9, "\x00\x6a" },
+  { 0x24da, "\x00\x6b" },
+  { 0x24db, "\x00\x6c" },
+  { 0x24dc, "\x00\x6d" },
+  { 0x24dd, "\x00\x6e" },
+  { 0x24de, "\x00\x6f" },
+  { 0x24df, "\x00\x70" },
+  { 0x24e0, "\x00\x71" },
+  { 0x24e1, "\x00\x72" },
+  { 0x24e2, "\x00\x73" },
+  { 0x24e3, "\x00\x74" },
+  { 0x24e4, "\x00\x75" },
+  { 0x24e5, "\x00\x76" },
+  { 0x24e6, "\x00\x77" },
+  { 0x24e7, "\x00\x78" },
+  { 0x24e8, "\x00\x79" },
+  { 0x24e9, "\x00\x7a" },
+  { 0x24ea, "\x00\x30" },
+  { 0x2e9f, "\x6b\xcd" },
+  { 0x2ef3, "\x9f\x9f" },
+  { 0x2f00, "\x4e\x00" },
+  { 0x2f01, "\x4e\x28" },
+  { 0x2f02, "\x4e\x36" },
+  { 0x2f03, "\x4e\x3f" },
+  { 0x2f04, "\x4e\x59" },
+  { 0x2f05, "\x4e\x85" },
+  { 0x2f06, "\x4e\x8c" },
+  { 0x2f07, "\x4e\xa0" },
+  { 0x2f08, "\x4e\xba" },
+  { 0x2f09, "\x51\x3f" },
+  { 0x2f0a, "\x51\x65" },
+  { 0x2f0b, "\x51\x6b" },
+  { 0x2f0c, "\x51\x82" },
+  { 0x2f0d, "\x51\x96" },
+  { 0x2f0e, "\x51\xab" },
+  { 0x2f0f, "\x51\xe0" },
+  { 0x2f10, "\x51\xf5" },
+  { 0x2f11, "\x52\x00" },
+  { 0x2f12, "\x52\x9b" },
+  { 0x2f13, "\x52\xf9" },
+  { 0x2f14, "\x53\x15" },
+  { 0x2f15, "\x53\x1a" },
+  { 0x2f16, "\x53\x38" },
+  { 0x2f17, "\x53\x41" },
+  { 0x2f18, "\x53\x5c" },
+  { 0x2f19, "\x53\x69" },
+  { 0x2f1a, "\x53\x82" },
+  { 0x2f1b, "\x53\xb6" },
+  { 0x2f1c, "\x53\xc8" },
+  { 0x2f1d, "\x53\xe3" },
+  { 0x2f1e, "\x56\xd7" },
+  { 0x2f1f, "\x57\x1f" },
+  { 0x2f20, "\x58\xeb" },
+  { 0x2f21, "\x59\x02" },
+  { 0x2f22, "\x59\x0a" },
+  { 0x2f23, "\x59\x15" },
+  { 0x2f24, "\x59\x27" },
+  { 0x2f25, "\x59\x73" },
+  { 0x2f26, "\x5b\x50" },
+  { 0x2f27, "\x5b\x80" },
+  { 0x2f28, "\x5b\xf8" },
+  { 0x2f29, "\x5c\x0f" },
+  { 0x2f2a, "\x5c\x22" },
+  { 0x2f2b, "\x5c\x38" },
+  { 0x2f2c, "\x5c\x6e" },
+  { 0x2f2d, "\x5c\x71" },
+  { 0x2f2e, "\x5d\xdb" },
+  { 0x2f2f, "\x5d\xe5" },
+  { 0x2f30, "\x5d\xf1" },
+  { 0x2f31, "\x5d\xfe" },
+  { 0x2f32, "\x5e\x72" },
+  { 0x2f33, "\x5e\x7a" },
+  { 0x2f34, "\x5e\x7f" },
+  { 0x2f35, "\x5e\xf4" },
+  { 0x2f36, "\x5e\xfe" },
+  { 0x2f37, "\x5f\x0b" },
+  { 0x2f38, "\x5f\x13" },
+  { 0x2f39, "\x5f\x50" },
+  { 0x2f3a, "\x5f\x61" },
+  { 0x2f3b, "\x5f\x73" },
+  { 0x2f3c, "\x5f\xc3" },
+  { 0x2f3d, "\x62\x08" },
+  { 0x2f3e, "\x62\x36" },
+  { 0x2f3f, "\x62\x4b" },
+  { 0x2f40, "\x65\x2f" },
+  { 0x2f41, "\x65\x34" },
+  { 0x2f42, "\x65\x87" },
+  { 0x2f43, "\x65\x97" },
+  { 0x2f44, "\x65\xa4" },
+  { 0x2f45, "\x65\xb9" },
+  { 0x2f46, "\x65\xe0" },
+  { 0x2f47, "\x65\xe5" },
+  { 0x2f48, "\x66\xf0" },
+  { 0x2f49, "\x67\x08" },
+  { 0x2f4a, "\x67\x28" },
+  { 0x2f4b, "\x6b\x20" },
+  { 0x2f4c, "\x6b\x62" },
+  { 0x2f4d, "\x6b\x79" },
+  { 0x2f4e, "\x6b\xb3" },
+  { 0x2f4f, "\x6b\xcb" },
+  { 0x2f50, "\x6b\xd4" },
+  { 0x2f51, "\x6b\xdb" },
+  { 0x2f52, "\x6c\x0f" },
+  { 0x2f53, "\x6c\x14" },
+  { 0x2f54, "\x6c\x34" },
+  { 0x2f55, "\x70\x6b" },
+  { 0x2f56, "\x72\x2a" },
+  { 0x2f57, "\x72\x36" },
+  { 0x2f58, "\x72\x3b" },
+  { 0x2f59, "\x72\x3f" },
+  { 0x2f5a, "\x72\x47" },
+  { 0x2f5b, "\x72\x59" },
+  { 0x2f5c, "\x72\x5b" },
+  { 0x2f5d, "\x72\xac" },
+  { 0x2f5e, "\x73\x84" },
+  { 0x2f5f, "\x73\x89" },
+  { 0x2f60, "\x74\xdc" },
+  { 0x2f61, "\x74\xe6" },
+  { 0x2f62, "\x75\x18" },
+  { 0x2f63, "\x75\x1f" },
+  { 0x2f64, "\x75\x28" },
+  { 0x2f65, "\x75\x30" },
+  { 0x2f66, "\x75\x8b" },
+  { 0x2f67, "\x75\x92" },
+  { 0x2f68, "\x76\x76" },
+  { 0x2f69, "\x76\x7d" },
+  { 0x2f6a, "\x76\xae" },
+  { 0x2f6b, "\x76\xbf" },
+  { 0x2f6c, "\x76\xee" },
+  { 0x2f6d, "\x77\xdb" },
+  { 0x2f6e, "\x77\xe2" },
+  { 0x2f6f, "\x77\xf3" },
+  { 0x2f70, "\x79\x3a" },
+  { 0x2f71, "\x79\xb8" },
+  { 0x2f72, "\x79\xbe" },
+  { 0x2f73, "\x7a\x74" },
+  { 0x2f74, "\x7a\xcb" },
+  { 0x2f75, "\x7a\xf9" },
+  { 0x2f76, "\x7c\x73" },
+  { 0x2f77, "\x7c\xf8" },
+  { 0x2f78, "\x7f\x36" },
+  { 0x2f79, "\x7f\x51" },
+  { 0x2f7a, "\x7f\x8a" },
+  { 0x2f7b, "\x7f\xbd" },
+  { 0x2f7c, "\x80\x01" },
+  { 0x2f7d, "\x80\x0c" },
+  { 0x2f7e, "\x80\x12" },
+  { 0x2f7f, "\x80\x33" },
+  { 0x2f80, "\x80\x7f" },
+  { 0x2f81, "\x80\x89" },
+  { 0x2f82, "\x81\xe3" },
+  { 0x2f83, "\x81\xea" },
+  { 0x2f84, "\x81\xf3" },
+  { 0x2f85, "\x81\xfc" },
+  { 0x2f86, "\x82\x0c" },
+  { 0x2f87, "\x82\x1b" },
+  { 0x2f88, "\x82\x1f" },
+  { 0x2f89, "\x82\x6e" },
+  { 0x2f8a, "\x82\x72" },
+  { 0x2f8b, "\x82\x78" },
+  { 0x2f8c, "\x86\x4d" },
+  { 0x2f8d, "\x86\x6b" },
+  { 0x2f8e, "\x88\x40" },
+  { 0x2f8f, "\x88\x4c" },
+  { 0x2f90, "\x88\x63" },
+  { 0x2f91, "\x89\x7e" },
+  { 0x2f92, "\x89\x8b" },
+  { 0x2f93, "\x89\xd2" },
+  { 0x2f94, "\x8a\x00" },
+  { 0x2f95, "\x8c\x37" },
+  { 0x2f96, "\x8c\x46" },
+  { 0x2f97, "\x8c\x55" },
+  { 0x2f98, "\x8c\x78" },
+  { 0x2f99, "\x8c\x9d" },
+  { 0x2f9a, "\x8d\x64" },
+  { 0x2f9b, "\x8d\x70" },
+  { 0x2f9c, "\x8d\xb3" },
+  { 0x2f9d, "\x8e\xab" },
+  { 0x2f9e, "\x8e\xca" },
+  { 0x2f9f, "\x8f\x9b" },
+  { 0x2fa0, "\x8f\xb0" },
+  { 0x2fa1, "\x8f\xb5" },
+  { 0x2fa2, "\x90\x91" },
+  { 0x2fa3, "\x91\x49" },
+  { 0x2fa4, "\x91\xc6" },
+  { 0x2fa5, "\x91\xcc" },
+  { 0x2fa6, "\x91\xd1" },
+  { 0x2fa7, "\x95\x77" },
+  { 0x2fa8, "\x95\x80" },
+  { 0x2fa9, "\x96\x1c" },
+  { 0x2faa, "\x96\xb6" },
+  { 0x2fab, "\x96\xb9" },
+  { 0x2fac, "\x96\xe8" },
+  { 0x2fad, "\x97\x51" },
+  { 0x2fae, "\x97\x5e" },
+  { 0x2faf, "\x97\x62" },
+  { 0x2fb0, "\x97\x69" },
+  { 0x2fb1, "\x97\xcb" },
+  { 0x2fb2, "\x97\xed" },
+  { 0x2fb3, "\x97\xf3" },
+  { 0x2fb4, "\x98\x01" },
+  { 0x2fb5, "\x98\xa8" },
+  { 0x2fb6, "\x98\xdb" },
+  { 0x2fb7, "\x98\xdf" },
+  { 0x2fb8, "\x99\x96" },
+  { 0x2fb9, "\x99\x99" },
+  { 0x2fba, "\x99\xac" },
+  { 0x2fbb, "\x9a\xa8" },
+  { 0x2fbc, "\x9a\xd8" },
+  { 0x2fbd, "\x9a\xdf" },
+  { 0x2fbe, "\x9b\x25" },
+  { 0x2fbf, "\x9b\x2f" },
+  { 0x2fc0, "\x9b\x32" },
+  { 0x2fc1, "\x9b\x3c" },
+  { 0x2fc2, "\x9b\x5a" },
+  { 0x2fc3, "\x9c\xe5" },
+  { 0x2fc4, "\x9e\x75" },
+  { 0x2fc5, "\x9e\x7f" },
+  { 0x2fc6, "\x9e\xa5" },
+  { 0x2fc7, "\x9e\xbb" },
+  { 0x2fc8, "\x9e\xc3" },
+  { 0x2fc9, "\x9e\xcd" },
+  { 0x2fca, "\x9e\xd1" },
+  { 0x2fcb, "\x9e\xf9" },
+  { 0x2fcc, "\x9e\xfd" },
+  { 0x2fcd, "\x9f\x0e" },
+  { 0x2fce, "\x9f\x13" },
+  { 0x2fcf, "\x9f\x20" },
+  { 0x2fd0, "\x9f\x3b" },
+  { 0x2fd1, "\x9f\x4a" },
+  { 0x2fd2, "\x9f\x52" },
+  { 0x2fd3, "\x9f\x8d" },
+  { 0x2fd4, "\x9f\x9c" },
+  { 0x2fd5, "\x9f\xa0" },
+  { 0x3000, "\x00\x20" },
+  { 0x3036, "\x30\x12" },
+  { 0x3038, "\x53\x41" },
+  { 0x3039, "\x53\x44" },
+  { 0x303a, "\x53\x45" },
+  { 0x309b, "\x00\x20\x30\x99" },
+  { 0x309c, "\x00\x20\x30\x9a" },
+  { 0x3131, "\x11\x00" },
+  { 0x3132, "\x11\x01" },
+  { 0x3133, "\x11\xaa" },
+  { 0x3134, "\x11\x02" },
+  { 0x3135, "\x11\xac" },
+  { 0x3136, "\x11\xad" },
+  { 0x3137, "\x11\x03" },
+  { 0x3138, "\x11\x04" },
+  { 0x3139, "\x11\x05" },
+  { 0x313a, "\x11\xb0" },
+  { 0x313b, "\x11\xb1" },
+  { 0x313c, "\x11\xb2" },
+  { 0x313d, "\x11\xb3" },
+  { 0x313e, "\x11\xb4" },
+  { 0x313f, "\x11\xb5" },
+  { 0x3140, "\x11\x1a" },
+  { 0x3141, "\x11\x06" },
+  { 0x3142, "\x11\x07" },
+  { 0x3143, "\x11\x08" },
+  { 0x3144, "\x11\x21" },
+  { 0x3145, "\x11\x09" },
+  { 0x3146, "\x11\x0a" },
+  { 0x3147, "\x11\x0b" },
+  { 0x3148, "\x11\x0c" },
+  { 0x3149, "\x11\x0d" },
+  { 0x314a, "\x11\x0e" },
+  { 0x314b, "\x11\x0f" },
+  { 0x314c, "\x11\x10" },
+  { 0x314d, "\x11\x11" },
+  { 0x314e, "\x11\x12" },
+  { 0x314f, "\x11\x61" },
+  { 0x3150, "\x11\x62" },
+  { 0x3151, "\x11\x63" },
+  { 0x3152, "\x11\x64" },
+  { 0x3153, "\x11\x65" },
+  { 0x3154, "\x11\x66" },
+  { 0x3155, "\x11\x67" },
+  { 0x3156, "\x11\x68" },
+  { 0x3157, "\x11\x69" },
+  { 0x3158, "\x11\x6a" },
+  { 0x3159, "\x11\x6b" },
+  { 0x315a, "\x11\x6c" },
+  { 0x315b, "\x11\x6d" },
+  { 0x315c, "\x11\x6e" },
+  { 0x315d, "\x11\x6f" },
+  { 0x315e, "\x11\x70" },
+  { 0x315f, "\x11\x71" },
+  { 0x3160, "\x11\x72" },
+  { 0x3161, "\x11\x73" },
+  { 0x3162, "\x11\x74" },
+  { 0x3163, "\x11\x75" },
+  { 0x3164, "\x11\x60" },
+  { 0x3165, "\x11\x14" },
+  { 0x3166, "\x11\x15" },
+  { 0x3167, "\x11\xc7" },
+  { 0x3168, "\x11\xc8" },
+  { 0x3169, "\x11\xcc" },
+  { 0x316a, "\x11\xce" },
+  { 0x316b, "\x11\xd3" },
+  { 0x316c, "\x11\xd7" },
+  { 0x316d, "\x11\xd9" },
+  { 0x316e, "\x11\x1c" },
+  { 0x316f, "\x11\xdd" },
+  { 0x3170, "\x11\xdf" },
+  { 0x3171, "\x11\x1d" },
+  { 0x3172, "\x11\x1e" },
+  { 0x3173, "\x11\x20" },
+  { 0x3174, "\x11\x22" },
+  { 0x3175, "\x11\x23" },
+  { 0x3176, "\x11\x27" },
+  { 0x3177, "\x11\x29" },
+  { 0x3178, "\x11\x2b" },
+  { 0x3179, "\x11\x2c" },
+  { 0x317a, "\x11\x2d" },
+  { 0x317b, "\x11\x2e" },
+  { 0x317c, "\x11\x2f" },
+  { 0x317d, "\x11\x32" },
+  { 0x317e, "\x11\x36" },
+  { 0x317f, "\x11\x40" },
+  { 0x3180, "\x11\x47" },
+  { 0x3181, "\x11\x4c" },
+  { 0x3182, "\x11\xf1" },
+  { 0x3183, "\x11\xf2" },
+  { 0x3184, "\x11\x57" },
+  { 0x3185, "\x11\x58" },
+  { 0x3186, "\x11\x59" },
+  { 0x3187, "\x11\x84" },
+  { 0x3188, "\x11\x85" },
+  { 0x3189, "\x11\x88" },
+  { 0x318a, "\x11\x91" },
+  { 0x318b, "\x11\x92" },
+  { 0x318c, "\x11\x94" },
+  { 0x318d, "\x11\x9e" },
+  { 0x318e, "\x11\xa1" },
+  { 0x3192, "\x4e\x00" },
+  { 0x3193, "\x4e\x8c" },
+  { 0x3194, "\x4e\x09" },
+  { 0x3195, "\x56\xdb" },
+  { 0x3196, "\x4e\x0a" },
+  { 0x3197, "\x4e\x2d" },
+  { 0x3198, "\x4e\x0b" },
+  { 0x3199, "\x75\x32" },
+  { 0x319a, "\x4e\x59" },
+  { 0x319b, "\x4e\x19" },
+  { 0x319c, "\x4e\x01" },
+  { 0x319d, "\x59\x29" },
+  { 0x319e, "\x57\x30" },
+  { 0x319f, "\x4e\xba" },
+  { 0x3200, "\x00\x28\x11\x00\x00\x29" },
+  { 0x3201, "\x00\x28\x11\x02\x00\x29" },
+  { 0x3202, "\x00\x28\x11\x03\x00\x29" },
+  { 0x3203, "\x00\x28\x11\x05\x00\x29" },
+  { 0x3204, "\x00\x28\x11\x06\x00\x29" },
+  { 0x3205, "\x00\x28\x11\x07\x00\x29" },
+  { 0x3206, "\x00\x28\x11\x09\x00\x29" },
+  { 0x3207, "\x00\x28\x11\x0b\x00\x29" },
+  { 0x3208, "\x00\x28\x11\x0c\x00\x29" },
+  { 0x3209, "\x00\x28\x11\x0e\x00\x29" },
+  { 0x320a, "\x00\x28\x11\x0f\x00\x29" },
+  { 0x320b, "\x00\x28\x11\x10\x00\x29" },
+  { 0x320c, "\x00\x28\x11\x11\x00\x29" },
+  { 0x320d, "\x00\x28\x11\x12\x00\x29" },
+  { 0x320e, "\x00\x28\x11\x00\x11\x61\x00\x29" },
+  { 0x320f, "\x00\x28\x11\x02\x11\x61\x00\x29" },
+  { 0x3210, "\x00\x28\x11\x03\x11\x61\x00\x29" },
+  { 0x3211, "\x00\x28\x11\x05\x11\x61\x00\x29" },
+  { 0x3212, "\x00\x28\x11\x06\x11\x61\x00\x29" },
+  { 0x3213, "\x00\x28\x11\x07\x11\x61\x00\x29" },
+  { 0x3214, "\x00\x28\x11\x09\x11\x61\x00\x29" },
+  { 0x3215, "\x00\x28\x11\x0b\x11\x61\x00\x29" },
+  { 0x3216, "\x00\x28\x11\x0c\x11\x61\x00\x29" },
+  { 0x3217, "\x00\x28\x11\x0e\x11\x61\x00\x29" },
+  { 0x3218, "\x00\x28\x11\x0f\x11\x61\x00\x29" },
+  { 0x3219, "\x00\x28\x11\x10\x11\x61\x00\x29" },
+  { 0x321a, "\x00\x28\x11\x11\x11\x61\x00\x29" },
+  { 0x321b, "\x00\x28\x11\x12\x11\x61\x00\x29" },
+  { 0x321c, "\x00\x28\x11\x0c\x11\x6e\x00\x29" },
+  { 0x3220, "\x00\x28\x4e\x00\x00\x29" },
+  { 0x3221, "\x00\x28\x4e\x8c\x00\x29" },
+  { 0x3222, "\x00\x28\x4e\x09\x00\x29" },
+  { 0x3223, "\x00\x28\x56\xdb\x00\x29" },
+  { 0x3224, "\x00\x28\x4e\x94\x00\x29" },
+  { 0x3225, "\x00\x28\x51\x6d\x00\x29" },
+  { 0x3226, "\x00\x28\x4e\x03\x00\x29" },
+  { 0x3227, "\x00\x28\x51\x6b\x00\x29" },
+  { 0x3228, "\x00\x28\x4e\x5d\x00\x29" },
+  { 0x3229, "\x00\x28\x53\x41\x00\x29" },
+  { 0x322a, "\x00\x28\x67\x08\x00\x29" },
+  { 0x322b, "\x00\x28\x70\x6b\x00\x29" },
+  { 0x322c, "\x00\x28\x6c\x34\x00\x29" },
+  { 0x322d, "\x00\x28\x67\x28\x00\x29" },
+  { 0x322e, "\x00\x28\x91\xd1\x00\x29" },
+  { 0x322f, "\x00\x28\x57\x1f\x00\x29" },
+  { 0x3230, "\x00\x28\x65\xe5\x00\x29" },
+  { 0x3231, "\x00\x28\x68\x2a\x00\x29" },
+  { 0x3232, "\x00\x28\x67\x09\x00\x29" },
+  { 0x3233, "\x00\x28\x79\x3e\x00\x29" },
+  { 0x3234, "\x00\x28\x54\x0d\x00\x29" },
+  { 0x3235, "\x00\x28\x72\x79\x00\x29" },
+  { 0x3236, "\x00\x28\x8c\xa1\x00\x29" },
+  { 0x3237, "\x00\x28\x79\x5d\x00\x29" },
+  { 0x3238, "\x00\x28\x52\xb4\x00\x29" },
+  { 0x3239, "\x00\x28\x4e\xe3\x00\x29" },
+  { 0x323a, "\x00\x28\x54\x7c\x00\x29" },
+  { 0x323b, "\x00\x28\x5b\x66\x00\x29" },
+  { 0x323c, "\x00\x28\x76\xe3\x00\x29" },
+  { 0x323d, "\x00\x28\x4f\x01\x00\x29" },
+  { 0x323e, "\x00\x28\x8c\xc7\x00\x29" },
+  { 0x323f, "\x00\x28\x53\x54\x00\x29" },
+  { 0x3240, "\x00\x28\x79\x6d\x00\x29" },
+  { 0x3241, "\x00\x28\x4f\x11\x00\x29" },
+  { 0x3242, "\x00\x28\x81\xea\x00\x29" },
+  { 0x3243, "\x00\x28\x81\xf3\x00\x29" },
+  { 0x3260, "\x11\x00" },
+  { 0x3261, "\x11\x02" },
+  { 0x3262, "\x11\x03" },
+  { 0x3263, "\x11\x05" },
+  { 0x3264, "\x11\x06" },
+  { 0x3265, "\x11\x07" },
+  { 0x3266, "\x11\x09" },
+  { 0x3267, "\x11\x0b" },
+  { 0x3268, "\x11\x0c" },
+  { 0x3269, "\x11\x0e" },
+  { 0x326a, "\x11\x0f" },
+  { 0x326b, "\x11\x10" },
+  { 0x326c, "\x11\x11" },
+  { 0x326d, "\x11\x12" },
+  { 0x326e, "\x11\x00\x11\x61" },
+  { 0x326f, "\x11\x02\x11\x61" },
+  { 0x3270, "\x11\x03\x11\x61" },
+  { 0x3271, "\x11\x05\x11\x61" },
+  { 0x3272, "\x11\x06\x11\x61" },
+  { 0x3273, "\x11\x07\x11\x61" },
+  { 0x3274, "\x11\x09\x11\x61" },
+  { 0x3275, "\x11\x0b\x11\x61" },
+  { 0x3276, "\x11\x0c\x11\x61" },
+  { 0x3277, "\x11\x0e\x11\x61" },
+  { 0x3278, "\x11\x0f\x11\x61" },
+  { 0x3279, "\x11\x10\x11\x61" },
+  { 0x327a, "\x11\x11\x11\x61" },
+  { 0x327b, "\x11\x12\x11\x61" },
+  { 0x3280, "\x4e\x00" },
+  { 0x3281, "\x4e\x8c" },
+  { 0x3282, "\x4e\x09" },
+  { 0x3283, "\x56\xdb" },
+  { 0x3284, "\x4e\x94" },
+  { 0x3285, "\x51\x6d" },
+  { 0x3286, "\x4e\x03" },
+  { 0x3287, "\x51\x6b" },
+  { 0x3288, "\x4e\x5d" },
+  { 0x3289, "\x53\x41" },
+  { 0x328a, "\x67\x08" },
+  { 0x328b, "\x70\x6b" },
+  { 0x328c, "\x6c\x34" },
+  { 0x328d, "\x67\x28" },
+  { 0x328e, "\x91\xd1" },
+  { 0x328f, "\x57\x1f" },
+  { 0x3290, "\x65\xe5" },
+  { 0x3291, "\x68\x2a" },
+  { 0x3292, "\x67\x09" },
+  { 0x3293, "\x79\x3e" },
+  { 0x3294, "\x54\x0d" },
+  { 0x3295, "\x72\x79" },
+  { 0x3296, "\x8c\xa1" },
+  { 0x3297, "\x79\x5d" },
+  { 0x3298, "\x52\xb4" },
+  { 0x3299, "\x79\xd8" },
+  { 0x329a, "\x75\x37" },
+  { 0x329b, "\x59\x73" },
+  { 0x329c, "\x90\x69" },
+  { 0x329d, "\x51\x2a" },
+  { 0x329e, "\x53\x70" },
+  { 0x329f, "\x6c\xe8" },
+  { 0x32a0, "\x98\x05" },
+  { 0x32a1, "\x4f\x11" },
+  { 0x32a2, "\x51\x99" },
+  { 0x32a3, "\x6b\x63" },
+  { 0x32a4, "\x4e\x0a" },
+  { 0x32a5, "\x4e\x2d" },
+  { 0x32a6, "\x4e\x0b" },
+  { 0x32a7, "\x5d\xe6" },
+  { 0x32a8, "\x53\xf3" },
+  { 0x32a9, "\x53\x3b" },
+  { 0x32aa, "\x5b\x97" },
+  { 0x32ab, "\x5b\x66" },
+  { 0x32ac, "\x76\xe3" },
+  { 0x32ad, "\x4f\x01" },
+  { 0x32ae, "\x8c\xc7" },
+  { 0x32af, "\x53\x54" },
+  { 0x32b0, "\x59\x1c" },
+  { 0x32c0, "\x00\x31\x67\x08" },
+  { 0x32c1, "\x00\x32\x67\x08" },
+  { 0x32c2, "\x00\x33\x67\x08" },
+  { 0x32c3, "\x00\x34\x67\x08" },
+  { 0x32c4, "\x00\x35\x67\x08" },
+  { 0x32c5, "\x00\x36\x67\x08" },
+  { 0x32c6, "\x00\x37\x67\x08" },
+  { 0x32c7, "\x00\x38\x67\x08" },
+  { 0x32c8, "\x00\x39\x67\x08" },
+  { 0x32c9, "\x00\x31\x00\x30\x67\x08" },
+  { 0x32ca, "\x00\x31\x00\x31\x67\x08" },
+  { 0x32cb, "\x00\x31\x00\x32\x67\x08" },
+  { 0x32d0, "\x30\xa2" },
+  { 0x32d1, "\x30\xa4" },
+  { 0x32d2, "\x30\xa6" },
+  { 0x32d3, "\x30\xa8" },
+  { 0x32d4, "\x30\xaa" },
+  { 0x32d5, "\x30\xab" },
+  { 0x32d6, "\x30\xad" },
+  { 0x32d7, "\x30\xaf" },
+  { 0x32d8, "\x30\xb1" },
+  { 0x32d9, "\x30\xb3" },
+  { 0x32da, "\x30\xb5" },
+  { 0x32db, "\x30\xb7" },
+  { 0x32dc, "\x30\xb9" },
+  { 0x32dd, "\x30\xbb" },
+  { 0x32de, "\x30\xbd" },
+  { 0x32df, "\x30\xbf" },
+  { 0x32e0, "\x30\xc1" },
+  { 0x32e1, "\x30\xc4" },
+  { 0x32e2, "\x30\xc6" },
+  { 0x32e3, "\x30\xc8" },
+  { 0x32e4, "\x30\xca" },
+  { 0x32e5, "\x30\xcb" },
+  { 0x32e6, "\x30\xcc" },
+  { 0x32e7, "\x30\xcd" },
+  { 0x32e8, "\x30\xce" },
+  { 0x32e9, "\x30\xcf" },
+  { 0x32ea, "\x30\xd2" },
+  { 0x32eb, "\x30\xd5" },
+  { 0x32ec, "\x30\xd8" },
+  { 0x32ed, "\x30\xdb" },
+  { 0x32ee, "\x30\xde" },
+  { 0x32ef, "\x30\xdf" },
+  { 0x32f0, "\x30\xe0" },
+  { 0x32f1, "\x30\xe1" },
+  { 0x32f2, "\x30\xe2" },
+  { 0x32f3, "\x30\xe4" },
+  { 0x32f4, "\x30\xe6" },
+  { 0x32f5, "\x30\xe8" },
+  { 0x32f6, "\x30\xe9" },
+  { 0x32f7, "\x30\xea" },
+  { 0x32f8, "\x30\xeb" },
+  { 0x32f9, "\x30\xec" },
+  { 0x32fa, "\x30\xed" },
+  { 0x32fb, "\x30\xef" },
+  { 0x32fc, "\x30\xf0" },
+  { 0x32fd, "\x30\xf1" },
+  { 0x32fe, "\x30\xf2" },
+  { 0x3300, "\x30\xa2\x30\xd1\x30\xfc\x30\xc8" },
+  { 0x3301, "\x30\xa2\x30\xeb\x30\xd5\x30\xa1" },
+  { 0x3302, "\x30\xa2\x30\xf3\x30\xda\x30\xa2" },
+  { 0x3303, "\x30\xa2\x30\xfc\x30\xeb" },
+  { 0x3304, "\x30\xa4\x30\xcb\x30\xf3\x30\xb0" },
+  { 0x3305, "\x30\xa4\x30\xf3\x30\xc1" },
+  { 0x3306, "\x30\xa6\x30\xa9\x30\xf3" },
+  { 0x3307, "\x30\xa8\x30\xb9\x30\xaf\x30\xfc\x30\xc9" },
+  { 0x3308, "\x30\xa8\x30\xfc\x30\xab\x30\xfc" },
+  { 0x3309, "\x30\xaa\x30\xf3\x30\xb9" },
+  { 0x330a, "\x30\xaa\x30\xfc\x30\xe0" },
+  { 0x330b, "\x30\xab\x30\xa4\x30\xea" },
+  { 0x330c, "\x30\xab\x30\xe9\x30\xc3\x30\xc8" },
+  { 0x330d, "\x30\xab\x30\xed\x30\xea\x30\xfc" },
+  { 0x330e, "\x30\xac\x30\xed\x30\xf3" },
+  { 0x330f, "\x30\xac\x30\xf3\x30\xde" },
+  { 0x3310, "\x30\xae\x30\xac" },
+  { 0x3311, "\x30\xae\x30\xcb\x30\xfc" },
+  { 0x3312, "\x30\xad\x30\xe5\x30\xea\x30\xfc" },
+  { 0x3313, "\x30\xae\x30\xeb\x30\xc0\x30\xfc" },
+  { 0x3314, "\x30\xad\x30\xed" },
+  { 0x3315, "\x30\xad\x30\xed\x30\xb0\x30\xe9\x30\xe0" },
+  { 0x3316, "\x30\xad\x30\xed\x30\xe1\x30\xfc\x30\xc8\x30\xeb" },
+  { 0x3317, "\x30\xad\x30\xed\x30\xef\x30\xc3\x30\xc8" },
+  { 0x3318, "\x30\xb0\x30\xe9\x30\xe0" },
+  { 0x3319, "\x30\xb0\x30\xe9\x30\xe0\x30\xc8\x30\xf3" },
+  { 0x331a, "\x30\xaf\x30\xeb\x30\xbc\x30\xa4\x30\xed" },
+  { 0x331b, "\x30\xaf\x30\xed\x30\xfc\x30\xcd" },
+  { 0x331c, "\x30\xb1\x30\xfc\x30\xb9" },
+  { 0x331d, "\x30\xb3\x30\xeb\x30\xca" },
+  { 0x331e, "\x30\xb3\x30\xfc\x30\xdd" },
+  { 0x331f, "\x30\xb5\x30\xa4\x30\xaf\x30\xeb" },
+  { 0x3320, "\x30\xb5\x30\xf3\x30\xc1\x30\xfc\x30\xe0" },
+  { 0x3321, "\x30\xb7\x30\xea\x30\xf3\x30\xb0" },
+  { 0x3322, "\x30\xbb\x30\xf3\x30\xc1" },
+  { 0x3323, "\x30\xbb\x30\xf3\x30\xc8" },
+  { 0x3324, "\x30\xc0\x30\xfc\x30\xb9" },
+  { 0x3325, "\x30\xc7\x30\xb7" },
+  { 0x3326, "\x30\xc9\x30\xeb" },
+  { 0x3327, "\x30\xc8\x30\xf3" },
+  { 0x3328, "\x30\xca\x30\xce" },
+  { 0x3329, "\x30\xce\x30\xc3\x30\xc8" },
+  { 0x332a, "\x30\xcf\x30\xa4\x30\xc4" },
+  { 0x332b, "\x30\xd1\x30\xfc\x30\xbb\x30\xf3\x30\xc8" },
+  { 0x332c, "\x30\xd1\x30\xfc\x30\xc4" },
+  { 0x332d, "\x30\xd0\x30\xfc\x30\xec\x30\xeb" },
+  { 0x332e, "\x30\xd4\x30\xa2\x30\xb9\x30\xc8\x30\xeb" },
+  { 0x332f, "\x30\xd4\x30\xaf\x30\xeb" },
+  { 0x3330, "\x30\xd4\x30\xb3" },
+  { 0x3331, "\x30\xd3\x30\xeb" },
+  { 0x3332, "\x30\xd5\x30\xa1\x30\xe9\x30\xc3\x30\xc9" },
+  { 0x3333, "\x30\xd5\x30\xa3\x30\xfc\x30\xc8" },
+  { 0x3334, "\x30\xd6\x30\xc3\x30\xb7\x30\xa7\x30\xeb" },
+  { 0x3335, "\x30\xd5\x30\xe9\x30\xf3" },
+  { 0x3336, "\x30\xd8\x30\xaf\x30\xbf\x30\xfc\x30\xeb" },
+  { 0x3337, "\x30\xda\x30\xbd" },
+  { 0x3338, "\x30\xda\x30\xcb\x30\xd2" },
+  { 0x3339, "\x30\xd8\x30\xeb\x30\xc4" },
+  { 0x333a, "\x30\xda\x30\xf3\x30\xb9" },
+  { 0x333b, "\x30\xda\x30\xfc\x30\xb8" },
+  { 0x333c, "\x30\xd9\x30\xfc\x30\xbf" },
+  { 0x333d, "\x30\xdd\x30\xa4\x30\xf3\x30\xc8" },
+  { 0x333e, "\x30\xdc\x30\xeb\x30\xc8" },
+  { 0x333f, "\x30\xdb\x30\xf3" },
+  { 0x3340, "\x30\xdd\x30\xf3\x30\xc9" },
+  { 0x3341, "\x30\xdb\x30\xfc\x30\xeb" },
+  { 0x3342, "\x30\xdb\x30\xfc\x30\xf3" },
+  { 0x3343, "\x30\xde\x30\xa4\x30\xaf\x30\xed" },
+  { 0x3344, "\x30\xde\x30\xa4\x30\xeb" },
+  { 0x3345, "\x30\xde\x30\xc3\x30\xcf" },
+  { 0x3346, "\x30\xde\x30\xeb\x30\xaf" },
+  { 0x3347, "\x30\xde\x30\xf3\x30\xb7\x30\xe7\x30\xf3" },
+  { 0x3348, "\x30\xdf\x30\xaf\x30\xed\x30\xf3" },
+  { 0x3349, "\x30\xdf\x30\xea" },
+  { 0x334a, "\x30\xdf\x30\xea\x30\xd0\x30\xfc\x30\xeb" },
+  { 0x334b, "\x30\xe1\x30\xac" },
+  { 0x334c, "\x30\xe1\x30\xac\x30\xc8\x30\xf3" },
+  { 0x334d, "\x30\xe1\x30\xfc\x30\xc8\x30\xeb" },
+  { 0x334e, "\x30\xe4\x30\xfc\x30\xc9" },
+  { 0x334f, "\x30\xe4\x30\xfc\x30\xeb" },
+  { 0x3350, "\x30\xe6\x30\xa2\x30\xf3" },
+  { 0x3351, "\x30\xea\x30\xc3\x30\xc8\x30\xeb" },
+  { 0x3352, "\x30\xea\x30\xe9" },
+  { 0x3353, "\x30\xeb\x30\xd4\x30\xfc" },
+  { 0x3354, "\x30\xeb\x30\xfc\x30\xd6\x30\xeb" },
+  { 0x3355, "\x30\xec\x30\xe0" },
+  { 0x3356, "\x30\xec\x30\xf3\x30\xc8\x30\xb2\x30\xf3" },
+  { 0x3357, "\x30\xef\x30\xc3\x30\xc8" },
+  { 0x3358, "\x00\x30\x70\xb9" },
+  { 0x3359, "\x00\x31\x70\xb9" },
+  { 0x335a, "\x00\x32\x70\xb9" },
+  { 0x335b, "\x00\x33\x70\xb9" },
+  { 0x335c, "\x00\x34\x70\xb9" },
+  { 0x335d, "\x00\x35\x70\xb9" },
+  { 0x335e, "\x00\x36\x70\xb9" },
+  { 0x335f, "\x00\x37\x70\xb9" },
+  { 0x3360, "\x00\x38\x70\xb9" },
+  { 0x3361, "\x00\x39\x70\xb9" },
+  { 0x3362, "\x00\x31\x00\x30\x70\xb9" },
+  { 0x3363, "\x00\x31\x00\x31\x70\xb9" },
+  { 0x3364, "\x00\x31\x00\x32\x70\xb9" },
+  { 0x3365, "\x00\x31\x00\x33\x70\xb9" },
+  { 0x3366, "\x00\x31\x00\x34\x70\xb9" },
+  { 0x3367, "\x00\x31\x00\x35\x70\xb9" },
+  { 0x3368, "\x00\x31\x00\x36\x70\xb9" },
+  { 0x3369, "\x00\x31\x00\x37\x70\xb9" },
+  { 0x336a, "\x00\x31\x00\x38\x70\xb9" },
+  { 0x336b, "\x00\x31\x00\x39\x70\xb9" },
+  { 0x336c, "\x00\x32\x00\x30\x70\xb9" },
+  { 0x336d, "\x00\x32\x00\x31\x70\xb9" },
+  { 0x336e, "\x00\x32\x00\x32\x70\xb9" },
+  { 0x336f, "\x00\x32\x00\x33\x70\xb9" },
+  { 0x3370, "\x00\x32\x00\x34\x70\xb9" },
+  { 0x3371, "\x00\x68\x00\x50\x00\x61" },
+  { 0x3372, "\x00\x64\x00\x61" },
+  { 0x3373, "\x00\x41\x00\x55" },
+  { 0x3374, "\x00\x62\x00\x61\x00\x72" },
+  { 0x3375, "\x00\x6f\x00\x56" },
+  { 0x3376, "\x00\x70\x00\x63" },
+  { 0x337b, "\x5e\x73\x62\x10" },
+  { 0x337c, "\x66\x2d\x54\x8c" },
+  { 0x337d, "\x59\x27\x6b\x63" },
+  { 0x337e, "\x66\x0e\x6c\xbb" },
+  { 0x337f, "\x68\x2a\x5f\x0f\x4f\x1a\x79\x3e" },
+  { 0x3380, "\x00\x70\x00\x41" },
+  { 0x3381, "\x00\x6e\x00\x41" },
+  { 0x3382, "\x03\xbc\x00\x41" },
+  { 0x3383, "\x00\x6d\x00\x41" },
+  { 0x3384, "\x00\x6b\x00\x41" },
+  { 0x3385, "\x00\x4b\x00\x42" },
+  { 0x3386, "\x00\x4d\x00\x42" },
+  { 0x3387, "\x00\x47\x00\x42" },
+  { 0x3388, "\x00\x63\x00\x61\x00\x6c" },
+  { 0x3389, "\x00\x6b\x00\x63\x00\x61\x00\x6c" },
+  { 0x338a, "\x00\x70\x00\x46" },
+  { 0x338b, "\x00\x6e\x00\x46" },
+  { 0x338c, "\x03\xbc\x00\x46" },
+  { 0x338d, "\x03\xbc\x00\x67" },
+  { 0x338e, "\x00\x6d\x00\x67" },
+  { 0x338f, "\x00\x6b\x00\x67" },
+  { 0x3390, "\x00\x48\x00\x7a" },
+  { 0x3391, "\x00\x6b\x00\x48\x00\x7a" },
+  { 0x3392, "\x00\x4d\x00\x48\x00\x7a" },
+  { 0x3393, "\x00\x47\x00\x48\x00\x7a" },
+  { 0x3394, "\x00\x54\x00\x48\x00\x7a" },
+  { 0x3395, "\x03\xbc\x21\x13" },
+  { 0x3396, "\x00\x6d\x21\x13" },
+  { 0x3397, "\x00\x64\x21\x13" },
+  { 0x3398, "\x00\x6b\x21\x13" },
+  { 0x3399, "\x00\x66\x00\x6d" },
+  { 0x339a, "\x00\x6e\x00\x6d" },
+  { 0x339b, "\x03\xbc\x00\x6d" },
+  { 0x339c, "\x00\x6d\x00\x6d" },
+  { 0x339d, "\x00\x63\x00\x6d" },
+  { 0x339e, "\x00\x6b\x00\x6d" },
+  { 0x339f, "\x00\x6d\x00\x6d\x00\xb2" },
+  { 0x33a0, "\x00\x63\x00\x6d\x00\xb2" },
+  { 0x33a1, "\x00\x6d\x00\xb2" },
+  { 0x33a2, "\x00\x6b\x00\x6d\x00\xb2" },
+  { 0x33a3, "\x00\x6d\x00\x6d\x00\xb3" },
+  { 0x33a4, "\x00\x63\x00\x6d\x00\xb3" },
+  { 0x33a5, "\x00\x6d\x00\xb3" },
+  { 0x33a6, "\x00\x6b\x00\x6d\x00\xb3" },
+  { 0x33a7, "\x00\x6d\x22\x15\x00\x73" },
+  { 0x33a8, "\x00\x6d\x22\x15\x00\x73\x00\xb2" },
+  { 0x33a9, "\x00\x50\x00\x61" },
+  { 0x33aa, "\x00\x6b\x00\x50\x00\x61" },
+  { 0x33ab, "\x00\x4d\x00\x50\x00\x61" },
+  { 0x33ac, "\x00\x47\x00\x50\x00\x61" },
+  { 0x33ad, "\x00\x72\x00\x61\x00\x64" },
+  { 0x33ae, "\x00\x72\x00\x61\x00\x64\x22\x15\x00\x73" },
+  { 0x33af, "\x00\x72\x00\x61\x00\x64\x22\x15\x00\x73\x00\xb2" },
+  { 0x33b0, "\x00\x70\x00\x73" },
+  { 0x33b1, "\x00\x6e\x00\x73" },
+  { 0x33b2, "\x03\xbc\x00\x73" },
+  { 0x33b3, "\x00\x6d\x00\x73" },
+  { 0x33b4, "\x00\x70\x00\x56" },
+  { 0x33b5, "\x00\x6e\x00\x56" },
+  { 0x33b6, "\x03\xbc\x00\x56" },
+  { 0x33b7, "\x00\x6d\x00\x56" },
+  { 0x33b8, "\x00\x6b\x00\x56" },
+  { 0x33b9, "\x00\x4d\x00\x56" },
+  { 0x33ba, "\x00\x70\x00\x57" },
+  { 0x33bb, "\x00\x6e\x00\x57" },
+  { 0x33bc, "\x03\xbc\x00\x57" },
+  { 0x33bd, "\x00\x6d\x00\x57" },
+  { 0x33be, "\x00\x6b\x00\x57" },
+  { 0x33bf, "\x00\x4d\x00\x57" },
+  { 0x33c0, "\x00\x6b\x03\xa9" },
+  { 0x33c1, "\x00\x4d\x03\xa9" },
+  { 0x33c2, "\x00\x61\x00\x2e\x00\x6d\x00\x2e" },
+  { 0x33c3, "\x00\x42\x00\x71" },
+  { 0x33c4, "\x00\x63\x00\x63" },
+  { 0x33c5, "\x00\x63\x00\x64" },
+  { 0x33c6, "\x00\x43\x22\x15\x00\x6b\x00\x67" },
+  { 0x33c7, "\x00\x43\x00\x6f\x00\x2e" },
+  { 0x33c8, "\x00\x64\x00\x42" },
+  { 0x33c9, "\x00\x47\x00\x79" },
+  { 0x33ca, "\x00\x68\x00\x61" },
+  { 0x33cb, "\x00\x48\x00\x50" },
+  { 0x33cc, "\x00\x69\x00\x6e" },
+  { 0x33cd, "\x00\x4b\x00\x4b" },
+  { 0x33ce, "\x00\x4b\x00\x4d" },
+  { 0x33cf, "\x00\x6b\x00\x74" },
+  { 0x33d0, "\x00\x6c\x00\x6d" },
+  { 0x33d1, "\x00\x6c\x00\x6e" },
+  { 0x33d2, "\x00\x6c\x00\x6f\x00\x67" },
+  { 0x33d3, "\x00\x6c\x00\x78" },
+  { 0x33d4, "\x00\x6d\x00\x62" },
+  { 0x33d5, "\x00\x6d\x00\x69\x00\x6c" },
+  { 0x33d6, "\x00\x6d\x00\x6f\x00\x6c" },
+  { 0x33d7, "\x00\x50\x00\x48" },
+  { 0x33d8, "\x00\x70\x00\x2e\x00\x6d\x00\x2e" },
+  { 0x33d9, "\x00\x50\x00\x50\x00\x4d" },
+  { 0x33da, "\x00\x50\x00\x52" },
+  { 0x33db, "\x00\x73\x00\x72" },
+  { 0x33dc, "\x00\x53\x00\x76" },
+  { 0x33dd, "\x00\x57\x00\x62" },
+  { 0x33e0, "\x00\x31\x65\xe5" },
+  { 0x33e1, "\x00\x32\x65\xe5" },
+  { 0x33e2, "\x00\x33\x65\xe5" },
+  { 0x33e3, "\x00\x34\x65\xe5" },
+  { 0x33e4, "\x00\x35\x65\xe5" },
+  { 0x33e5, "\x00\x36\x65\xe5" },
+  { 0x33e6, "\x00\x37\x65\xe5" },
+  { 0x33e7, "\x00\x38\x65\xe5" },
+  { 0x33e8, "\x00\x39\x65\xe5" },
+  { 0x33e9, "\x00\x31\x00\x30\x65\xe5" },
+  { 0x33ea, "\x00\x31\x00\x31\x65\xe5" },
+  { 0x33eb, "\x00\x31\x00\x32\x65\xe5" },
+  { 0x33ec, "\x00\x31\x00\x33\x65\xe5" },
+  { 0x33ed, "\x00\x31\x00\x34\x65\xe5" },
+  { 0x33ee, "\x00\x31\x00\x35\x65\xe5" },
+  { 0x33ef, "\x00\x31\x00\x36\x65\xe5" },
+  { 0x33f0, "\x00\x31\x00\x37\x65\xe5" },
+  { 0x33f1, "\x00\x31\x00\x38\x65\xe5" },
+  { 0x33f2, "\x00\x31\x00\x39\x65\xe5" },
+  { 0x33f3, "\x00\x32\x00\x30\x65\xe5" },
+  { 0x33f4, "\x00\x32\x00\x31\x65\xe5" },
+  { 0x33f5, "\x00\x32\x00\x32\x65\xe5" },
+  { 0x33f6, "\x00\x32\x00\x33\x65\xe5" },
+  { 0x33f7, "\x00\x32\x00\x34\x65\xe5" },
+  { 0x33f8, "\x00\x32\x00\x35\x65\xe5" },
+  { 0x33f9, "\x00\x32\x00\x36\x65\xe5" },
+  { 0x33fa, "\x00\x32\x00\x37\x65\xe5" },
+  { 0x33fb, "\x00\x32\x00\x38\x65\xe5" },
+  { 0x33fc, "\x00\x32\x00\x39\x65\xe5" },
+  { 0x33fd, "\x00\x33\x00\x30\x65\xe5" },
+  { 0x33fe, "\x00\x33\x00\x31\x65\xe5" },
+  { 0xfb00, "\x00\x66\x00\x66" },
+  { 0xfb01, "\x00\x66\x00\x69" },
+  { 0xfb02, "\x00\x66\x00\x6c" },
+  { 0xfb03, "\x00\x66\x00\x66\x00\x69" },
+  { 0xfb04, "\x00\x66\x00\x66\x00\x6c" },
+  { 0xfb05, "\x01\x7f\x00\x74" },
+  { 0xfb06, "\x00\x73\x00\x74" },
+  { 0xfb13, "\x05\x74\x05\x76" },
+  { 0xfb14, "\x05\x74\x05\x65" },
+  { 0xfb15, "\x05\x74\x05\x6b" },
+  { 0xfb16, "\x05\x7e\x05\x76" },
+  { 0xfb17, "\x05\x74\x05\x6d" },
+  { 0xfb20, "\x05\xe2" },
+  { 0xfb21, "\x05\xd0" },
+  { 0xfb22, "\x05\xd3" },
+  { 0xfb23, "\x05\xd4" },
+  { 0xfb24, "\x05\xdb" },
+  { 0xfb25, "\x05\xdc" },
+  { 0xfb26, "\x05\xdd" },
+  { 0xfb27, "\x05\xe8" },
+  { 0xfb28, "\x05\xea" },
+  { 0xfb29, "\x00\x2b" },
+  { 0xfb4f, "\x05\xd0\x05\xdc" },
+  { 0xfb50, "\x06\x71" },
+  { 0xfb51, "\x06\x71" },
+  { 0xfb52, "\x06\x7b" },
+  { 0xfb53, "\x06\x7b" },
+  { 0xfb54, "\x06\x7b" },
+  { 0xfb55, "\x06\x7b" },
+  { 0xfb56, "\x06\x7e" },
+  { 0xfb57, "\x06\x7e" },
+  { 0xfb58, "\x06\x7e" },
+  { 0xfb59, "\x06\x7e" },
+  { 0xfb5a, "\x06\x80" },
+  { 0xfb5b, "\x06\x80" },
+  { 0xfb5c, "\x06\x80" },
+  { 0xfb5d, "\x06\x80" },
+  { 0xfb5e, "\x06\x7a" },
+  { 0xfb5f, "\x06\x7a" },
+  { 0xfb60, "\x06\x7a" },
+  { 0xfb61, "\x06\x7a" },
+  { 0xfb62, "\x06\x7f" },
+  { 0xfb63, "\x06\x7f" },
+  { 0xfb64, "\x06\x7f" },
+  { 0xfb65, "\x06\x7f" },
+  { 0xfb66, "\x06\x79" },
+  { 0xfb67, "\x06\x79" },
+  { 0xfb68, "\x06\x79" },
+  { 0xfb69, "\x06\x79" },
+  { 0xfb6a, "\x06\xa4" },
+  { 0xfb6b, "\x06\xa4" },
+  { 0xfb6c, "\x06\xa4" },
+  { 0xfb6d, "\x06\xa4" },
+  { 0xfb6e, "\x06\xa6" },
+  { 0xfb6f, "\x06\xa6" },
+  { 0xfb70, "\x06\xa6" },
+  { 0xfb71, "\x06\xa6" },
+  { 0xfb72, "\x06\x84" },
+  { 0xfb73, "\x06\x84" },
+  { 0xfb74, "\x06\x84" },
+  { 0xfb75, "\x06\x84" },
+  { 0xfb76, "\x06\x83" },
+  { 0xfb77, "\x06\x83" },
+  { 0xfb78, "\x06\x83" },
+  { 0xfb79, "\x06\x83" },
+  { 0xfb7a, "\x06\x86" },
+  { 0xfb7b, "\x06\x86" },
+  { 0xfb7c, "\x06\x86" },
+  { 0xfb7d, "\x06\x86" },
+  { 0xfb7e, "\x06\x87" },
+  { 0xfb7f, "\x06\x87" },
+  { 0xfb80, "\x06\x87" },
+  { 0xfb81, "\x06\x87" },
+  { 0xfb82, "\x06\x8d" },
+  { 0xfb83, "\x06\x8d" },
+  { 0xfb84, "\x06\x8c" },
+  { 0xfb85, "\x06\x8c" },
+  { 0xfb86, "\x06\x8e" },
+  { 0xfb87, "\x06\x8e" },
+  { 0xfb88, "\x06\x88" },
+  { 0xfb89, "\x06\x88" },
+  { 0xfb8a, "\x06\x98" },
+  { 0xfb8b, "\x06\x98" },
+  { 0xfb8c, "\x06\x91" },
+  { 0xfb8d, "\x06\x91" },
+  { 0xfb8e, "\x06\xa9" },
+  { 0xfb8f, "\x06\xa9" },
+  { 0xfb90, "\x06\xa9" },
+  { 0xfb91, "\x06\xa9" },
+  { 0xfb92, "\x06\xaf" },
+  { 0xfb93, "\x06\xaf" },
+  { 0xfb94, "\x06\xaf" },
+  { 0xfb95, "\x06\xaf" },
+  { 0xfb96, "\x06\xb3" },
+  { 0xfb97, "\x06\xb3" },
+  { 0xfb98, "\x06\xb3" },
+  { 0xfb99, "\x06\xb3" },
+  { 0xfb9a, "\x06\xb1" },
+  { 0xfb9b, "\x06\xb1" },
+  { 0xfb9c, "\x06\xb1" },
+  { 0xfb9d, "\x06\xb1" },
+  { 0xfb9e, "\x06\xba" },
+  { 0xfb9f, "\x06\xba" },
+  { 0xfba0, "\x06\xbb" },
+  { 0xfba1, "\x06\xbb" },
+  { 0xfba2, "\x06\xbb" },
+  { 0xfba3, "\x06\xbb" },
+  { 0xfba4, "\x06\xc0" },
+  { 0xfba5, "\x06\xc0" },
+  { 0xfba6, "\x06\xc1" },
+  { 0xfba7, "\x06\xc1" },
+  { 0xfba8, "\x06\xc1" },
+  { 0xfba9, "\x06\xc1" },
+  { 0xfbaa, "\x06\xbe" },
+  { 0xfbab, "\x06\xbe" },
+  { 0xfbac, "\x06\xbe" },
+  { 0xfbad, "\x06\xbe" },
+  { 0xfbae, "\x06\xd2" },
+  { 0xfbaf, "\x06\xd2" },
+  { 0xfbb0, "\x06\xd3" },
+  { 0xfbb1, "\x06\xd3" },
+  { 0xfbd3, "\x06\xad" },
+  { 0xfbd4, "\x06\xad" },
+  { 0xfbd5, "\x06\xad" },
+  { 0xfbd6, "\x06\xad" },
+  { 0xfbd7, "\x06\xc7" },
+  { 0xfbd8, "\x06\xc7" },
+  { 0xfbd9, "\x06\xc6" },
+  { 0xfbda, "\x06\xc6" },
+  { 0xfbdb, "\x06\xc8" },
+  { 0xfbdc, "\x06\xc8" },
+  { 0xfbdd, "\x06\x77" },
+  { 0xfbde, "\x06\xcb" },
+  { 0xfbdf, "\x06\xcb" },
+  { 0xfbe0, "\x06\xc5" },
+  { 0xfbe1, "\x06\xc5" },
+  { 0xfbe2, "\x06\xc9" },
+  { 0xfbe3, "\x06\xc9" },
+  { 0xfbe4, "\x06\xd0" },
+  { 0xfbe5, "\x06\xd0" },
+  { 0xfbe6, "\x06\xd0" },
+  { 0xfbe7, "\x06\xd0" },
+  { 0xfbe8, "\x06\x49" },
+  { 0xfbe9, "\x06\x49" },
+  { 0xfbea, "\x06\x26\x06\x27" },
+  { 0xfbeb, "\x06\x26\x06\x27" },
+  { 0xfbec, "\x06\x26\x06\xd5" },
+  { 0xfbed, "\x06\x26\x06\xd5" },
+  { 0xfbee, "\x06\x26\x06\x48" },
+  { 0xfbef, "\x06\x26\x06\x48" },
+  { 0xfbf0, "\x06\x26\x06\xc7" },
+  { 0xfbf1, "\x06\x26\x06\xc7" },
+  { 0xfbf2, "\x06\x26\x06\xc6" },
+  { 0xfbf3, "\x06\x26\x06\xc6" },
+  { 0xfbf4, "\x06\x26\x06\xc8" },
+  { 0xfbf5, "\x06\x26\x06\xc8" },
+  { 0xfbf6, "\x06\x26\x06\xd0" },
+  { 0xfbf7, "\x06\x26\x06\xd0" },
+  { 0xfbf8, "\x06\x26\x06\xd0" },
+  { 0xfbf9, "\x06\x26\x06\x49" },
+  { 0xfbfa, "\x06\x26\x06\x49" },
+  { 0xfbfb, "\x06\x26\x06\x49" },
+  { 0xfbfc, "\x06\xcc" },
+  { 0xfbfd, "\x06\xcc" },
+  { 0xfbfe, "\x06\xcc" },
+  { 0xfbff, "\x06\xcc" },
+  { 0xfc00, "\x06\x26\x06\x2c" },
+  { 0xfc01, "\x06\x26\x06\x2d" },
+  { 0xfc02, "\x06\x26\x06\x45" },
+  { 0xfc03, "\x06\x26\x06\x49" },
+  { 0xfc04, "\x06\x26\x06\x4a" },
+  { 0xfc05, "\x06\x28\x06\x2c" },
+  { 0xfc06, "\x06\x28\x06\x2d" },
+  { 0xfc07, "\x06\x28\x06\x2e" },
+  { 0xfc08, "\x06\x28\x06\x45" },
+  { 0xfc09, "\x06\x28\x06\x49" },
+  { 0xfc0a, "\x06\x28\x06\x4a" },
+  { 0xfc0b, "\x06\x2a\x06\x2c" },
+  { 0xfc0c, "\x06\x2a\x06\x2d" },
+  { 0xfc0d, "\x06\x2a\x06\x2e" },
+  { 0xfc0e, "\x06\x2a\x06\x45" },
+  { 0xfc0f, "\x06\x2a\x06\x49" },
+  { 0xfc10, "\x06\x2a\x06\x4a" },
+  { 0xfc11, "\x06\x2b\x06\x2c" },
+  { 0xfc12, "\x06\x2b\x06\x45" },
+  { 0xfc13, "\x06\x2b\x06\x49" },
+  { 0xfc14, "\x06\x2b\x06\x4a" },
+  { 0xfc15, "\x06\x2c\x06\x2d" },
+  { 0xfc16, "\x06\x2c\x06\x45" },
+  { 0xfc17, "\x06\x2d\x06\x2c" },
+  { 0xfc18, "\x06\x2d\x06\x45" },
+  { 0xfc19, "\x06\x2e\x06\x2c" },
+  { 0xfc1a, "\x06\x2e\x06\x2d" },
+  { 0xfc1b, "\x06\x2e\x06\x45" },
+  { 0xfc1c, "\x06\x33\x06\x2c" },
+  { 0xfc1d, "\x06\x33\x06\x2d" },
+  { 0xfc1e, "\x06\x33\x06\x2e" },
+  { 0xfc1f, "\x06\x33\x06\x45" },
+  { 0xfc20, "\x06\x35\x06\x2d" },
+  { 0xfc21, "\x06\x35\x06\x45" },
+  { 0xfc22, "\x06\x36\x06\x2c" },
+  { 0xfc23, "\x06\x36\x06\x2d" },
+  { 0xfc24, "\x06\x36\x06\x2e" },
+  { 0xfc25, "\x06\x36\x06\x45" },
+  { 0xfc26, "\x06\x37\x06\x2d" },
+  { 0xfc27, "\x06\x37\x06\x45" },
+  { 0xfc28, "\x06\x38\x06\x45" },
+  { 0xfc29, "\x06\x39\x06\x2c" },
+  { 0xfc2a, "\x06\x39\x06\x45" },
+  { 0xfc2b, "\x06\x3a\x06\x2c" },
+  { 0xfc2c, "\x06\x3a\x06\x45" },
+  { 0xfc2d, "\x06\x41\x06\x2c" },
+  { 0xfc2e, "\x06\x41\x06\x2d" },
+  { 0xfc2f, "\x06\x41\x06\x2e" },
+  { 0xfc30, "\x06\x41\x06\x45" },
+  { 0xfc31, "\x06\x41\x06\x49" },
+  { 0xfc32, "\x06\x41\x06\x4a" },
+  { 0xfc33, "\x06\x42\x06\x2d" },
+  { 0xfc34, "\x06\x42\x06\x45" },
+  { 0xfc35, "\x06\x42\x06\x49" },
+  { 0xfc36, "\x06\x42\x06\x4a" },
+  { 0xfc37, "\x06\x43\x06\x27" },
+  { 0xfc38, "\x06\x43\x06\x2c" },
+  { 0xfc39, "\x06\x43\x06\x2d" },
+  { 0xfc3a, "\x06\x43\x06\x2e" },
+  { 0xfc3b, "\x06\x43\x06\x44" },
+  { 0xfc3c, "\x06\x43\x06\x45" },
+  { 0xfc3d, "\x06\x43\x06\x49" },
+  { 0xfc3e, "\x06\x43\x06\x4a" },
+  { 0xfc3f, "\x06\x44\x06\x2c" },
+  { 0xfc40, "\x06\x44\x06\x2d" },
+  { 0xfc41, "\x06\x44\x06\x2e" },
+  { 0xfc42, "\x06\x44\x06\x45" },
+  { 0xfc43, "\x06\x44\x06\x49" },
+  { 0xfc44, "\x06\x44\x06\x4a" },
+  { 0xfc45, "\x06\x45\x06\x2c" },
+  { 0xfc46, "\x06\x45\x06\x2d" },
+  { 0xfc47, "\x06\x45\x06\x2e" },
+  { 0xfc48, "\x06\x45\x06\x45" },
+  { 0xfc49, "\x06\x45\x06\x49" },
+  { 0xfc4a, "\x06\x45\x06\x4a" },
+  { 0xfc4b, "\x06\x46\x06\x2c" },
+  { 0xfc4c, "\x06\x46\x06\x2d" },
+  { 0xfc4d, "\x06\x46\x06\x2e" },
+  { 0xfc4e, "\x06\x46\x06\x45" },
+  { 0xfc4f, "\x06\x46\x06\x49" },
+  { 0xfc50, "\x06\x46\x06\x4a" },
+  { 0xfc51, "\x06\x47\x06\x2c" },
+  { 0xfc52, "\x06\x47\x06\x45" },
+  { 0xfc53, "\x06\x47\x06\x49" },
+  { 0xfc54, "\x06\x47\x06\x4a" },
+  { 0xfc55, "\x06\x4a\x06\x2c" },
+  { 0xfc56, "\x06\x4a\x06\x2d" },
+  { 0xfc57, "\x06\x4a\x06\x2e" },
+  { 0xfc58, "\x06\x4a\x06\x45" },
+  { 0xfc59, "\x06\x4a\x06\x49" },
+  { 0xfc5a, "\x06\x4a\x06\x4a" },
+  { 0xfc5b, "\x06\x30\x06\x70" },
+  { 0xfc5c, "\x06\x31\x06\x70" },
+  { 0xfc5d, "\x06\x49\x06\x70" },
+  { 0xfc5e, "\x00\x20\x06\x4c\x06\x51" },
+  { 0xfc5f, "\x00\x20\x06\x4d\x06\x51" },
+  { 0xfc60, "\x00\x20\x06\x4e\x06\x51" },
+  { 0xfc61, "\x00\x20\x06\x4f\x06\x51" },
+  { 0xfc62, "\x00\x20\x06\x50\x06\x51" },
+  { 0xfc63, "\x00\x20\x06\x51\x06\x70" },
+  { 0xfc64, "\x06\x26\x06\x31" },
+  { 0xfc65, "\x06\x26\x06\x32" },
+  { 0xfc66, "\x06\x26\x06\x45" },
+  { 0xfc67, "\x06\x26\x06\x46" },
+  { 0xfc68, "\x06\x26\x06\x49" },
+  { 0xfc69, "\x06\x26\x06\x4a" },
+  { 0xfc6a, "\x06\x28\x06\x31" },
+  { 0xfc6b, "\x06\x28\x06\x32" },
+  { 0xfc6c, "\x06\x28\x06\x45" },
+  { 0xfc6d, "\x06\x28\x06\x46" },
+  { 0xfc6e, "\x06\x28\x06\x49" },
+  { 0xfc6f, "\x06\x28\x06\x4a" },
+  { 0xfc70, "\x06\x2a\x06\x31" },
+  { 0xfc71, "\x06\x2a\x06\x32" },
+  { 0xfc72, "\x06\x2a\x06\x45" },
+  { 0xfc73, "\x06\x2a\x06\x46" },
+  { 0xfc74, "\x06\x2a\x06\x49" },
+  { 0xfc75, "\x06\x2a\x06\x4a" },
+  { 0xfc76, "\x06\x2b\x06\x31" },
+  { 0xfc77, "\x06\x2b\x06\x32" },
+  { 0xfc78, "\x06\x2b\x06\x45" },
+  { 0xfc79, "\x06\x2b\x06\x46" },
+  { 0xfc7a, "\x06\x2b\x06\x49" },
+  { 0xfc7b, "\x06\x2b\x06\x4a" },
+  { 0xfc7c, "\x06\x41\x06\x49" },
+  { 0xfc7d, "\x06\x41\x06\x4a" },
+  { 0xfc7e, "\x06\x42\x06\x49" },
+  { 0xfc7f, "\x06\x42\x06\x4a" },
+  { 0xfc80, "\x06\x43\x06\x27" },
+  { 0xfc81, "\x06\x43\x06\x44" },
+  { 0xfc82, "\x06\x43\x06\x45" },
+  { 0xfc83, "\x06\x43\x06\x49" },
+  { 0xfc84, "\x06\x43\x06\x4a" },
+  { 0xfc85, "\x06\x44\x06\x45" },
+  { 0xfc86, "\x06\x44\x06\x49" },
+  { 0xfc87, "\x06\x44\x06\x4a" },
+  { 0xfc88, "\x06\x45\x06\x27" },
+  { 0xfc89, "\x06\x45\x06\x45" },
+  { 0xfc8a, "\x06\x46\x06\x31" },
+  { 0xfc8b, "\x06\x46\x06\x32" },
+  { 0xfc8c, "\x06\x46\x06\x45" },
+  { 0xfc8d, "\x06\x46\x06\x46" },
+  { 0xfc8e, "\x06\x46\x06\x49" },
+  { 0xfc8f, "\x06\x46\x06\x4a" },
+  { 0xfc90, "\x06\x49\x06\x70" },
+  { 0xfc91, "\x06\x4a\x06\x31" },
+  { 0xfc92, "\x06\x4a\x06\x32" },
+  { 0xfc93, "\x06\x4a\x06\x45" },
+  { 0xfc94, "\x06\x4a\x06\x46" },
+  { 0xfc95, "\x06\x4a\x06\x49" },
+  { 0xfc96, "\x06\x4a\x06\x4a" },
+  { 0xfc97, "\x06\x26\x06\x2c" },
+  { 0xfc98, "\x06\x26\x06\x2d" },
+  { 0xfc99, "\x06\x26\x06\x2e" },
+  { 0xfc9a, "\x06\x26\x06\x45" },
+  { 0xfc9b, "\x06\x26\x06\x47" },
+  { 0xfc9c, "\x06\x28\x06\x2c" },
+  { 0xfc9d, "\x06\x28\x06\x2d" },
+  { 0xfc9e, "\x06\x28\x06\x2e" },
+  { 0xfc9f, "\x06\x28\x06\x45" },
+  { 0xfca0, "\x06\x28\x06\x47" },
+  { 0xfca1, "\x06\x2a\x06\x2c" },
+  { 0xfca2, "\x06\x2a\x06\x2d" },
+  { 0xfca3, "\x06\x2a\x06\x2e" },
+  { 0xfca4, "\x06\x2a\x06\x45" },
+  { 0xfca5, "\x06\x2a\x06\x47" },
+  { 0xfca6, "\x06\x2b\x06\x45" },
+  { 0xfca7, "\x06\x2c\x06\x2d" },
+  { 0xfca8, "\x06\x2c\x06\x45" },
+  { 0xfca9, "\x06\x2d\x06\x2c" },
+  { 0xfcaa, "\x06\x2d\x06\x45" },
+  { 0xfcab, "\x06\x2e\x06\x2c" },
+  { 0xfcac, "\x06\x2e\x06\x45" },
+  { 0xfcad, "\x06\x33\x06\x2c" },
+  { 0xfcae, "\x06\x33\x06\x2d" },
+  { 0xfcaf, "\x06\x33\x06\x2e" },
+  { 0xfcb0, "\x06\x33\x06\x45" },
+  { 0xfcb1, "\x06\x35\x06\x2d" },
+  { 0xfcb2, "\x06\x35\x06\x2e" },
+  { 0xfcb3, "\x06\x35\x06\x45" },
+  { 0xfcb4, "\x06\x36\x06\x2c" },
+  { 0xfcb5, "\x06\x36\x06\x2d" },
+  { 0xfcb6, "\x06\x36\x06\x2e" },
+  { 0xfcb7, "\x06\x36\x06\x45" },
+  { 0xfcb8, "\x06\x37\x06\x2d" },
+  { 0xfcb9, "\x06\x38\x06\x45" },
+  { 0xfcba, "\x06\x39\x06\x2c" },
+  { 0xfcbb, "\x06\x39\x06\x45" },
+  { 0xfcbc, "\x06\x3a\x06\x2c" },
+  { 0xfcbd, "\x06\x3a\x06\x45" },
+  { 0xfcbe, "\x06\x41\x06\x2c" },
+  { 0xfcbf, "\x06\x41\x06\x2d" },
+  { 0xfcc0, "\x06\x41\x06\x2e" },
+  { 0xfcc1, "\x06\x41\x06\x45" },
+  { 0xfcc2, "\x06\x42\x06\x2d" },
+  { 0xfcc3, "\x06\x42\x06\x45" },
+  { 0xfcc4, "\x06\x43\x06\x2c" },
+  { 0xfcc5, "\x06\x43\x06\x2d" },
+  { 0xfcc6, "\x06\x43\x06\x2e" },
+  { 0xfcc7, "\x06\x43\x06\x44" },
+  { 0xfcc8, "\x06\x43\x06\x45" },
+  { 0xfcc9, "\x06\x44\x06\x2c" },
+  { 0xfcca, "\x06\x44\x06\x2d" },
+  { 0xfccb, "\x06\x44\x06\x2e" },
+  { 0xfccc, "\x06\x44\x06\x45" },
+  { 0xfccd, "\x06\x44\x06\x47" },
+  { 0xfcce, "\x06\x45\x06\x2c" },
+  { 0xfccf, "\x06\x45\x06\x2d" },
+  { 0xfcd0, "\x06\x45\x06\x2e" },
+  { 0xfcd1, "\x06\x45\x06\x45" },
+  { 0xfcd2, "\x06\x46\x06\x2c" },
+  { 0xfcd3, "\x06\x46\x06\x2d" },
+  { 0xfcd4, "\x06\x46\x06\x2e" },
+  { 0xfcd5, "\x06\x46\x06\x45" },
+  { 0xfcd6, "\x06\x46\x06\x47" },
+  { 0xfcd7, "\x06\x47\x06\x2c" },
+  { 0xfcd8, "\x06\x47\x06\x45" },
+  { 0xfcd9, "\x06\x47\x06\x70" },
+  { 0xfcda, "\x06\x4a\x06\x2c" },
+  { 0xfcdb, "\x06\x4a\x06\x2d" },
+  { 0xfcdc, "\x06\x4a\x06\x2e" },
+  { 0xfcdd, "\x06\x4a\x06\x45" },
+  { 0xfcde, "\x06\x4a\x06\x47" },
+  { 0xfcdf, "\x06\x26\x06\x45" },
+  { 0xfce0, "\x06\x26\x06\x47" },
+  { 0xfce1, "\x06\x28\x06\x45" },
+  { 0xfce2, "\x06\x28\x06\x47" },
+  { 0xfce3, "\x06\x2a\x06\x45" },
+  { 0xfce4, "\x06\x2a\x06\x47" },
+  { 0xfce5, "\x06\x2b\x06\x45" },
+  { 0xfce6, "\x06\x2b\x06\x47" },
+  { 0xfce7, "\x06\x33\x06\x45" },
+  { 0xfce8, "\x06\x33\x06\x47" },
+  { 0xfce9, "\x06\x34\x06\x45" },
+  { 0xfcea, "\x06\x34\x06\x47" },
+  { 0xfceb, "\x06\x43\x06\x44" },
+  { 0xfcec, "\x06\x43\x06\x45" },
+  { 0xfced, "\x06\x44\x06\x45" },
+  { 0xfcee, "\x06\x46\x06\x45" },
+  { 0xfcef, "\x06\x46\x06\x47" },
+  { 0xfcf0, "\x06\x4a\x06\x45" },
+  { 0xfcf1, "\x06\x4a\x06\x47" },
+  { 0xfcf2, "\x06\x40\x06\x4e\x06\x51" },
+  { 0xfcf3, "\x06\x40\x06\x4f\x06\x51" },
+  { 0xfcf4, "\x06\x40\x06\x50\x06\x51" },
+  { 0xfcf5, "\x06\x37\x06\x49" },
+  { 0xfcf6, "\x06\x37\x06\x4a" },
+  { 0xfcf7, "\x06\x39\x06\x49" },
+  { 0xfcf8, "\x06\x39\x06\x4a" },
+  { 0xfcf9, "\x06\x3a\x06\x49" },
+  { 0xfcfa, "\x06\x3a\x06\x4a" },
+  { 0xfcfb, "\x06\x33\x06\x49" },
+  { 0xfcfc, "\x06\x33\x06\x4a" },
+  { 0xfcfd, "\x06\x34\x06\x49" },
+  { 0xfcfe, "\x06\x34\x06\x4a" },
+  { 0xfcff, "\x06\x2d\x06\x49" },
+  { 0xfd00, "\x06\x2d\x06\x4a" },
+  { 0xfd01, "\x06\x2c\x06\x49" },
+  { 0xfd02, "\x06\x2c\x06\x4a" },
+  { 0xfd03, "\x06\x2e\x06\x49" },
+  { 0xfd04, "\x06\x2e\x06\x4a" },
+  { 0xfd05, "\x06\x35\x06\x49" },
+  { 0xfd06, "\x06\x35\x06\x4a" },
+  { 0xfd07, "\x06\x36\x06\x49" },
+  { 0xfd08, "\x06\x36\x06\x4a" },
+  { 0xfd09, "\x06\x34\x06\x2c" },
+  { 0xfd0a, "\x06\x34\x06\x2d" },
+  { 0xfd0b, "\x06\x34\x06\x2e" },
+  { 0xfd0c, "\x06\x34\x06\x45" },
+  { 0xfd0d, "\x06\x34\x06\x31" },
+  { 0xfd0e, "\x06\x33\x06\x31" },
+  { 0xfd0f, "\x06\x35\x06\x31" },
+  { 0xfd10, "\x06\x36\x06\x31" },
+  { 0xfd11, "\x06\x37\x06\x49" },
+  { 0xfd12, "\x06\x37\x06\x4a" },
+  { 0xfd13, "\x06\x39\x06\x49" },
+  { 0xfd14, "\x06\x39\x06\x4a" },
+  { 0xfd15, "\x06\x3a\x06\x49" },
+  { 0xfd16, "\x06\x3a\x06\x4a" },
+  { 0xfd17, "\x06\x33\x06\x49" },
+  { 0xfd18, "\x06\x33\x06\x4a" },
+  { 0xfd19, "\x06\x34\x06\x49" },
+  { 0xfd1a, "\x06\x34\x06\x4a" },
+  { 0xfd1b, "\x06\x2d\x06\x49" },
+  { 0xfd1c, "\x06\x2d\x06\x4a" },
+  { 0xfd1d, "\x06\x2c\x06\x49" },
+  { 0xfd1e, "\x06\x2c\x06\x4a" },
+  { 0xfd1f, "\x06\x2e\x06\x49" },
+  { 0xfd20, "\x06\x2e\x06\x4a" },
+  { 0xfd21, "\x06\x35\x06\x49" },
+  { 0xfd22, "\x06\x35\x06\x4a" },
+  { 0xfd23, "\x06\x36\x06\x49" },
+  { 0xfd24, "\x06\x36\x06\x4a" },
+  { 0xfd25, "\x06\x34\x06\x2c" },
+  { 0xfd26, "\x06\x34\x06\x2d" },
+  { 0xfd27, "\x06\x34\x06\x2e" },
+  { 0xfd28, "\x06\x34\x06\x45" },
+  { 0xfd29, "\x06\x34\x06\x31" },
+  { 0xfd2a, "\x06\x33\x06\x31" },
+  { 0xfd2b, "\x06\x35\x06\x31" },
+  { 0xfd2c, "\x06\x36\x06\x31" },
+  { 0xfd2d, "\x06\x34\x06\x2c" },
+  { 0xfd2e, "\x06\x34\x06\x2d" },
+  { 0xfd2f, "\x06\x34\x06\x2e" },
+  { 0xfd30, "\x06\x34\x06\x45" },
+  { 0xfd31, "\x06\x33\x06\x47" },
+  { 0xfd32, "\x06\x34\x06\x47" },
+  { 0xfd33, "\x06\x37\x06\x45" },
+  { 0xfd34, "\x06\x33\x06\x2c" },
+  { 0xfd35, "\x06\x33\x06\x2d" },
+  { 0xfd36, "\x06\x33\x06\x2e" },
+  { 0xfd37, "\x06\x34\x06\x2c" },
+  { 0xfd38, "\x06\x34\x06\x2d" },
+  { 0xfd39, "\x06\x34\x06\x2e" },
+  { 0xfd3a, "\x06\x37\x06\x45" },
+  { 0xfd3b, "\x06\x38\x06\x45" },
+  { 0xfd3c, "\x06\x27\x06\x4b" },
+  { 0xfd3d, "\x06\x27\x06\x4b" },
+  { 0xfd50, "\x06\x2a\x06\x2c\x06\x45" },
+  { 0xfd51, "\x06\x2a\x06\x2d\x06\x2c" },
+  { 0xfd52, "\x06\x2a\x06\x2d\x06\x2c" },
+  { 0xfd53, "\x06\x2a\x06\x2d\x06\x45" },
+  { 0xfd54, "\x06\x2a\x06\x2e\x06\x45" },
+  { 0xfd55, "\x06\x2a\x06\x45\x06\x2c" },
+  { 0xfd56, "\x06\x2a\x06\x45\x06\x2d" },
+  { 0xfd57, "\x06\x2a\x06\x45\x06\x2e" },
+  { 0xfd58, "\x06\x2c\x06\x45\x06\x2d" },
+  { 0xfd59, "\x06\x2c\x06\x45\x06\x2d" },
+  { 0xfd5a, "\x06\x2d\x06\x45\x06\x4a" },
+  { 0xfd5b, "\x06\x2d\x06\x45\x06\x49" },
+  { 0xfd5c, "\x06\x33\x06\x2d\x06\x2c" },
+  { 0xfd5d, "\x06\x33\x06\x2c\x06\x2d" },
+  { 0xfd5e, "\x06\x33\x06\x2c\x06\x49" },
+  { 0xfd5f, "\x06\x33\x06\x45\x06\x2d" },
+  { 0xfd60, "\x06\x33\x06\x45\x06\x2d" },
+  { 0xfd61, "\x06\x33\x06\x45\x06\x2c" },
+  { 0xfd62, "\x06\x33\x06\x45\x06\x45" },
+  { 0xfd63, "\x06\x33\x06\x45\x06\x45" },
+  { 0xfd64, "\x06\x35\x06\x2d\x06\x2d" },
+  { 0xfd65, "\x06\x35\x06\x2d\x06\x2d" },
+  { 0xfd66, "\x06\x35\x06\x45\x06\x45" },
+  { 0xfd67, "\x06\x34\x06\x2d\x06\x45" },
+  { 0xfd68, "\x06\x34\x06\x2d\x06\x45" },
+  { 0xfd69, "\x06\x34\x06\x2c\x06\x4a" },
+  { 0xfd6a, "\x06\x34\x06\x45\x06\x2e" },
+  { 0xfd6b, "\x06\x34\x06\x45\x06\x2e" },
+  { 0xfd6c, "\x06\x34\x06\x45\x06\x45" },
+  { 0xfd6d, "\x06\x34\x06\x45\x06\x45" },
+  { 0xfd6e, "\x06\x36\x06\x2d\x06\x49" },
+  { 0xfd6f, "\x06\x36\x06\x2e\x06\x45" },
+  { 0xfd70, "\x06\x36\x06\x2e\x06\x45" },
+  { 0xfd71, "\x06\x37\x06\x45\x06\x2d" },
+  { 0xfd72, "\x06\x37\x06\x45\x06\x2d" },
+  { 0xfd73, "\x06\x37\x06\x45\x06\x45" },
+  { 0xfd74, "\x06\x37\x06\x45\x06\x4a" },
+  { 0xfd75, "\x06\x39\x06\x2c\x06\x45" },
+  { 0xfd76, "\x06\x39\x06\x45\x06\x45" },
+  { 0xfd77, "\x06\x39\x06\x45\x06\x45" },
+  { 0xfd78, "\x06\x39\x06\x45\x06\x49" },
+  { 0xfd79, "\x06\x3a\x06\x45\x06\x45" },
+  { 0xfd7a, "\x06\x3a\x06\x45\x06\x4a" },
+  { 0xfd7b, "\x06\x3a\x06\x45\x06\x49" },
+  { 0xfd7c, "\x06\x41\x06\x2e\x06\x45" },
+  { 0xfd7d, "\x06\x41\x06\x2e\x06\x45" },
+  { 0xfd7e, "\x06\x42\x06\x45\x06\x2d" },
+  { 0xfd7f, "\x06\x42\x06\x45\x06\x45" },
+  { 0xfd80, "\x06\x44\x06\x2d\x06\x45" },
+  { 0xfd81, "\x06\x44\x06\x2d\x06\x4a" },
+  { 0xfd82, "\x06\x44\x06\x2d\x06\x49" },
+  { 0xfd83, "\x06\x44\x06\x2c\x06\x2c" },
+  { 0xfd84, "\x06\x44\x06\x2c\x06\x2c" },
+  { 0xfd85, "\x06\x44\x06\x2e\x06\x45" },
+  { 0xfd86, "\x06\x44\x06\x2e\x06\x45" },
+  { 0xfd87, "\x06\x44\x06\x45\x06\x2d" },
+  { 0xfd88, "\x06\x44\x06\x45\x06\x2d" },
+  { 0xfd89, "\x06\x45\x06\x2d\x06\x2c" },
+  { 0xfd8a, "\x06\x45\x06\x2d\x06\x45" },
+  { 0xfd8b, "\x06\x45\x06\x2d\x06\x4a" },
+  { 0xfd8c, "\x06\x45\x06\x2c\x06\x2d" },
+  { 0xfd8d, "\x06\x45\x06\x2c\x06\x45" },
+  { 0xfd8e, "\x06\x45\x06\x2e\x06\x2c" },
+  { 0xfd8f, "\x06\x45\x06\x2e\x06\x45" },
+  { 0xfd92, "\x06\x45\x06\x2c\x06\x2e" },
+  { 0xfd93, "\x06\x47\x06\x45\x06\x2c" },
+  { 0xfd94, "\x06\x47\x06\x45\x06\x45" },
+  { 0xfd95, "\x06\x46\x06\x2d\x06\x45" },
+  { 0xfd96, "\x06\x46\x06\x2d\x06\x49" },
+  { 0xfd97, "\x06\x46\x06\x2c\x06\x45" },
+  { 0xfd98, "\x06\x46\x06\x2c\x06\x45" },
+  { 0xfd99, "\x06\x46\x06\x2c\x06\x49" },
+  { 0xfd9a, "\x06\x46\x06\x45\x06\x4a" },
+  { 0xfd9b, "\x06\x46\x06\x45\x06\x49" },
+  { 0xfd9c, "\x06\x4a\x06\x45\x06\x45" },
+  { 0xfd9d, "\x06\x4a\x06\x45\x06\x45" },
+  { 0xfd9e, "\x06\x28\x06\x2e\x06\x4a" },
+  { 0xfd9f, "\x06\x2a\x06\x2c\x06\x4a" },
+  { 0xfda0, "\x06\x2a\x06\x2c\x06\x49" },
+  { 0xfda1, "\x06\x2a\x06\x2e\x06\x4a" },
+  { 0xfda2, "\x06\x2a\x06\x2e\x06\x49" },
+  { 0xfda3, "\x06\x2a\x06\x45\x06\x4a" },
+  { 0xfda4, "\x06\x2a\x06\x45\x06\x49" },
+  { 0xfda5, "\x06\x2c\x06\x45\x06\x4a" },
+  { 0xfda6, "\x06\x2c\x06\x2d\x06\x49" },
+  { 0xfda7, "\x06\x2c\x06\x45\x06\x49" },
+  { 0xfda8, "\x06\x33\x06\x2e\x06\x49" },
+  { 0xfda9, "\x06\x35\x06\x2d\x06\x4a" },
+  { 0xfdaa, "\x06\x34\x06\x2d\x06\x4a" },
+  { 0xfdab, "\x06\x36\x06\x2d\x06\x4a" },
+  { 0xfdac, "\x06\x44\x06\x2c\x06\x4a" },
+  { 0xfdad, "\x06\x44\x06\x45\x06\x4a" },
+  { 0xfdae, "\x06\x4a\x06\x2d\x06\x4a" },
+  { 0xfdaf, "\x06\x4a\x06\x2c\x06\x4a" },
+  { 0xfdb0, "\x06\x4a\x06\x45\x06\x4a" },
+  { 0xfdb1, "\x06\x45\x06\x45\x06\x4a" },
+  { 0xfdb2, "\x06\x42\x06\x45\x06\x4a" },
+  { 0xfdb3, "\x06\x46\x06\x2d\x06\x4a" },
+  { 0xfdb4, "\x06\x42\x06\x45\x06\x2d" },
+  { 0xfdb5, "\x06\x44\x06\x2d\x06\x45" },
+  { 0xfdb6, "\x06\x39\x06\x45\x06\x4a" },
+  { 0xfdb7, "\x06\x43\x06\x45\x06\x4a" },
+  { 0xfdb8, "\x06\x46\x06\x2c\x06\x2d" },
+  { 0xfdb9, "\x06\x45\x06\x2e\x06\x4a" },
+  { 0xfdba, "\x06\x44\x06\x2c\x06\x45" },
+  { 0xfdbb, "\x06\x43\x06\x45\x06\x45" },
+  { 0xfdbc, "\x06\x44\x06\x2c\x06\x45" },
+  { 0xfdbd, "\x06\x46\x06\x2c\x06\x2d" },
+  { 0xfdbe, "\x06\x2c\x06\x2d\x06\x4a" },
+  { 0xfdbf, "\x06\x2d\x06\x2c\x06\x4a" },
+  { 0xfdc0, "\x06\x45\x06\x2c\x06\x4a" },
+  { 0xfdc1, "\x06\x41\x06\x45\x06\x4a" },
+  { 0xfdc2, "\x06\x28\x06\x2d\x06\x4a" },
+  { 0xfdc3, "\x06\x43\x06\x45\x06\x45" },
+  { 0xfdc4, "\x06\x39\x06\x2c\x06\x45" },
+  { 0xfdc5, "\x06\x35\x06\x45\x06\x45" },
+  { 0xfdc6, "\x06\x33\x06\x2e\x06\x4a" },
+  { 0xfdc7, "\x06\x46\x06\x2c\x06\x4a" },
+  { 0xfdf0, "\x06\x35\x06\x44\x06\xd2" },
+  { 0xfdf1, "\x06\x42\x06\x44\x06\xd2" },
+  { 0xfdf2, "\x06\x27\x06\x44\x06\x44\x06\x47" },
+  { 0xfdf3, "\x06\x27\x06\x43\x06\x28\x06\x31" },
+  { 0xfdf4, "\x06\x45\x06\x2d\x06\x45\x06\x2f" },
+  { 0xfdf5, "\x06\x35\x06\x44\x06\x39\x06\x45" },
+  { 0xfdf6, "\x06\x31\x06\x33\x06\x48\x06\x44" },
+  { 0xfdf7, "\x06\x39\x06\x44\x06\x4a\x06\x47" },
+  { 0xfdf8, "\x06\x48\x06\x33\x06\x44\x06\x45" },
+  { 0xfdf9, "\x06\x35\x06\x44\x06\x49" },
+  { 0xfdfa, "\x06\x35\x06\x44\x06\x49\x00\x20\x06\x27\x06\x44\x06\x44\x06\x47\x00\x20\x06\x39\x06\x44\x06\x4a\x06\x47\x00\x20\x06\x48\x06\x33\x06\x44\x06\x45" },
+  { 0xfdfb, "\x06\x2c\x06\x44\x00\x20\x06\x2c\x06\x44\x06\x27\x06\x44\x06\x47" },
+  { 0xfe30, "\x20\x25" },
+  { 0xfe31, "\x20\x14" },
+  { 0xfe32, "\x20\x13" },
+  { 0xfe33, "\x00\x5f" },
+  { 0xfe34, "\x00\x5f" },
+  { 0xfe35, "\x00\x28" },
+  { 0xfe36, "\x00\x29" },
+  { 0xfe37, "\x00\x7b" },
+  { 0xfe38, "\x00\x7d" },
+  { 0xfe39, "\x30\x14" },
+  { 0xfe3a, "\x30\x15" },
+  { 0xfe3b, "\x30\x10" },
+  { 0xfe3c, "\x30\x11" },
+  { 0xfe3d, "\x30\x0a" },
+  { 0xfe3e, "\x30\x0b" },
+  { 0xfe3f, "\x30\x08" },
+  { 0xfe40, "\x30\x09" },
+  { 0xfe41, "\x30\x0c" },
+  { 0xfe42, "\x30\x0d" },
+  { 0xfe43, "\x30\x0e" },
+  { 0xfe44, "\x30\x0f" },
+  { 0xfe49, "\x20\x3e" },
+  { 0xfe4a, "\x20\x3e" },
+  { 0xfe4b, "\x20\x3e" },
+  { 0xfe4c, "\x20\x3e" },
+  { 0xfe4d, "\x00\x5f" },
+  { 0xfe4e, "\x00\x5f" },
+  { 0xfe4f, "\x00\x5f" },
+  { 0xfe50, "\x00\x2c" },
+  { 0xfe51, "\x30\x01" },
+  { 0xfe52, "\x00\x2e" },
+  { 0xfe54, "\x00\x3b" },
+  { 0xfe55, "\x00\x3a" },
+  { 0xfe56, "\x00\x3f" },
+  { 0xfe57, "\x00\x21" },
+  { 0xfe58, "\x20\x14" },
+  { 0xfe59, "\x00\x28" },
+  { 0xfe5a, "\x00\x29" },
+  { 0xfe5b, "\x00\x7b" },
+  { 0xfe5c, "\x00\x7d" },
+  { 0xfe5d, "\x30\x14" },
+  { 0xfe5e, "\x30\x15" },
+  { 0xfe5f, "\x00\x23" },
+  { 0xfe60, "\x00\x26" },
+  { 0xfe61, "\x00\x2a" },
+  { 0xfe62, "\x00\x2b" },
+  { 0xfe63, "\x00\x2d" },
+  { 0xfe64, "\x00\x3c" },
+  { 0xfe65, "\x00\x3e" },
+  { 0xfe66, "\x00\x3d" },
+  { 0xfe68, "\x00\x5c" },
+  { 0xfe69, "\x00\x24" },
+  { 0xfe6a, "\x00\x25" },
+  { 0xfe6b, "\x00\x40" },
+  { 0xfe70, "\x00\x20\x06\x4b" },
+  { 0xfe71, "\x06\x40\x06\x4b" },
+  { 0xfe72, "\x00\x20\x06\x4c" },
+  { 0xfe74, "\x00\x20\x06\x4d" },
+  { 0xfe76, "\x00\x20\x06\x4e" },
+  { 0xfe77, "\x06\x40\x06\x4e" },
+  { 0xfe78, "\x00\x20\x06\x4f" },
+  { 0xfe79, "\x06\x40\x06\x4f" },
+  { 0xfe7a, "\x00\x20\x06\x50" },
+  { 0xfe7b, "\x06\x40\x06\x50" },
+  { 0xfe7c, "\x00\x20\x06\x51" },
+  { 0xfe7d, "\x06\x40\x06\x51" },
+  { 0xfe7e, "\x00\x20\x06\x52" },
+  { 0xfe7f, "\x06\x40\x06\x52" },
+  { 0xfe80, "\x06\x21" },
+  { 0xfe81, "\x06\x22" },
+  { 0xfe82, "\x06\x22" },
+  { 0xfe83, "\x06\x23" },
+  { 0xfe84, "\x06\x23" },
+  { 0xfe85, "\x06\x24" },
+  { 0xfe86, "\x06\x24" },
+  { 0xfe87, "\x06\x25" },
+  { 0xfe88, "\x06\x25" },
+  { 0xfe89, "\x06\x26" },
+  { 0xfe8a, "\x06\x26" },
+  { 0xfe8b, "\x06\x26" },
+  { 0xfe8c, "\x06\x26" },
+  { 0xfe8d, "\x06\x27" },
+  { 0xfe8e, "\x06\x27" },
+  { 0xfe8f, "\x06\x28" },
+  { 0xfe90, "\x06\x28" },
+  { 0xfe91, "\x06\x28" },
+  { 0xfe92, "\x06\x28" },
+  { 0xfe93, "\x06\x29" },
+  { 0xfe94, "\x06\x29" },
+  { 0xfe95, "\x06\x2a" },
+  { 0xfe96, "\x06\x2a" },
+  { 0xfe97, "\x06\x2a" },
+  { 0xfe98, "\x06\x2a" },
+  { 0xfe99, "\x06\x2b" },
+  { 0xfe9a, "\x06\x2b" },
+  { 0xfe9b, "\x06\x2b" },
+  { 0xfe9c, "\x06\x2b" },
+  { 0xfe9d, "\x06\x2c" },
+  { 0xfe9e, "\x06\x2c" },
+  { 0xfe9f, "\x06\x2c" },
+  { 0xfea0, "\x06\x2c" },
+  { 0xfea1, "\x06\x2d" },
+  { 0xfea2, "\x06\x2d" },
+  { 0xfea3, "\x06\x2d" },
+  { 0xfea4, "\x06\x2d" },
+  { 0xfea5, "\x06\x2e" },
+  { 0xfea6, "\x06\x2e" },
+  { 0xfea7, "\x06\x2e" },
+  { 0xfea8, "\x06\x2e" },
+  { 0xfea9, "\x06\x2f" },
+  { 0xfeaa, "\x06\x2f" },
+  { 0xfeab, "\x06\x30" },
+  { 0xfeac, "\x06\x30" },
+  { 0xfead, "\x06\x31" },
+  { 0xfeae, "\x06\x31" },
+  { 0xfeaf, "\x06\x32" },
+  { 0xfeb0, "\x06\x32" },
+  { 0xfeb1, "\x06\x33" },
+  { 0xfeb2, "\x06\x33" },
+  { 0xfeb3, "\x06\x33" },
+  { 0xfeb4, "\x06\x33" },
+  { 0xfeb5, "\x06\x34" },
+  { 0xfeb6, "\x06\x34" },
+  { 0xfeb7, "\x06\x34" },
+  { 0xfeb8, "\x06\x34" },
+  { 0xfeb9, "\x06\x35" },
+  { 0xfeba, "\x06\x35" },
+  { 0xfebb, "\x06\x35" },
+  { 0xfebc, "\x06\x35" },
+  { 0xfebd, "\x06\x36" },
+  { 0xfebe, "\x06\x36" },
+  { 0xfebf, "\x06\x36" },
+  { 0xfec0, "\x06\x36" },
+  { 0xfec1, "\x06\x37" },
+  { 0xfec2, "\x06\x37" },
+  { 0xfec3, "\x06\x37" },
+  { 0xfec4, "\x06\x37" },
+  { 0xfec5, "\x06\x38" },
+  { 0xfec6, "\x06\x38" },
+  { 0xfec7, "\x06\x38" },
+  { 0xfec8, "\x06\x38" },
+  { 0xfec9, "\x06\x39" },
+  { 0xfeca, "\x06\x39" },
+  { 0xfecb, "\x06\x39" },
+  { 0xfecc, "\x06\x39" },
+  { 0xfecd, "\x06\x3a" },
+  { 0xfece, "\x06\x3a" },
+  { 0xfecf, "\x06\x3a" },
+  { 0xfed0, "\x06\x3a" },
+  { 0xfed1, "\x06\x41" },
+  { 0xfed2, "\x06\x41" },
+  { 0xfed3, "\x06\x41" },
+  { 0xfed4, "\x06\x41" },
+  { 0xfed5, "\x06\x42" },
+  { 0xfed6, "\x06\x42" },
+  { 0xfed7, "\x06\x42" },
+  { 0xfed8, "\x06\x42" },
+  { 0xfed9, "\x06\x43" },
+  { 0xfeda, "\x06\x43" },
+  { 0xfedb, "\x06\x43" },
+  { 0xfedc, "\x06\x43" },
+  { 0xfedd, "\x06\x44" },
+  { 0xfede, "\x06\x44" },
+  { 0xfedf, "\x06\x44" },
+  { 0xfee0, "\x06\x44" },
+  { 0xfee1, "\x06\x45" },
+  { 0xfee2, "\x06\x45" },
+  { 0xfee3, "\x06\x45" },
+  { 0xfee4, "\x06\x45" },
+  { 0xfee5, "\x06\x46" },
+  { 0xfee6, "\x06\x46" },
+  { 0xfee7, "\x06\x46" },
+  { 0xfee8, "\x06\x46" },
+  { 0xfee9, "\x06\x47" },
+  { 0xfeea, "\x06\x47" },
+  { 0xfeeb, "\x06\x47" },
+  { 0xfeec, "\x06\x47" },
+  { 0xfeed, "\x06\x48" },
+  { 0xfeee, "\x06\x48" },
+  { 0xfeef, "\x06\x49" },
+  { 0xfef0, "\x06\x49" },
+  { 0xfef1, "\x06\x4a" },
+  { 0xfef2, "\x06\x4a" },
+  { 0xfef3, "\x06\x4a" },
+  { 0xfef4, "\x06\x4a" },
+  { 0xfef5, "\x06\x44\x06\x22" },
+  { 0xfef6, "\x06\x44\x06\x22" },
+  { 0xfef7, "\x06\x44\x06\x23" },
+  { 0xfef8, "\x06\x44\x06\x23" },
+  { 0xfef9, "\x06\x44\x06\x25" },
+  { 0xfefa, "\x06\x44\x06\x25" },
+  { 0xfefb, "\x06\x44\x06\x27" },
+  { 0xfefc, "\x06\x44\x06\x27" },
+  { 0xff01, "\x00\x21" },
+  { 0xff02, "\x00\x22" },
+  { 0xff03, "\x00\x23" },
+  { 0xff04, "\x00\x24" },
+  { 0xff05, "\x00\x25" },
+  { 0xff06, "\x00\x26" },
+  { 0xff07, "\x00\x27" },
+  { 0xff08, "\x00\x28" },
+  { 0xff09, "\x00\x29" },
+  { 0xff0a, "\x00\x2a" },
+  { 0xff0b, "\x00\x2b" },
+  { 0xff0c, "\x00\x2c" },
+  { 0xff0d, "\x00\x2d" },
+  { 0xff0e, "\x00\x2e" },
+  { 0xff0f, "\x00\x2f" },
+  { 0xff10, "\x00\x30" },
+  { 0xff11, "\x00\x31" },
+  { 0xff12, "\x00\x32" },
+  { 0xff13, "\x00\x33" },
+  { 0xff14, "\x00\x34" },
+  { 0xff15, "\x00\x35" },
+  { 0xff16, "\x00\x36" },
+  { 0xff17, "\x00\x37" },
+  { 0xff18, "\x00\x38" },
+  { 0xff19, "\x00\x39" },
+  { 0xff1a, "\x00\x3a" },
+  { 0xff1b, "\x00\x3b" },
+  { 0xff1c, "\x00\x3c" },
+  { 0xff1d, "\x00\x3d" },
+  { 0xff1e, "\x00\x3e" },
+  { 0xff1f, "\x00\x3f" },
+  { 0xff20, "\x00\x40" },
+  { 0xff21, "\x00\x41" },
+  { 0xff22, "\x00\x42" },
+  { 0xff23, "\x00\x43" },
+  { 0xff24, "\x00\x44" },
+  { 0xff25, "\x00\x45" },
+  { 0xff26, "\x00\x46" },
+  { 0xff27, "\x00\x47" },
+  { 0xff28, "\x00\x48" },
+  { 0xff29, "\x00\x49" },
+  { 0xff2a, "\x00\x4a" },
+  { 0xff2b, "\x00\x4b" },
+  { 0xff2c, "\x00\x4c" },
+  { 0xff2d, "\x00\x4d" },
+  { 0xff2e, "\x00\x4e" },
+  { 0xff2f, "\x00\x4f" },
+  { 0xff30, "\x00\x50" },
+  { 0xff31, "\x00\x51" },
+  { 0xff32, "\x00\x52" },
+  { 0xff33, "\x00\x53" },
+  { 0xff34, "\x00\x54" },
+  { 0xff35, "\x00\x55" },
+  { 0xff36, "\x00\x56" },
+  { 0xff37, "\x00\x57" },
+  { 0xff38, "\x00\x58" },
+  { 0xff39, "\x00\x59" },
+  { 0xff3a, "\x00\x5a" },
+  { 0xff3b, "\x00\x5b" },
+  { 0xff3c, "\x00\x5c" },
+  { 0xff3d, "\x00\x5d" },
+  { 0xff3e, "\x00\x5e" },
+  { 0xff3f, "\x00\x5f" },
+  { 0xff40, "\x00\x60" },
+  { 0xff41, "\x00\x61" },
+  { 0xff42, "\x00\x62" },
+  { 0xff43, "\x00\x63" },
+  { 0xff44, "\x00\x64" },
+  { 0xff45, "\x00\x65" },
+  { 0xff46, "\x00\x66" },
+  { 0xff47, "\x00\x67" },
+  { 0xff48, "\x00\x68" },
+  { 0xff49, "\x00\x69" },
+  { 0xff4a, "\x00\x6a" },
+  { 0xff4b, "\x00\x6b" },
+  { 0xff4c, "\x00\x6c" },
+  { 0xff4d, "\x00\x6d" },
+  { 0xff4e, "\x00\x6e" },
+  { 0xff4f, "\x00\x6f" },
+  { 0xff50, "\x00\x70" },
+  { 0xff51, "\x00\x71" },
+  { 0xff52, "\x00\x72" },
+  { 0xff53, "\x00\x73" },
+  { 0xff54, "\x00\x74" },
+  { 0xff55, "\x00\x75" },
+  { 0xff56, "\x00\x76" },
+  { 0xff57, "\x00\x77" },
+  { 0xff58, "\x00\x78" },
+  { 0xff59, "\x00\x79" },
+  { 0xff5a, "\x00\x7a" },
+  { 0xff5b, "\x00\x7b" },
+  { 0xff5c, "\x00\x7c" },
+  { 0xff5d, "\x00\x7d" },
+  { 0xff5e, "\x00\x7e" },
+  { 0xff61, "\x30\x02" },
+  { 0xff62, "\x30\x0c" },
+  { 0xff63, "\x30\x0d" },
+  { 0xff64, "\x30\x01" },
+  { 0xff65, "\x30\xfb" },
+  { 0xff66, "\x30\xf2" },
+  { 0xff67, "\x30\xa1" },
+  { 0xff68, "\x30\xa3" },
+  { 0xff69, "\x30\xa5" },
+  { 0xff6a, "\x30\xa7" },
+  { 0xff6b, "\x30\xa9" },
+  { 0xff6c, "\x30\xe3" },
+  { 0xff6d, "\x30\xe5" },
+  { 0xff6e, "\x30\xe7" },
+  { 0xff6f, "\x30\xc3" },
+  { 0xff70, "\x30\xfc" },
+  { 0xff71, "\x30\xa2" },
+  { 0xff72, "\x30\xa4" },
+  { 0xff73, "\x30\xa6" },
+  { 0xff74, "\x30\xa8" },
+  { 0xff75, "\x30\xaa" },
+  { 0xff76, "\x30\xab" },
+  { 0xff77, "\x30\xad" },
+  { 0xff78, "\x30\xaf" },
+  { 0xff79, "\x30\xb1" },
+  { 0xff7a, "\x30\xb3" },
+  { 0xff7b, "\x30\xb5" },
+  { 0xff7c, "\x30\xb7" },
+  { 0xff7d, "\x30\xb9" },
+  { 0xff7e, "\x30\xbb" },
+  { 0xff7f, "\x30\xbd" },
+  { 0xff80, "\x30\xbf" },
+  { 0xff81, "\x30\xc1" },
+  { 0xff82, "\x30\xc4" },
+  { 0xff83, "\x30\xc6" },
+  { 0xff84, "\x30\xc8" },
+  { 0xff85, "\x30\xca" },
+  { 0xff86, "\x30\xcb" },
+  { 0xff87, "\x30\xcc" },
+  { 0xff88, "\x30\xcd" },
+  { 0xff89, "\x30\xce" },
+  { 0xff8a, "\x30\xcf" },
+  { 0xff8b, "\x30\xd2" },
+  { 0xff8c, "\x30\xd5" },
+  { 0xff8d, "\x30\xd8" },
+  { 0xff8e, "\x30\xdb" },
+  { 0xff8f, "\x30\xde" },
+  { 0xff90, "\x30\xdf" },
+  { 0xff91, "\x30\xe0" },
+  { 0xff92, "\x30\xe1" },
+  { 0xff93, "\x30\xe2" },
+  { 0xff94, "\x30\xe4" },
+  { 0xff95, "\x30\xe6" },
+  { 0xff96, "\x30\xe8" },
+  { 0xff97, "\x30\xe9" },
+  { 0xff98, "\x30\xea" },
+  { 0xff99, "\x30\xeb" },
+  { 0xff9a, "\x30\xec" },
+  { 0xff9b, "\x30\xed" },
+  { 0xff9c, "\x30\xef" },
+  { 0xff9d, "\x30\xf3" },
+  { 0xff9e, "\x30\x99" },
+  { 0xff9f, "\x30\x9a" },
+  { 0xffa0, "\x31\x64" },
+  { 0xffa1, "\x31\x31" },
+  { 0xffa2, "\x31\x32" },
+  { 0xffa3, "\x31\x33" },
+  { 0xffa4, "\x31\x34" },
+  { 0xffa5, "\x31\x35" },
+  { 0xffa6, "\x31\x36" },
+  { 0xffa7, "\x31\x37" },
+  { 0xffa8, "\x31\x38" },
+  { 0xffa9, "\x31\x39" },
+  { 0xffaa, "\x31\x3a" },
+  { 0xffab, "\x31\x3b" },
+  { 0xffac, "\x31\x3c" },
+  { 0xffad, "\x31\x3d" },
+  { 0xffae, "\x31\x3e" },
+  { 0xffaf, "\x31\x3f" },
+  { 0xffb0, "\x31\x40" },
+  { 0xffb1, "\x31\x41" },
+  { 0xffb2, "\x31\x42" },
+  { 0xffb3, "\x31\x43" },
+  { 0xffb4, "\x31\x44" },
+  { 0xffb5, "\x31\x45" },
+  { 0xffb6, "\x31\x46" },
+  { 0xffb7, "\x31\x47" },
+  { 0xffb8, "\x31\x48" },
+  { 0xffb9, "\x31\x49" },
+  { 0xffba, "\x31\x4a" },
+  { 0xffbb, "\x31\x4b" },
+  { 0xffbc, "\x31\x4c" },
+  { 0xffbd, "\x31\x4d" },
+  { 0xffbe, "\x31\x4e" },
+  { 0xffc2, "\x31\x4f" },
+  { 0xffc3, "\x31\x50" },
+  { 0xffc4, "\x31\x51" },
+  { 0xffc5, "\x31\x52" },
+  { 0xffc6, "\x31\x53" },
+  { 0xffc7, "\x31\x54" },
+  { 0xffca, "\x31\x55" },
+  { 0xffcb, "\x31\x56" },
+  { 0xffcc, "\x31\x57" },
+  { 0xffcd, "\x31\x58" },
+  { 0xffce, "\x31\x59" },
+  { 0xffcf, "\x31\x5a" },
+  { 0xffd2, "\x31\x5b" },
+  { 0xffd3, "\x31\x5c" },
+  { 0xffd4, "\x31\x5d" },
+  { 0xffd5, "\x31\x5e" },
+  { 0xffd6, "\x31\x5f" },
+  { 0xffd7, "\x31\x60" },
+  { 0xffda, "\x31\x61" },
+  { 0xffdb, "\x31\x62" },
+  { 0xffdc, "\x31\x63" },
+  { 0xffe0, "\x00\xa2" },
+  { 0xffe1, "\x00\xa3" },
+  { 0xffe2, "\x00\xac" },
+  { 0xffe3, "\x00\xaf" },
+  { 0xffe4, "\x00\xa6" },
+  { 0xffe5, "\x00\xa5" },
+  { 0xffe6, "\x20\xa9" },
+  { 0xffe8, "\x25\x02" },
+  { 0xffe9, "\x21\x90" },
+  { 0xffea, "\x21\x91" },
+  { 0xffeb, "\x21\x92" },
+  { 0xffec, "\x21\x93" },
+  { 0xffed, "\x25\xa0" },
+  { 0xffee, "\x25\xcb" }
+};
+
+#endif /* __JAVA_CHARDECOMP_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/java-chartables.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/java-chartables.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/java-chartables.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/java-chartables.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1617 @@
+/* java-chartables.h -- Character tables for java.lang.Character -*- c++ -*-
+   Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+   *** This file is generated by scripts/unicode_to_chartables.pl ***
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+#ifndef __JAVA_CHARTABLES_H__
+#define __JAVA_CHARTABLES_H__
+
+// These tables are automatically generated by scripts/unicode_to_chartables.pl.
+// The Unicode data comes from www.unicode.org; this header is based on
+// UnicodeData-4.0.0.txt. JDK 1.5 uses Unicode version 4.0.0.
+// DO NOT EDIT the tables.  Instead, fix the upstream scripts and run
+// them again.
+
+// The data is stored in C style arrays of the appropriate CNI types, to
+// guarantee that the data is constant and non-relocatable.  The field
+// <code>blocks</code> stores the offset of a block of 2<sup>SHIFT</sup>
+// characters within <code>data</code>. The data field, in turn, stores
+// information about each character in the low order bits, and an offset
+// into the attribute tables <code>upper</code>, <code>lower</code>,
+// <code>numValue</code>, and <code>direction</code>.  Notice that the
+// attribute tables are much smaller than 0xffff entries; as many characters
+// in Unicode share common attributes.  Finally, there is a listing for
+// <code>title</code> exceptions (most characters just have the same title
+// case as upper case).
+
+// This file should only be included by natCharacter.cc
+
+/**
+ * The array containing the numeric values that are too large to be stored as
+ * chars in NUM_VALUE.  NUM_VALUE in this case will contain a negative integer
+ * N such that LARGENUMS[-N - 3] contains the correct numeric value.
+ */
+static const jint largenums[] = {
+    40000, 50000, 60000, 70000, 80000, 90000, };
+
+/**
+ * The character shift amount to look up the block offset. In other words,
+ * <code>(char) (blocks[p][off >> SHIFT[p]] + off)</code> is the index where
+ * <code>ch</code> is described in <code>data</code>, where <code>off</code>
+ * is ch & 0xffff and <code>p</code> is the plane the character belongs to.
+ */
+static const int shift[] = {
+    4, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, };
+
+/**
+ * The mapping of character blocks to their location in <code>data</code>.
+ * Each entry has been adjusted so that a modulo 16 sum with the desired
+ * character gives the actual index into <code>data</code>.
+ */
+static const jchar blocks0[] = {
+    15, 23, 53, 7, 52, 52, 90, 65424, 65437, 65427, 
+    11, 65461, 11, 4, 28, 21, 23, 7, 65527, 173, 
+    269, 65479, 65463, 65403, 273, 273, 183, 257, 65500, 65354, 
+    65335, 65267, 65303, 65287, 65269, 65401, 220, 50, 321, 5, 
+    65511, 317, 304, 311, 355, 355, 274, 325, 358, 342, 
+    326, 310, 65409, 401, 262, 65156, 458, 64826, 442, 64843, 
+    426, 65140, 64823, 334, 435, 64699, 64683, 64716, 64700, 371, 
+    64695, 64679, 64680, 64647, 64631, 64615, 275, 64583, 64567, 64578, 
+    64535, 65036, 65020, 64723, 64708, 64701, 65034, 65019, 65012, 65237, 
+    65219, 64791, 64789, 138, 127, 181, 64945, 220, 64878, 249, 
+    203, 65507, 107, 249, 64783, 64767, 64751, 64735, 64719, 9, 
+    171, 105, 65531, 88, 64623, 64822, 65494, 64460, 64444, 64428, 
+    64527, 64511, 65392, 65529, 64348, 64332, 64316, 64300, 64284, 64268, 
+    64252, 64236, 64220, 64204, 64188, 64172, 64156, 64140, 64124, 64108, 
+    64092, 64076, 64060, 64044, 65249, 64259, 64243, 65267, 64724, 65291, 
+    65299, 63915, 64394, 63482, 64105, 64485, 64366, 63758, 65193, 65199, 
+    64377, 63354, 63977, 63687, 65020, 63328, 64386, 65087, 63204, 63872, 
+    63849, 63246, 64454, 63332, 64937, 64989, 64010, 63098, 63721, 64328, 
+    63117, 62956, 64913, 63171, 63428, 63323, 63407, 63323, 63803, 64222, 
+    64347, 64791, 63236, 63489, 63465, 64420, 64727, 63279, 64657, 63148, 
+    64331, 63361, 63337, 64631, 64369, 63898, 64529, 63020, 64203, 63233, 
+    63209, 64143, 64503, 63838, 64401, 62892, 64468, 62443, 63091, 63450, 
+    64391, 63538, 62780, 62759, 62994, 62979, 62963, 64143, 64157, 64041, 
+    62652, 62636, 62151, 63220, 63096, 64185, 64185, 63935, 62524, 62508, 
+    64137, 62218, 63176, 63172, 62666, 62659, 63643, 62845, 63847, 62669, 
+    62662, 62649, 62052, 62284, 62268, 62252, 62483, 62467, 62722, 63849, 
+    63671, 63833, 62140, 62124, 62108, 62092, 63783, 63767, 63761, 62275, 
+    62259, 63347, 62227, 62211, 62195, 62179, 62163, 63148, 62131, 62115, 
+    62099, 62083, 63075, 62051, 62035, 62019, 62003, 63473, 61963, 61955, 
+    61939, 61923, 61227, 61211, 61875, 61859, 61163, 61827, 61795, 61123, 
+    61107, 61755, 61731, 61731, 61699, 61027, 61683, 61667, 61643, 62635, 
+    62147, 62425, 61340, 61324, 61555, 61539, 61523, 61507, 61491, 62966, 
+    61458, 61443, 61427, 61411, 61395, 61379, 61363, 61347, 61331, 61315, 
+    61299, 61283, 61267, 61251, 61235, 61219, 61203, 61187, 61171, 61155, 
+    61139, 61123, 61107, 61091, 61075, 61059, 61043, 61027, 61011, 60995, 
+    60979, 60963, 60947, 60931, 60915, 60899, 60883, 60867, 60205, 62324, 
+    61814, 61782, 60787, 60771, 60755, 60739, 62073, 62215, 60677, 62199, 
+    60659, 62183, 60627, 62167, 60581, 62151, 60563, 60547, 60531, 62103, 
+    61004, 62098, 60246, 62097, 62097, 60198, 60403, 60387, 61402, 60355, 
+    60339, 61811, 60307, 60291, 61953, 60012, 59996, 59980, 59964, 59948, 
+    60179, 61161, 61746, 60531, 59888, 60099, 61080, 61558, 59804, 59788, 
+    59772, 59756, 59740, 59724, 61668, 61652, 59676, 59660, 59644, 59628, 
+    59612, 59596, 59580, 59564, 59548, 59532, 59516, 59500, 59484, 59468, 
+    59452, 59436, 59420, 59404, 59388, 59372, 59356, 59340, 59324, 59308, 
+    59292, 59276, 59260, 59244, 59228, 59212, 59196, 59180, 59164, 59148, 
+    59132, 59116, 59100, 59084, 59068, 59052, 59036, 59020, 59004, 58988, 
+    58972, 58956, 58940, 58924, 59088, 59072, 59060, 59056, 59040, 59024, 
+    61022, 58796, 58780, 58764, 58748, 58732, 58716, 58700, 58684, 58668, 
+    58135, 58119, 58103, 58087, 58071, 58055, 58039, 58023, 58007, 58200, 
+    57975, 57959, 57943, 57927, 57911, 59112, 60622, 60622, 60590, 60574, 
+    60574, 60574, 60526, 60558, 60558, 60542, 60526, 60526, 58499, 60510, 
+    60510, 57701, 60494, 60494, 57467, 60493, 57427, 57334, 59163, 60445, 
+    60445, 57996, 60429, 60427, 57948, 60411, 58887, 57900, 58047, 59809, 
+    60046, 59529, 60439, 58731, 60423, 60423, 60423, 59922, 60407, 59668, 
+    59654, 59631, 59620, 59616, 59751, 60187, 60182, 59602, 60111, 60058, 
+    59577, 60060, 59602, 59637, 60006, 60003, 59952, 59516, 59950, 59932, 
+    60070, 59316, 60048, 60043, 60033, 60017, 60001, 57613, 59204, 57620, 
+    59188, 57600, 59140, 59945, 57148, 57132, 59076, 59060, 59859, 57068, 
+    59823, 57036, 59825, 59805, 59785, 59785, 59681, 59818, 59808, 59808, 
+    59798, 58754, 58820, 58804, 58788, 58772, 58756, 58740, 58724, 58708, 
+    58692, 58676, 58660, 59374, 58626, 58612, 58596, 58588, 58564, 57001, 
+    58532, 58516, 58500, 58484, 58469, 59260, 58436, 59240, 59224, 56428, 
+    56412, 56396, 56380, 56364, 56728, 58292, 56729, 58260, 56650, 59204, 
+    56673, 56667, 56657, 58964, 58148, 58939, 56156, 58635, 59076, 58084, 
+    58052, 58036, 58020, 58004, 57988, 57972, 57956, 57940, 57924, 57908, 
+    57892, 57876, 57860, 57844, 57828, 57812, 57812, 57796, 57780, 57764, 
+    57748, 57732, 57716, 57700, 57710, 57702, 58220, 57822, 57775, 58235, 
+    57679, 57584, 57562, 58161, 57661, 57673, 57492, 57671, 58045, 57561, 
+    57996, 57980, 57473, 57948, 57932, 57405, 57879, 57420, 58092, 55308, 
+    55292, 55276, 55260, 55244, 55228, 55212, 55196, 55180, 55164, 55148, 
+    55132, 55116, 55100, 55084, 55068, 55052, 55036, 55020, 55004, 54988, 
+    54972, 54956, 54940, 54924, 54908, 54892, 54876, 54860, 54844, 54828, 
+    54812, 54796, 54780, 54764, 54748, 54732, 54716, 54700, 54684, 54668, 
+    54652, 54636, 54620, 54604, 54588, 54572, 54556, 54540, 54524, 54508, 
+    54492, 54476, 54460, 54444, 56388, 54823, 56356, 56340, 56324, 56308, 
+    56292, 57094, 56260, 56244, 56228, 56212, 56196, 56180, 56164, 56148, 
+    56132, 56116, 56100, 56084, 56068, 56868, 54076, 56830, 57012, 57010, 
+    54323, 56918, 54226, 54211, 54195, 54179, 54163, 55228, 54114, 54115, 
+    54099, 54083, 54067, 55067, 55046, 54019, 55001, 53986, 53971, 53955, 
+    53939, 53923, 53891, 53991, 53875, 55347, 53596, 53580, 53564, 53795, 
+    56257, 56244, 56368, 56209, 56320, 56450, 56161, 56149, 56272, 56113, 
+    56097, 56100, 56165, 56049, 56033, 56133, 56001, 55985, 55969, 55953, 
+    55937, 55921, 55905, 55994, 55873, 55857, 55841, 55825, 55809, 55795, 
+    55777, 55762, 53267, 53251, 53235, 53219, 53203, 53187, 53171, 53155, 
+    53139, 53123, 53107, 53091, 53075, 53059, 53043, 53027, 53011, 52995, 
+    52979, 52963, 52947, 52931, 52915, 52899, 52883, 52867, 52851, 52835, 
+    52819, 52803, 52787, 52771, 52755, 52739, 52723, 52707, 52691, 52675, 
+    52659, 52643, 52627, 52611, 52595, 52579, 52563, 52547, 52531, 52515, 
+    52499, 52483, 52467, 52451, 52435, 52419, 52403, 52387, 52371, 52355, 
+    52339, 52323, 52307, 52291, 52275, 52259, 52243, 52227, 52211, 52195, 
+    52179, 52163, 52147, 52131, 52115, 52099, 52083, 52067, 52051, 52035, 
+    52019, 52003, 51987, 51971, 51955, 51939, 51923, 51907, 51891, 51875, 
+    51859, 51843, 51827, 51811, 51795, 51779, 51763, 51747, 51731, 51715, 
+    51699, 51683, 51667, 51651, 51635, 51619, 51603, 51587, 51571, 51555, 
+    51539, 51523, 51507, 51491, 51475, 51459, 51443, 51427, 51411, 51395, 
+    51379, 51363, 51347, 51331, 51315, 51299, 51283, 51267, 51251, 51235, 
+    51219, 51203, 51187, 51171, 51155, 51139, 51123, 51107, 51091, 51075, 
+    51059, 51043, 51027, 51011, 50995, 50979, 50963, 50947, 50931, 50915, 
+    50899, 50883, 50867, 50851, 50835, 50819, 50803, 50787, 50771, 50755, 
+    50739, 50723, 50707, 50691, 50675, 50659, 50643, 50627, 50611, 50595, 
+    50579, 50563, 50547, 50531, 50515, 50499, 50483, 50467, 50451, 50435, 
+    50419, 50403, 50387, 50371, 50355, 50339, 50323, 50307, 50291, 50275, 
+    50259, 50243, 50227, 50211, 50195, 50179, 50163, 50147, 50131, 50115, 
+    50099, 50083, 50067, 50051, 50035, 50019, 50003, 49987, 49971, 49955, 
+    49939, 49923, 49907, 49891, 49875, 49859, 49843, 49827, 49811, 49795, 
+    49779, 49763, 49747, 49731, 49715, 49699, 49683, 49667, 49651, 49635, 
+    49619, 49603, 49587, 49571, 49555, 49539, 49523, 49507, 49491, 49475, 
+    49459, 49443, 49427, 49411, 49395, 49379, 49363, 49347, 49331, 49315, 
+    49299, 49283, 49267, 49251, 49235, 49219, 49203, 49187, 49171, 49155, 
+    49139, 49123, 49107, 49091, 49075, 49059, 49043, 49027, 49011, 48995, 
+    48979, 48963, 48947, 48931, 48915, 48899, 48883, 48867, 48851, 48835, 
+    48819, 48803, 48787, 48771, 48755, 48739, 48723, 48707, 48691, 48675, 
+    48659, 48643, 48627, 48611, 48595, 48579, 48563, 48547, 48531, 48515, 
+    48499, 48483, 48467, 48451, 48435, 48419, 48403, 48387, 48371, 48355, 
+    48339, 48323, 48307, 48291, 48275, 48259, 48243, 48227, 48211, 48195, 
+    48179, 48163, 48147, 48131, 48115, 48099, 48083, 48067, 48051, 48035, 
+    48019, 48003, 47987, 47971, 47955, 47939, 47923, 47907, 47891, 47875, 
+    47859, 47843, 47827, 47811, 47795, 47779, 47763, 47747, 47731, 47715, 
+    47699, 47683, 47667, 47651, 47635, 47619, 47603, 47587, 47571, 47555, 
+    47539, 47523, 47507, 47491, 47475, 47459, 47443, 47427, 47411, 47395, 
+    47379, 47363, 47347, 47331, 47315, 47299, 47283, 47267, 47251, 47235, 
+    47219, 47203, 47187, 47171, 47155, 47139, 47123, 47107, 47091, 47075, 
+    47059, 47043, 47027, 47011, 46995, 46979, 46963, 46947, 46931, 46915, 
+    46899, 46883, 46867, 46851, 46835, 46819, 46803, 46787, 46771, 46755, 
+    46739, 46723, 46707, 48181, 48388, 48372, 48356, 48340, 46611, 46595, 
+    46579, 46563, 46547, 46531, 46515, 46499, 46483, 46467, 46451, 46435, 
+    46419, 46403, 46387, 46371, 46355, 46339, 46323, 46307, 46291, 46275, 
+    46259, 46243, 46227, 46211, 46195, 46179, 46163, 46147, 46131, 46115, 
+    46099, 46083, 46067, 46051, 46035, 46019, 46003, 45987, 45971, 45955, 
+    45939, 45923, 45907, 45891, 45875, 45859, 45843, 45827, 45811, 45795, 
+    45779, 45763, 45747, 45731, 45715, 45699, 45683, 45667, 45651, 45635, 
+    45619, 45603, 45587, 45571, 45555, 45539, 45523, 45507, 45491, 45475, 
+    45459, 45443, 45427, 45411, 45395, 45379, 45363, 45347, 45331, 45315, 
+    45299, 45283, 45267, 45251, 45235, 45219, 45203, 45187, 45171, 45155, 
+    45139, 45123, 45107, 45091, 45075, 45059, 45043, 45027, 45011, 44995, 
+    44979, 44963, 44947, 44931, 44915, 44899, 44883, 44867, 44851, 44835, 
+    44819, 44803, 44787, 44771, 44755, 44739, 44723, 44707, 44691, 44675, 
+    44659, 44643, 44627, 44611, 44595, 44579, 44563, 44547, 44531, 44515, 
+    44499, 44483, 44467, 44451, 44435, 44419, 44403, 44387, 44371, 44355, 
+    44339, 44323, 44307, 44291, 44275, 44259, 44243, 44227, 44211, 44195, 
+    44179, 44163, 44147, 44131, 44115, 44099, 44083, 44067, 44051, 44035, 
+    44019, 44003, 43987, 43971, 43955, 43939, 43923, 43907, 43891, 43875, 
+    43859, 43843, 43827, 43811, 43795, 43779, 43763, 43747, 43731, 43715, 
+    43699, 43683, 43667, 43651, 43635, 43619, 43603, 43587, 43571, 43555, 
+    43539, 43523, 43507, 43491, 43475, 43459, 43443, 43427, 43411, 43395, 
+    43379, 43363, 43347, 43331, 43315, 43299, 43283, 43267, 43251, 43235, 
+    43219, 43203, 43187, 43171, 43155, 43139, 43123, 43107, 43091, 43075, 
+    43059, 43043, 43027, 43011, 42995, 42979, 42963, 42947, 42931, 42915, 
+    42899, 42883, 42867, 42851, 42835, 42819, 42803, 42787, 42771, 42755, 
+    42739, 42723, 42707, 42691, 42675, 42659, 42643, 42627, 42611, 42595, 
+    42579, 42563, 42547, 42531, 42515, 42499, 42483, 42467, 42451, 42435, 
+    42419, 42403, 42387, 42371, 42355, 42339, 42323, 42307, 42291, 42275, 
+    42259, 42243, 42227, 42211, 42195, 42179, 42163, 42147, 42131, 42115, 
+    42099, 42083, 42067, 42051, 42035, 42019, 42003, 41987, 41971, 41955, 
+    41939, 41923, 41907, 41891, 41875, 41859, 41843, 41827, 41811, 41795, 
+    41779, 41763, 41747, 41731, 41715, 41699, 41683, 41667, 41651, 41635, 
+    41619, 41603, 41587, 41571, 41555, 41539, 41523, 41507, 41491, 41475, 
+    41459, 41443, 41427, 41411, 41395, 41379, 41363, 41347, 41331, 41315, 
+    41299, 41283, 41267, 41251, 41235, 41219, 41203, 41187, 41171, 41155, 
+    41139, 41123, 41107, 41091, 41075, 41059, 41043, 41027, 41011, 40995, 
+    40979, 40963, 40947, 40931, 40915, 40899, 40883, 40867, 40851, 40835, 
+    40819, 40803, 40787, 40771, 40755, 40739, 40723, 40707, 40691, 40675, 
+    40659, 40643, 40627, 40611, 40595, 40579, 40563, 40547, 40531, 40515, 
+    40499, 40483, 40467, 40451, 40435, 40419, 40403, 40387, 40371, 40355, 
+    40339, 40323, 40307, 40291, 40275, 40259, 40243, 40227, 40211, 40195, 
+    40179, 40163, 40147, 40131, 40115, 40099, 40083, 40067, 40051, 40035, 
+    40019, 40003, 39987, 39971, 39955, 39939, 39923, 39907, 39891, 39875, 
+    39859, 39843, 39827, 39811, 39795, 39779, 39763, 39747, 39731, 39715, 
+    39699, 39683, 39667, 39651, 39635, 39619, 39603, 39587, 39571, 39555, 
+    39539, 39523, 39507, 39491, 39475, 39459, 39443, 39427, 39411, 39395, 
+    39379, 39363, 39347, 39331, 39315, 39299, 39283, 39267, 39251, 39235, 
+    39219, 39203, 39187, 39171, 39155, 39139, 39123, 39107, 39091, 39075, 
+    39059, 39043, 39027, 39011, 38995, 38979, 38963, 38947, 38931, 38915, 
+    38899, 38883, 38867, 38851, 38835, 38819, 38803, 38787, 38771, 38755, 
+    38739, 38723, 38707, 38691, 38675, 38659, 38643, 38627, 38611, 38595, 
+    38579, 38563, 38547, 38531, 38515, 38499, 38483, 38467, 38451, 38435, 
+    38419, 38403, 38387, 38371, 38355, 38339, 38323, 38307, 38291, 38275, 
+    38259, 38243, 38227, 38211, 38195, 38179, 38163, 38147, 38131, 38115, 
+    38099, 38083, 38067, 38051, 38035, 38019, 38003, 37987, 37971, 37955, 
+    37939, 37923, 37907, 37891, 37875, 37859, 37843, 37827, 37811, 37795, 
+    37779, 37763, 37747, 37731, 37715, 37699, 37683, 37667, 37651, 37635, 
+    37619, 37603, 37587, 37571, 37555, 37539, 37523, 37507, 37491, 37475, 
+    37459, 37443, 37427, 37411, 37395, 37379, 37363, 37347, 37331, 37315, 
+    37299, 37283, 37267, 37251, 37235, 37219, 37203, 37187, 37171, 37155, 
+    37139, 37123, 37107, 37091, 37075, 37059, 37043, 37027, 37011, 36995, 
+    36979, 36963, 36947, 36931, 36915, 36899, 36883, 36867, 36851, 36835, 
+    36819, 36803, 36787, 36771, 36755, 36739, 36723, 36707, 36691, 36675, 
+    36659, 36643, 36627, 36611, 36595, 36579, 36563, 36547, 36531, 36515, 
+    36499, 36483, 36467, 36451, 36435, 36419, 36403, 36387, 36371, 36355, 
+    36339, 36323, 36307, 36291, 36275, 36259, 36243, 36227, 36211, 36195, 
+    36179, 36163, 36147, 36131, 36115, 36099, 36083, 36067, 36051, 36035, 
+    36019, 36003, 35987, 35971, 35955, 35939, 35923, 35907, 35891, 35875, 
+    35859, 35843, 35827, 35811, 35795, 35779, 35763, 35747, 35731, 35715, 
+    35699, 35683, 35667, 35651, 35635, 35619, 35603, 35587, 35571, 35555, 
+    35539, 35523, 35507, 35491, 35475, 35459, 35443, 35427, 35411, 35395, 
+    35379, 35363, 35347, 35331, 35315, 35299, 35283, 35267, 35251, 35235, 
+    35219, 35203, 35187, 35171, 35155, 35139, 35123, 35107, 35091, 35075, 
+    35059, 35043, 35027, 35011, 34995, 34979, 34963, 34947, 34931, 34915, 
+    34899, 34883, 34867, 34851, 34835, 34819, 34803, 34787, 34771, 34755, 
+    34739, 34723, 34707, 34691, 34675, 34659, 34643, 34627, 34611, 34595, 
+    34579, 34563, 34547, 34531, 34515, 34499, 34483, 34467, 34451, 34435, 
+    34419, 34403, 34387, 34371, 34355, 34339, 34323, 34307, 34291, 34275, 
+    34259, 34243, 34227, 34211, 34195, 34179, 34163, 34147, 34131, 34115, 
+    34099, 34083, 34067, 34051, 34035, 34019, 34003, 33987, 33971, 33955, 
+    33939, 33923, 33907, 33891, 33875, 33859, 33843, 33827, 33811, 33795, 
+    33779, 33763, 33747, 33731, 33715, 33699, 33683, 33667, 33651, 33635, 
+    33619, 33603, 33587, 33571, 33555, 33539, 33523, 33507, 33491, 33475, 
+    33459, 33443, 33427, 33411, 33395, 33379, 33363, 33347, 33331, 33315, 
+    33299, 33283, 33267, 33251, 33235, 33219, 33203, 33187, 33171, 33155, 
+    33139, 33123, 33107, 33091, 33075, 33059, 33043, 33027, 33011, 32995, 
+    32979, 32963, 32947, 32931, 32915, 32899, 32883, 32867, 32851, 32835, 
+    32819, 32803, 32787, 32771, 32755, 32739, 32723, 32707, 32691, 32675, 
+    32659, 32643, 32627, 32611, 32595, 32579, 32563, 32547, 32531, 32515, 
+    32499, 32483, 32467, 32451, 32435, 32419, 32403, 32387, 32371, 32355, 
+    32339, 32323, 32307, 32291, 32275, 32259, 32243, 32227, 32211, 32195, 
+    32179, 32163, 32147, 32131, 32115, 32099, 32083, 32067, 32051, 32035, 
+    32019, 32003, 31987, 31971, 31955, 31939, 31923, 31907, 31891, 31875, 
+    31859, 31843, 31827, 31811, 31795, 31779, 31763, 31747, 31731, 31715, 
+    31699, 31683, 31667, 31651, 31635, 31619, 31603, 31587, 31571, 31555, 
+    31539, 31523, 31507, 31491, 31475, 31459, 31443, 31427, 31411, 31395, 
+    31379, 31363, 31347, 31331, 31315, 31299, 31283, 31267, 31251, 31235, 
+    31219, 31203, 31187, 31171, 31155, 31139, 31123, 31107, 31091, 31075, 
+    31059, 31043, 31027, 31011, 30995, 30979, 30963, 30947, 30931, 30915, 
+    30899, 30883, 30867, 30851, 30835, 30819, 30803, 30787, 30771, 30755, 
+    30739, 30723, 30707, 30691, 30675, 30659, 30643, 30627, 30611, 30595, 
+    30579, 30563, 30547, 30531, 30515, 30499, 30483, 30467, 30451, 30435, 
+    30419, 30403, 30387, 30371, 30355, 30339, 30323, 30307, 30291, 30275, 
+    30259, 30243, 30227, 30211, 30195, 30179, 30163, 30147, 30131, 30115, 
+    30099, 30083, 30067, 30051, 30035, 30019, 30003, 29987, 29971, 29955, 
+    29939, 29923, 29907, 29891, 29875, 29859, 29843, 29827, 29811, 29795, 
+    29779, 29763, 29747, 29731, 29715, 29699, 29683, 29667, 29651, 29635, 
+    29619, 29603, 29587, 29571, 29555, 29539, 29523, 29507, 29491, 29475, 
+    29459, 29443, 29427, 29411, 29395, 29379, 29363, 29347, 29331, 29315, 
+    29299, 29283, 29267, 29251, 29235, 29219, 29203, 29187, 29171, 29155, 
+    29139, 29123, 29107, 29091, 29075, 29059, 29043, 29027, 29011, 28995, 
+    28979, 28963, 28947, 28931, 28915, 28899, 28883, 28867, 28851, 28835, 
+    28819, 28803, 28787, 28771, 28755, 28739, 28723, 28707, 28691, 28675, 
+    28659, 28643, 28627, 28611, 28595, 28579, 28563, 28547, 28531, 28515, 
+    28499, 28483, 28467, 28451, 28435, 28419, 28403, 28387, 28371, 28355, 
+    28339, 28323, 28307, 28291, 28275, 28259, 28243, 28227, 28211, 28195, 
+    28179, 28163, 28147, 28131, 28115, 28099, 28083, 28067, 28051, 28035, 
+    28019, 28003, 27987, 27971, 27955, 27939, 27923, 27907, 27891, 27875, 
+    27859, 27843, 27827, 27811, 27795, 27779, 27763, 27747, 27731, 27715, 
+    27699, 27683, 27667, 27651, 27635, 27619, 27603, 27587, 27571, 27555, 
+    27539, 27523, 27507, 27491, 27475, 27459, 27443, 27427, 27411, 27395, 
+    27379, 27363, 27347, 27331, 27315, 27299, 27283, 27267, 27251, 27235, 
+    27219, 27203, 27187, 27171, 27155, 27139, 27123, 27107, 27091, 27075, 
+    27059, 27043, 27027, 27011, 26995, 26979, 26963, 26947, 26931, 26915, 
+    26899, 26883, 26867, 26851, 26835, 26819, 26803, 26787, 26771, 26755, 
+    26739, 26723, 26707, 26691, 26675, 26659, 26643, 26627, 26611, 26595, 
+    26579, 26563, 26547, 26531, 26515, 26499, 26483, 26467, 26451, 26435, 
+    26419, 26403, 26387, 26371, 26355, 26339, 26323, 26307, 26291, 26275, 
+    26259, 26243, 26227, 26211, 26195, 26179, 26163, 26147, 26131, 26115, 
+    26099, 26083, 26067, 26051, 26035, 26019, 26003, 25987, 25971, 25955, 
+    25939, 25923, 25907, 25891, 25875, 25859, 25843, 25827, 25811, 25795, 
+    25779, 25763, 25747, 25731, 27205, 25452, 25436, 25420, 25404, 25388, 
+    25619, 25603, 25587, 25571, 25555, 25539, 25523, 25507, 25491, 25475, 
+    25459, 25443, 25427, 25411, 25395, 25379, 25363, 25347, 25331, 25315, 
+    25299, 25283, 25267, 25251, 25235, 25219, 25203, 25187, 25171, 25155, 
+    25139, 25123, 25107, 25091, 25075, 25059, 25043, 25027, 25011, 24995, 
+    24979, 24963, 24947, 24931, 24915, 24899, 24883, 24867, 24851, 24835, 
+    24819, 24803, 24787, 24771, 24755, 24739, 24723, 24707, 24691, 24675, 
+    24659, 24643, 24627, 24611, 24595, 24579, 24563, 24547, 24531, 24515, 
+    24499, 24483, 25465, 26164, 26148, 26132, 26931, 24140, 24124, 24108, 
+    24092, 24076, 24060, 24044, 24028, 24012, 23996, 23980, 23964, 23948, 
+    23932, 23916, 23900, 23884, 23868, 23852, 23836, 23820, 23804, 23788, 
+    23772, 23756, 23740, 23724, 23708, 23692, 23676, 23660, 23644, 23628, 
+    23612, 23596, 23580, 23564, 23548, 23532, 23516, 23500, 23484, 23468, 
+    23452, 23436, 23420, 23404, 23388, 23372, 23356, 23340, 23324, 23308, 
+    23292, 23276, 23260, 23244, 23228, 23212, 23196, 23180, 23164, 23148, 
+    23132, 23116, 23100, 23084, 23068, 23052, 23036, 23020, 23004, 22988, 
+    22972, 22956, 22940, 22924, 22908, 22892, 22876, 22860, 22844, 22828, 
+    22812, 22796, 22780, 22764, 22748, 22732, 22716, 22700, 22684, 22668, 
+    22652, 22636, 22620, 22604, 22588, 22572, 22556, 22540, 22524, 22508, 
+    22492, 22476, 22460, 22444, 22428, 22412, 22396, 22380, 22364, 22348, 
+    22332, 22316, 22547, 22531, 22515, 22499, 22483, 22467, 22451, 22435, 
+    22419, 22403, 22387, 22371, 22355, 22339, 22323, 22307, 22291, 22275, 
+    22259, 22243, 22227, 22211, 22195, 22179, 22163, 22147, 22131, 22115, 
+    22099, 22083, 22067, 22051, 22035, 22019, 22003, 21987, 21971, 21955, 
+    21939, 21923, 21907, 21891, 21875, 21859, 21843, 21827, 21811, 21795, 
+    21779, 21763, 21747, 21731, 21715, 21699, 21683, 21667, 21651, 21635, 
+    21619, 21603, 21587, 21571, 21555, 21539, 21523, 21507, 21491, 21475, 
+    21459, 21443, 21427, 21411, 21395, 21379, 21363, 21347, 21331, 21315, 
+    21299, 21283, 21267, 21251, 21235, 21219, 21203, 21187, 21171, 21155, 
+    21139, 21123, 21107, 21091, 21075, 21059, 21043, 21027, 21011, 20995, 
+    20979, 20963, 20947, 20931, 20915, 20899, 20883, 20867, 20851, 20835, 
+    20819, 20803, 20787, 20771, 20755, 20739, 20723, 20707, 20691, 20675, 
+    20659, 20643, 20627, 20611, 20595, 20579, 20563, 20547, 20531, 20515, 
+    20499, 20483, 20467, 20451, 20435, 20419, 20403, 20387, 20371, 20355, 
+    20339, 20323, 20307, 20291, 20275, 20259, 20243, 20227, 20211, 20195, 
+    20179, 20163, 20147, 20131, 20115, 20099, 20083, 20067, 20051, 20035, 
+    20019, 20003, 19987, 19971, 19955, 19939, 19923, 19907, 19891, 19875, 
+    19859, 19843, 19827, 19811, 19795, 19779, 19763, 19747, 19731, 19715, 
+    19699, 19683, 19667, 19651, 19635, 19619, 19603, 19587, 19571, 19555, 
+    19539, 19523, 19507, 19491, 19475, 19459, 19443, 19427, 19411, 19395, 
+    19379, 19363, 19347, 19331, 19315, 19299, 19283, 19267, 19251, 19235, 
+    19219, 19203, 19187, 19171, 19155, 19139, 19123, 19107, 19091, 19075, 
+    19059, 19043, 19027, 19011, 18995, 18979, 18963, 18947, 18931, 18915, 
+    18899, 18883, 18867, 18851, 18835, 18819, 18803, 18787, 18771, 18755, 
+    18739, 18723, 18707, 18691, 18675, 18659, 18643, 18627, 18611, 18595, 
+    18579, 18563, 18547, 18531, 18515, 18499, 18483, 18467, 18451, 18435, 
+    18419, 18403, 18387, 18371, 18355, 18339, 18323, 18307, 18291, 18275, 
+    18259, 18243, 18227, 18211, 18195, 18179, 18163, 18147, 18131, 18115, 
+    18099, 18083, 18067, 18051, 18035, 18019, 18003, 17987, 17971, 17955, 
+    17939, 17923, 17907, 17891, 17875, 17859, 17843, 17827, 17811, 17795, 
+    17779, 17763, 17747, 17731, 17715, 17699, 17683, 17667, 17651, 17635, 
+    17619, 17603, 17587, 17571, 17555, 17539, 17523, 17507, 17491, 17475, 
+    17459, 17443, 17427, 17411, 17395, 17379, 17363, 17347, 17331, 17315, 
+    17299, 17283, 17267, 17251, 17235, 17219, 17203, 17187, 17171, 17155, 
+    17139, 17123, 17107, 17091, 17075, 17059, 17043, 17027, 17011, 16995, 
+    16979, 16963, 16947, 16931, 16915, 16899, 16883, 16867, 16851, 16835, 
+    16819, 16803, 16787, 16771, 16755, 16739, 16723, 16707, 16691, 16675, 
+    16659, 16643, 16627, 16611, 16595, 16579, 16563, 16547, 16531, 16515, 
+    16499, 16483, 16467, 16451, 16435, 16419, 16403, 16387, 16371, 16355, 
+    16339, 16323, 16307, 16291, 16275, 16259, 16243, 16227, 16211, 16195, 
+    16179, 16163, 16147, 16131, 16115, 16099, 16083, 16067, 16051, 16035, 
+    16019, 16003, 15987, 15971, 15955, 15939, 15923, 15907, 15891, 15875, 
+    15859, 15843, 15827, 15811, 15795, 15779, 15763, 15747, 15731, 15715, 
+    15699, 15683, 15667, 15651, 15635, 15619, 15603, 15587, 15571, 15555, 
+    15539, 15523, 15507, 15491, 15475, 15459, 15443, 15427, 15411, 15395, 
+    15379, 15363, 15347, 15331, 15315, 15299, 15283, 15267, 15251, 15235, 
+    15219, 15203, 15187, 15171, 15155, 15139, 15123, 15107, 15091, 15075, 
+    15059, 15043, 15027, 15011, 14995, 14979, 14963, 14947, 14931, 14915, 
+    14899, 14883, 14867, 14851, 14835, 14819, 14803, 14787, 14771, 14755, 
+    14739, 14723, 14707, 14691, 14675, 14659, 14643, 14627, 14611, 14595, 
+    14579, 14563, 14547, 14531, 14515, 14499, 14483, 14467, 14451, 14435, 
+    14419, 14403, 14387, 14371, 14355, 14339, 14323, 14307, 14291, 14275, 
+    14259, 14243, 14227, 14211, 14195, 14179, 14163, 14147, 14131, 14115, 
+    14099, 14083, 14067, 14051, 14035, 14019, 14003, 13987, 13971, 13955, 
+    13939, 13923, 13907, 13891, 13875, 13859, 13843, 13827, 13811, 13795, 
+    13779, 13763, 13747, 13731, 13715, 13699, 13683, 13667, 13651, 13635, 
+    13619, 13603, 13587, 13571, 13555, 13539, 13523, 13507, 13491, 13475, 
+    13459, 13443, 13427, 13411, 13395, 13379, 13363, 13347, 13331, 13315, 
+    13299, 13283, 13267, 13251, 13235, 13219, 13203, 13187, 13171, 13155, 
+    13139, 13123, 13107, 13091, 13075, 13059, 13043, 13027, 13011, 12995, 
+    12979, 12963, 12947, 12931, 12915, 12899, 12883, 12867, 12851, 12835, 
+    12819, 12803, 12787, 12771, 12755, 12739, 12723, 12707, 12691, 12675, 
+    12659, 12643, 12627, 12611, 12595, 12579, 12563, 12547, 12531, 12515, 
+    12499, 12483, 12467, 12451, 12435, 12419, 12403, 12387, 12371, 12355, 
+    12339, 12323, 12307, 12291, 12275, 12259, 12243, 12227, 12211, 12195, 
+    12179, 12163, 12147, 12131, 12115, 12099, 12083, 12067, 12051, 12035, 
+    12019, 12003, 11987, 11971, 11955, 11939, 11923, 11907, 11891, 11875, 
+    11859, 11843, 11827, 11811, 11795, 11779, 11763, 11747, 11731, 11715, 
+    11699, 11683, 11667, 11651, 11635, 11619, 11603, 11587, 11571, 11555, 
+    11539, 11523, 11507, 11491, 11475, 11459, 11443, 11427, 11411, 11395, 
+    12871, 11116, 11100, 11084, 11068, 11052, 14050, 14034, 14018, 14002, 
+    13986, 13970, 13954, 13938, 13922, 13906, 13890, 13874, 13858, 13842, 
+    13826, 13810, 13794, 13778, 13762, 13746, 13730, 13714, 13698, 13682, 
+    13666, 13650, 13634, 13618, 13602, 13586, 13570, 13554, 13538, 13522, 
+    13506, 13490, 13474, 13458, 13442, 13426, 13410, 13394, 13378, 13362, 
+    13346, 13330, 13314, 13298, 13282, 13266, 13250, 13234, 13218, 13202, 
+    13186, 13170, 13154, 13138, 13122, 13106, 13090, 13074, 13058, 13042, 
+    13026, 13010, 12994, 12978, 12962, 12946, 12930, 12914, 12898, 12882, 
+    12866, 12850, 12834, 12818, 12802, 12786, 12770, 12754, 12738, 12722, 
+    12706, 12690, 12674, 12658, 12642, 12626, 12610, 12594, 12578, 12562, 
+    12546, 12530, 12514, 12498, 12482, 12466, 12450, 12434, 12418, 12402, 
+    12386, 12370, 12354, 12338, 12322, 12306, 12290, 12274, 12258, 12242, 
+    12226, 12210, 12194, 12178, 12162, 12146, 12130, 12114, 12098, 12082, 
+    12066, 12050, 12034, 12018, 12018, 12002, 11986, 11970, 11954, 11938, 
+    11922, 11906, 11890, 11874, 11858, 11842, 11826, 11810, 11794, 11778, 
+    11762, 11746, 11730, 11714, 11698, 11682, 11666, 11650, 11634, 11618, 
+    11602, 11586, 11570, 11554, 11538, 11522, 11506, 11490, 11474, 11458, 
+    11442, 11426, 11410, 11394, 11378, 11362, 11346, 11330, 11314, 11298, 
+    11282, 11266, 11250, 11234, 11218, 11202, 11186, 11170, 11154, 11138, 
+    11122, 11106, 11090, 11074, 11058, 11042, 11026, 11010, 10994, 10978, 
+    10962, 10946, 10930, 10914, 10898, 10882, 10866, 10850, 10834, 10818, 
+    10802, 10786, 10770, 10754, 10738, 10722, 10706, 10690, 10674, 10658, 
+    10642, 10626, 10610, 10594, 10578, 10562, 10546, 10530, 10514, 10498, 
+    10482, 10466, 10450, 10434, 10418, 10402, 10386, 10370, 10354, 10338, 
+    10322, 10306, 10290, 10274, 10258, 10242, 10226, 10210, 10194, 10178, 
+    10162, 10146, 10130, 10114, 10098, 10082, 10066, 10050, 10034, 10018, 
+    10002, 9986, 9970, 9954, 9938, 9922, 9906, 9890, 9874, 9858, 
+    9842, 9826, 9810, 9794, 9778, 9762, 9746, 9730, 9714, 9698, 
+    9682, 9666, 9650, 9634, 9618, 9602, 9586, 9570, 9554, 9538, 
+    9522, 9506, 9490, 9474, 9458, 9442, 9426, 9410, 9394, 9378, 
+    9362, 9346, 9330, 9314, 9298, 9282, 9266, 9250, 9234, 9218, 
+    9202, 9186, 9170, 9154, 9138, 9122, 9106, 9090, 9074, 9058, 
+    9042, 9026, 9010, 8994, 8978, 8962, 8946, 8930, 8914, 8898, 
+    8882, 8866, 8850, 8834, 8818, 8802, 8786, 8770, 8754, 8738, 
+    8722, 8706, 8690, 8674, 8658, 8642, 8626, 8610, 8594, 8578, 
+    8562, 8546, 8530, 8514, 8498, 8482, 8466, 8450, 8434, 8418, 
+    8402, 8386, 8370, 8354, 8338, 8322, 8306, 8290, 8274, 8258, 
+    8242, 8226, 8210, 8194, 8178, 8162, 8146, 8130, 8114, 8098, 
+    8082, 8066, 8050, 8034, 8018, 8002, 7986, 7970, 7954, 7938, 
+    7922, 7906, 7890, 7874, 7858, 7842, 7826, 7810, 7794, 7778, 
+    7762, 7746, 7730, 7714, 7698, 7682, 7666, 7650, 7634, 7618, 
+    7602, 7586, 7570, 7554, 7538, 7522, 7506, 7490, 7474, 7458, 
+    7442, 7426, 7410, 7394, 7378, 7362, 7346, 7330, 7314, 7298, 
+    7282, 7266, 7250, 7234, 7218, 7202, 7186, 7170, 7154, 7138, 
+    7122, 7106, 7090, 7074, 7058, 7042, 7026, 7010, 6994, 6978, 
+    6962, 6946, 6930, 6914, 6898, 6882, 6866, 6850, 6834, 6818, 
+    6802, 6786, 6770, 6754, 6738, 6722, 6706, 6690, 6674, 6658, 
+    6642, 6626, 6610, 6594, 6578, 6562, 6546, 6530, 6514, 6498, 
+    6482, 6466, 6450, 6434, 6418, 6402, 6386, 6370, 6354, 6338, 
+    6322, 6306, 6290, 6274, 6258, 6242, 6226, 6210, 6194, 6178, 
+    6162, 6146, 6130, 6114, 6098, 6082, 6066, 6050, 6034, 6018, 
+    6002, 5986, 5970, 5954, 5938, 5922, 5906, 5890, 5874, 5858, 
+    5842, 5826, 5810, 5794, 5778, 5762, 5746, 5730, 5714, 5698, 
+    5682, 5666, 5650, 5634, 2835, 2819, 2803, 2787, 2771, 2755, 
+    2739, 2723, 2707, 2691, 2675, 2659, 2643, 2627, 2611, 2595, 
+    2579, 2563, 3544, 2531, 2515, 2499, 3483, 2220, 2204, 2188, 
+    2172, 2156, 2140, 2124, 2108, 2092, 5122, 2869, 5106, 5100, 
+    2836, 2111, 2095, 2079, 2063, 2047, 2031, 2946, 1884, 1980, 
+    1967, 1951, 1935, 1919, 1903, 1887, 1871, 1855, 1839, 1823, 
+    1807, 1791, 1775, 1759, 1743, 1727, 1711, 1695, 1679, 1663, 
+    1647, 1633, 1500, 1599, 1583, 1567, 1551, 1533, 1519, 1503, 
+    2412, 1356, 1340, 2473, 1638, 1292, 2072, 4348, 4344, 3614, 
+    4328, 2227, 1295, 1279, 1263, 1247, 1231, 1215, 1199, 2172, 
+    1941, 295, 340, 340, 378, 4104, 2137, 2221, 1171, 1157, 
+    1139, 1107, 451, 907, 3976, 819, 
+};
+
+static const jchar blocks1[] = {
+    0, 65535, 63, 4, 4, 253, 189, 125, 61, 65533, 
+    65469, 65405, 65405, 65266, 65325, 65149, 64639, 64623, 65133, 64893, 
+    64829, 64765, 64701, 64637, 64573, 64509, 64445, 64381, 64317, 64253, 
+    64189, 64125, 64301, 63997, 63933, 63869, 63805, 63741, 63677, 63613, 
+    63549, 63485, 63421, 63357, 63293, 63229, 63165, 63101, 63037, 62973, 
+    62909, 62845, 62781, 62717, 62653, 62589, 62525, 62461, 62397, 62333, 
+    62269, 62205, 62141, 62077, 62013, 61949, 61885, 61821, 61757, 61693, 
+    61629, 61565, 61501, 61437, 61373, 61309, 61245, 61181, 61117, 61053, 
+    60989, 60925, 60861, 60797, 60733, 60669, 60605, 60541, 60477, 60413, 
+    60349, 60285, 60221, 60157, 60093, 60029, 59965, 59901, 59837, 59773, 
+    59709, 59645, 59581, 59517, 59453, 59389, 59325, 59261, 59197, 59133, 
+    59069, 59005, 58941, 58877, 58813, 58749, 58685, 58621, 58557, 58493, 
+    58429, 58365, 58301, 58237, 58173, 58109, 58045, 57981, 57917, 57853, 
+    57789, 57725, 57661, 57597, 57533, 57469, 57405, 57341, 57277, 57213, 
+    57149, 57085, 57021, 56957, 56893, 56829, 56765, 56701, 56637, 56573, 
+    56509, 56445, 56381, 56317, 56253, 56189, 56125, 56061, 55997, 55933, 
+    55869, 55805, 55741, 55677, 55613, 55549, 55485, 55421, 55357, 55293, 
+    55229, 55165, 55101, 55037, 54973, 54909, 54845, 54781, 54717, 54653, 
+    54589, 54525, 54461, 54397, 54333, 54269, 54205, 54141, 54077, 54013, 
+    53949, 53885, 53821, 53757, 53693, 53629, 53565, 53501, 53437, 53373, 
+    53309, 53245, 53181, 53117, 53053, 52989, 52925, 52861, 52797, 52733, 
+    52669, 52605, 52541, 52477, 52413, 52349, 52285, 52221, 52157, 52093, 
+    52029, 51965, 51901, 51837, 51773, 51709, 51645, 51581, 51517, 51453, 
+    51389, 51325, 51261, 51197, 51133, 51069, 51005, 50941, 50877, 50813, 
+    50749, 50685, 50621, 50557, 50493, 50429, 50365, 50301, 50237, 50173, 
+    50109, 50045, 49981, 49917, 49853, 49789, 49725, 49661, 49597, 49533, 
+    49469, 49405, 49341, 49277, 49213, 49149, 49085, 49021, 48957, 48893, 
+    48829, 48765, 48701, 48637, 48573, 48509, 48445, 48381, 48317, 48253, 
+    48189, 48125, 48061, 47997, 47933, 47869, 47805, 47741, 47677, 47613, 
+    47549, 47485, 47421, 47357, 47293, 47229, 47165, 47101, 47037, 46973, 
+    46909, 46845, 46781, 46717, 46653, 46589, 46525, 46461, 46397, 46333, 
+    46269, 46205, 46141, 46077, 46013, 45949, 45885, 45821, 45757, 45693, 
+    45629, 45565, 45501, 45437, 45373, 45309, 45245, 45181, 45117, 45053, 
+    44989, 44925, 44861, 44797, 44733, 44669, 44605, 44541, 44477, 44413, 
+    44349, 44285, 44221, 44157, 44093, 44029, 43965, 43901, 43837, 43773, 
+    43709, 43645, 43581, 43517, 43453, 43389, 43325, 43261, 43197, 43133, 
+    43069, 43005, 42941, 42877, 42813, 42749, 42685, 42621, 42557, 42493, 
+    42429, 42365, 42301, 42237, 42173, 42109, 42045, 41981, 41917, 41853, 
+    41789, 41725, 41661, 41597, 41533, 41469, 41405, 41341, 41277, 41213, 
+    41149, 41085, 41021, 40957, 40893, 40829, 40765, 40701, 40637, 40573, 
+    40509, 40445, 40381, 40317, 40253, 40189, 40125, 40061, 39997, 39933, 
+    39869, 39805, 39741, 39677, 39613, 39549, 39485, 39421, 39357, 39293, 
+    39229, 39165, 39101, 39037, 38973, 38909, 38845, 38781, 38717, 38653, 
+    38589, 38525, 38461, 38397, 38333, 38269, 38205, 38141, 38077, 38013, 
+    37949, 37885, 37821, 37757, 37693, 37629, 37565, 37501, 37437, 37373, 
+    37309, 37245, 37181, 37117, 37053, 36989, 36925, 36861, 36797, 36733, 
+    36669, 36605, 36541, 36477, 36413, 36349, 36285, 36221, 36157, 36093, 
+    36029, 35965, 35901, 35837, 35773, 35709, 35645, 35581, 35517, 35453, 
+    35389, 35325, 35261, 35197, 35133, 35069, 35005, 34941, 34877, 34813, 
+    34749, 34685, 34621, 34557, 34493, 34429, 34365, 34301, 34237, 34173, 
+    34109, 34045, 33981, 33917, 33853, 33789, 33725, 33661, 33597, 33533, 
+    33469, 33405, 33341, 33277, 33213, 33149, 33085, 33021, 32957, 32893, 
+    32829, 32765, 32701, 32637, 32573, 32509, 32445, 32381, 32317, 32253, 
+    32189, 32125, 32061, 31997, 31933, 31869, 31805, 31741, 31677, 31613, 
+    31549, 31485, 31421, 31357, 31293, 31229, 31165, 31101, 31037, 30973, 
+    30909, 30845, 30781, 30717, 30653, 30589, 30525, 30461, 30397, 30333, 
+    30269, 30205, 30141, 30077, 30013, 29949, 29885, 29821, 29757, 29693, 
+    29629, 29565, 29501, 29437, 29373, 29309, 29245, 29181, 29117, 29053, 
+    28989, 28925, 28861, 28797, 28733, 28669, 28605, 28541, 28477, 28413, 
+    28349, 28285, 28221, 28157, 28093, 28029, 27965, 27901, 27837, 27773, 
+    27709, 27645, 27581, 27517, 27453, 27389, 27325, 27261, 27197, 27133, 
+    27069, 27005, 26941, 26877, 26813, 26749, 26685, 26621, 26557, 26493, 
+    26429, 26365, 26301, 26237, 26173, 26109, 26045, 25981, 25917, 25853, 
+    25789, 25725, 25661, 25597, 25533, 25469, 25405, 25341, 25277, 25213, 
+    25149, 25085, 25021, 24957, 24893, 24829, 24765, 24701, 24637, 24573, 
+    24509, 24445, 24381, 24317, 24253, 24189, 24125, 24061, 23997, 23933, 
+    23869, 23805, 23741, 23677, 23613, 23549, 23485, 23421, 23357, 23293, 
+    23229, 23165, 23101, 23037, 22973, 22909, 22845, 22781, 22717, 22653, 
+    22589, 22525, 22461, 22397, 22333, 22269, 22205, 22141, 22077, 22013, 
+    21949, 21885, 21821, 21757, 21693, 21629, 21565, 21501, 21437, 21373, 
+    21309, 21245, 21181, 21117, 21053, 20989, 20925, 20861, 20797, 20733, 
+    20669, 20605, 20541, 20477, 20413, 20349, 20285, 20221, 20157, 20093, 
+    20029, 19965, 19901, 19837, 19773, 19709, 19645, 19581, 19517, 19453, 
+    19389, 19325, 19261, 19197, 19133, 19069, 19005, 18941, 18877, 18813, 
+    18749, 18685, 18621, 18557, 18493, 18429, 18365, 18301, 18237, 18173, 
+    18109, 18045, 17981, 17917, 17853, 17789, 17725, 17661, 17597, 17533, 
+    17469, 17405, 17341, 17277, 17213, 17149, 17085, 17021, 16957, 16893, 
+    16829, 16765, 16701, 16637, 16573, 16509, 16445, 16381, 16317, 16253, 
+    16189, 16125, 16061, 15997, 15933, 15869, 15805, 15741, 15677, 15613, 
+    15549, 15485, 15421, 15357, 15293, 15229, 15165, 15101, 15037, 14973, 
+    14909, 14845, 14781, 14717, 14653, 14589, 14525, 14461, 14397, 14333, 
+    14269, 14205, 14141, 14077, 14013, 13949, 13885, 13821, 13757, 13693, 
+    13629, 13565, 13501, 13437, 13373, 13309, 13245, 13181, 13117, 13053, 
+    12989, 12925, 12752, 12688, 12624, 12570, 12454, 12283, 12280, 12338, 
+    12349, 12285, 12221, 12157, 12397, 12374, 11965, 11901, 12340, 12394, 
+    12451, 12132, 12384, 12197, 11976, 11924, 11820, 11768, 11768, 11542, 
+    11484, 11426, 11368, 11744, 10813, 10749, 10685, 10621, 10557, 10493, 
+    10429, 10365, 10301, 10237, 10173, 10109, 10045, 9981, 9917, 9853, 
+    9789, 9725, 9661, 9597, 9533, 9469, 9405, 9341, 9277, 9213, 
+    9149, 9085, 9021, 8957, 8893, 8829, 8765, 8701, 8637, 8573, 
+    8509, 8445, 8381, 8317, 8253, 8189, 8125, 8061, 7997, 7933, 
+    7869, 7805, 7741, 7677, 7613, 7549, 7485, 7421, 7357, 7293, 
+    7229, 7165, 7101, 7037, 6973, 6909, 6845, 6781, 6717, 6653, 
+    6589, 6525, 6461, 6397, 6333, 6269, 6205, 6141, 6077, 6013, 
+    5949, 5885, 5821, 5757, 5693, 5629, 5565, 5501, 5437, 5373, 
+    5309, 5245, 5181, 5117, 5053, 4989, 4925, 4861, 4797, 4733, 
+    4669, 4605, 4541, 4477, 4413, 4349, 4285, 4221, 4157, 4093, 
+    4029, 3965, 3901, 3837, 3773, 3709, 3645, 3581, 3517, 3453, 
+    3389, 3325, 3261, 3197, 3133, 3069, 3005, 2941, 2877, 2813, 
+    2749, 2685, 2621, 2557, 2493, 2429, 2365, 2301, 2237, 2173, 
+    2109, 2045, 1981, 1917, 1853, 1789, 1725, 1661, 1597, 1533, 
+    1469, 1405, 1341, 1277, 1213, 1149, 1085, 1021, 957, 893, 
+    829, 765, 701, 637, 
+};
+
+static const jchar blocks2[] = {
+    0, 65408, 65280, 65152, 65024, 64896, 64768, 64640, 64512, 64384, 
+    64256, 64128, 64000, 63872, 63744, 63616, 63488, 63360, 63232, 63104, 
+    62976, 62848, 62720, 62592, 62464, 62336, 62208, 62080, 61952, 61824, 
+    61696, 61568, 61440, 61312, 61184, 61056, 60928, 60800, 60672, 60544, 
+    60416, 60288, 60160, 60032, 59904, 59776, 59648, 59520, 59392, 59264, 
+    59136, 59008, 58880, 58752, 58624, 58496, 58368, 58240, 58112, 57984, 
+    57856, 57728, 57600, 57472, 57344, 57216, 57088, 56960, 56832, 56704, 
+    56576, 56448, 56320, 56192, 56064, 55936, 55808, 55680, 55552, 55424, 
+    55296, 55168, 55040, 54912, 54784, 54656, 54528, 54400, 54272, 54144, 
+    54016, 53888, 53760, 53632, 53504, 53376, 53248, 53120, 52992, 52864, 
+    52736, 52608, 52480, 52352, 52224, 52096, 51968, 51840, 51712, 51584, 
+    51456, 51328, 51200, 51072, 50944, 50816, 50688, 50560, 50432, 50304, 
+    50176, 50048, 49920, 49792, 49664, 49536, 49408, 49280, 49152, 49024, 
+    48896, 48768, 48640, 48512, 48384, 48256, 48128, 48000, 47872, 47744, 
+    47616, 47488, 47360, 47232, 47104, 46976, 46848, 46720, 46592, 46464, 
+    46336, 46208, 46080, 45952, 45824, 45696, 45568, 45440, 45312, 45184, 
+    45056, 44928, 44800, 44672, 44544, 44416, 44288, 44160, 44032, 43904, 
+    43776, 43648, 43520, 43392, 43264, 43136, 43008, 42880, 42752, 42624, 
+    42496, 42368, 42240, 42112, 41984, 41856, 41728, 41600, 41472, 41344, 
+    41216, 41088, 40960, 40832, 40704, 40576, 40448, 40320, 40192, 40064, 
+    39936, 39808, 39680, 39552, 39424, 39296, 39168, 39040, 38912, 38784, 
+    38656, 38528, 38400, 38272, 38144, 38016, 37888, 37760, 37632, 37504, 
+    37376, 37248, 37120, 36992, 36864, 36736, 36608, 36480, 36352, 36224, 
+    36096, 35968, 35840, 35712, 35584, 35456, 35328, 35200, 35072, 34944, 
+    34816, 34688, 34560, 34432, 34304, 34176, 34048, 33920, 33792, 33664, 
+    33536, 33408, 33280, 33152, 33024, 32896, 32768, 32640, 32512, 32384, 
+    32256, 32128, 32000, 31872, 31744, 31616, 31488, 31360, 31232, 31104, 
+    30976, 30848, 30720, 30592, 30464, 30336, 30208, 30080, 29952, 29824, 
+    29696, 29568, 29440, 29312, 29184, 29056, 28928, 28800, 28672, 28544, 
+    28416, 28288, 28160, 28032, 27904, 27776, 27648, 27520, 27392, 27264, 
+    27136, 27008, 26880, 26752, 26624, 26496, 26368, 26240, 26112, 25984, 
+    25856, 25728, 25600, 25472, 25344, 25216, 25088, 24960, 24832, 24704, 
+    24576, 24448, 24320, 24192, 24064, 23936, 23808, 23680, 23552, 23424, 
+    23296, 23168, 23040, 22953, 22912, 22784, 22656, 22528, 22400, 22272, 
+    22144, 22016, 21888, 21760, 21632, 21504, 21376, 21248, 21120, 20992, 
+    20864, 20736, 20608, 20480, 20352, 20224, 20096, 19968, 19840, 19712, 
+    19584, 19456, 19328, 19200, 19072, 18944, 18816, 18688, 18560, 18432, 
+    18304, 18176, 18048, 17920, 17792, 17664, 17536, 17408, 17280, 17152, 
+    17024, 16896, 16768, 16640, 16512, 16384, 16256, 16128, 16000, 15872, 
+    15744, 15616, 15488, 15360, 15232, 15104, 14976, 14848, 14720, 14592, 
+    14464, 14336, 14208, 14080, 13952, 13824, 13696, 13568, 13440, 13312, 
+    13184, 13056, 12928, 12800, 12672, 12544, 12416, 12288, 12160, 12032, 
+    11904, 11776, 11648, 11520, 11392, 11264, 11136, 11008, 10880, 10752, 
+    10624, 10496, 10368, 10240, 10112, 9984, 9856, 9728, 9600, 9472, 
+    9344, 9216, 9088, 8960, 8832, 8704, 8576, 8448, 8320, 8192, 
+    8064, 7936, 7808, 7680, 7552, 7424, 7296, 7168, 7040, 6912, 
+    6784, 6656, 6528, 6400, 6272, 6144, 6016, 5888, 5760, 5632, 
+    5504, 5376, 5248, 5120, 4992, 4864, 4736, 4608, 4480, 4352, 
+    4224, 4096, 3968, 3840, 3712, 3584, 3456, 3328, 3200, 3072, 
+    2944, 2816, 2688, 2560, 2432, 2304, 2048, 1920, 1792, 1664, 
+    1634, 1536, 1408, 1280, 1152, 1024, 896, 768, 640, 512, 
+    384, 256, 
+};
+
+static const jchar blocks14[] = {
+    255, 0, 65280, 65168, 65152, 65024, 64896, 64768, 64640, 64512, 
+    64384, 64256, 64128, 64000, 63872, 63744, 63616, 63488, 63360, 63232, 
+    63104, 62976, 62848, 62720, 62592, 62464, 62336, 62208, 62080, 61952, 
+    61824, 61696, 61568, 61440, 61312, 61184, 61056, 60928, 60800, 60672, 
+    60544, 60416, 60288, 60160, 60032, 59904, 59776, 59648, 59520, 59392, 
+    59264, 59136, 59008, 58880, 58752, 58624, 58496, 58368, 58240, 58112, 
+    57984, 57856, 57728, 57600, 57472, 57344, 57216, 57088, 56960, 56832, 
+    56704, 56576, 56448, 56320, 56192, 56064, 55936, 55808, 55680, 55552, 
+    55424, 55296, 55168, 55040, 54912, 54784, 54656, 54528, 54400, 54272, 
+    54144, 54016, 53888, 53760, 53632, 53504, 53376, 53248, 53120, 52992, 
+    52864, 52736, 52608, 52480, 52352, 52224, 52096, 51968, 51840, 51712, 
+    51584, 51456, 51328, 51200, 51072, 50944, 50816, 50688, 50560, 50432, 
+    50304, 50176, 50048, 49920, 49792, 49664, 49536, 49408, 49280, 49152, 
+    49024, 48896, 48768, 48640, 48512, 48384, 48256, 48128, 48000, 47872, 
+    47744, 47616, 47488, 47360, 47232, 47104, 46976, 46848, 46720, 46592, 
+    46464, 46336, 46208, 46080, 45952, 45824, 45696, 45568, 45440, 45312, 
+    45184, 45056, 44928, 44800, 44672, 44544, 44416, 44288, 44160, 44032, 
+    43904, 43776, 43648, 43520, 43392, 43264, 43136, 43008, 42880, 42752, 
+    42624, 42496, 42368, 42240, 42112, 41984, 41856, 41728, 41600, 41472, 
+    41344, 41216, 41088, 40960, 40832, 40704, 40576, 40448, 40320, 40192, 
+    40064, 39936, 39808, 39680, 39552, 39424, 39296, 39168, 39040, 38912, 
+    38784, 38656, 38528, 38400, 38272, 38144, 38016, 37888, 37760, 37632, 
+    37504, 37376, 37248, 37120, 36992, 36864, 36736, 36608, 36480, 36352, 
+    36224, 36096, 35968, 35840, 35712, 35584, 35456, 35328, 35200, 35072, 
+    34944, 34816, 34688, 34560, 34432, 34304, 34176, 34048, 33920, 33792, 
+    33664, 33536, 33408, 33280, 33152, 33024, 32896, 32768, 32640, 32512, 
+    32384, 32256, 32128, 32000, 31872, 31744, 31616, 31488, 31360, 31232, 
+    31104, 30976, 30848, 30720, 30592, 30464, 30336, 30208, 30080, 29952, 
+    29824, 29696, 29568, 29440, 29312, 29184, 29056, 28928, 28800, 28672, 
+    28544, 28416, 28288, 28160, 28032, 27904, 27776, 27648, 27520, 27392, 
+    27264, 27136, 27008, 26880, 26752, 26624, 26496, 26368, 26240, 26112, 
+    25984, 25856, 25728, 25600, 25472, 25344, 25216, 25088, 24960, 24832, 
+    24704, 24576, 24448, 24320, 24192, 24064, 23936, 23808, 23680, 23552, 
+    23424, 23296, 23168, 23040, 22912, 22784, 22656, 22528, 22400, 22272, 
+    22144, 22016, 21888, 21760, 21632, 21504, 21376, 21248, 21120, 20992, 
+    20864, 20736, 20608, 20480, 20352, 20224, 20096, 19968, 19840, 19712, 
+    19584, 19456, 19328, 19200, 19072, 18944, 18816, 18688, 18560, 18432, 
+    18304, 18176, 18048, 17920, 17792, 17664, 17536, 17408, 17280, 17152, 
+    17024, 16896, 16768, 16640, 16512, 16384, 16256, 16128, 16000, 15872, 
+    15744, 15616, 15488, 15360, 15232, 15104, 14976, 14848, 14720, 14592, 
+    14464, 14336, 14208, 14080, 13952, 13824, 13696, 13568, 13440, 13312, 
+    13184, 13056, 12928, 12800, 12672, 12544, 12416, 12288, 12160, 12032, 
+    11904, 11776, 11648, 11520, 11392, 11264, 11136, 11008, 10880, 10752, 
+    10624, 10496, 10368, 10240, 10112, 9984, 9856, 9728, 9600, 9472, 
+    9344, 9216, 9088, 8960, 8832, 8704, 8576, 8448, 8320, 8192, 
+    8064, 7936, 7808, 7680, 7552, 7424, 7296, 7168, 7040, 6912, 
+    6784, 6656, 6528, 6400, 6272, 6144, 6016, 5888, 5760, 5632, 
+    5504, 5376, 5248, 5120, 4992, 4864, 4736, 4608, 4480, 4352, 
+    4224, 4096, 3968, 3840, 3712, 3584, 3456, 3328, 3200, 3072, 
+    2944, 2816, 2688, 2560, 2432, 2304, 2176, 2048, 1920, 1792, 
+    1664, 1536, 1408, 1280, 1152, 1024, 896, 768, 640, 512, 
+    384, 256, 
+};
+
+static const int blocks_length[] = {
+    4096, 1024, 512, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 512, -1, -1, };
+static const jchar* blocks[] = {
+    blocks0, blocks1, blocks2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
+    NULL, NULL, NULL, NULL, blocks14, NULL, NULL};
+
+/**
+ * Information about each character.  The low order 5 bits form the
+ * character type, the next bit is a flag for non-breaking spaces, and the
+ * next bit is a flag for mirrored directionality.  The high order 9 bits
+ * form the offset into the attribute tables.  Note that this limits the
+ * number of unique character attributes per plane to 512, which is not a 
+ * problem as of Unicode version 4.0.0, but may soon become one.
+ */
+static const jchar data0[] = {
+    8834, 8962, 9090, 9218, 9346, 9474, 9602, 9730, 9858, 9986, 
+    10114, 1109, 3225, 1238, 3225, 15, 15, 15, 15, 15, 
+    15, 15, 15, 15, 143, 271, 143, 399, 271, 15, 
+    15, 15, 15, 15, 271, 15, 15, 15, 15, 15, 
+    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 
+    15, 271, 271, 271, 143, 1801, 1929, 2057, 2185, 2313, 
+    2441, 2569, 2697, 2825, 2953, 1432, 664, 3161, 3225, 3161, 
+    664, 664, 3225, 664, 6807, 16256, 16256, 664, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 524, 664, 664, 792, 922, 
+    792, 664, 664, 1109, 1238, 664, 1305, 1432, 1556, 1432, 
+    1688, 10908, 1305, 11019, 11147, 6683, 11266, 10396, 664, 6683, 
+    11403, 10498, 11614, 11659, 11659, 11659, 664, 3329, 3457, 3585, 
+    3713, 3841, 3969, 4097, 4225, 4353, 4481, 4609, 4737, 4865, 
+    4993, 5121, 5249, 5377, 5505, 5633, 5761, 5889, 6017, 6145, 
+    6273, 6401, 6529, 1109, 664, 1238, 6683, 6807, 664, 664, 
+    664, 3225, 1109, 1238, 664, 664, 664, 664, 664, 664, 
+    664, 664, 664, 34189, 34318, 34448, 34576, 34704, 34832, 34960, 
+    33452, 10284, 664, 922, 922, 922, 922, 10396, 10396, 6683, 
+    10396, 10498, 10717, 3225, 10768, 10396, 6683, 6914, 7042, 7170, 
+    7298, 7426, 7554, 7682, 7810, 7938, 8066, 8194, 8322, 8450, 
+    8578, 8706, 19074, 11777, 11777, 11777, 11777, 11777, 11777, 11777, 
+    11777, 11777, 11777, 11777, 11777, 11777, 11777, 11777, 11777, 3225, 
+    11777, 11777, 11777, 11777, 11777, 11777, 11777, 11906, 15361, 15491, 
+    15618, 12289, 12418, 15873, 16001, 12289, 12418, 12289, 12418, 12289, 
+    12418, 12289, 12418, 12801, 12289, 12418, 12289, 12418, 12289, 12418, 
+    12930, 19074, 12034, 12034, 12034, 12034, 12034, 12034, 12034, 12034, 
+    12034, 12034, 12034, 12034, 12034, 12034, 12034, 12034, 3225, 12034, 
+    12034, 12034, 12034, 12034, 12034, 12034, 12162, 16129, 10498, 12289, 
+    12418, 12289, 12418, 12289, 12418, 12289, 12418, 12289, 12418, 12289, 
+    12418, 12289, 12418, 12289, 12418, 15746, 12289, 12418, 21404, 18310, 
+    18310, 18310, 18310, 16256, 21511, 21511, 12289, 12418, 12289, 12418, 
+    12289, 12418, 16256, 16256, 12289, 12418, 16256, 16256, 16256, 16256, 
+    16256, 16256, 18310, 24584, 16256, 16256, 16256, 16256, 15109, 15109, 
+    16256, 15109, 16256, 16256, 15109, 15109, 16256, 15109, 16256, 16256, 
+    15109, 16256, 16256, 11906, 32258, 11906, 16256, 11906, 19074, 33153, 
+    33153, 33281, 33281, 32515, 6683, 6683, 16256, 18310, 18310, 24584, 
+    16256, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    16256, 15109, 16256, 15109, 15109, 15109, 15109, 16256, 16256, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 16256, 16256, 16256, 15109, 
+    15109, 15109, 15109, 15109, 15109, 16256, 16256, 15109, 15109, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    21784, 21784, 15109, 15109, 15109, 15109, 15361, 15491, 15618, 15361, 
+    15491, 15618, 15361, 15491, 15618, 12289, 12418, 12289, 12418, 10498, 
+    10498, 10498, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 15109, 15109, 15109, 15109, 16256, 15109, 16256, 15109, 15109, 
+    16256, 15109, 15109, 15109, 15109, 15109, 16256, 16256, 18310, 15109, 
+    24584, 24584, 18310, 18310, 18310, 16256, 16256, 16256, 24584, 24584, 
+    16256, 16256, 24584, 24584, 18310, 16256, 16256, 12545, 12674, 12289, 
+    12418, 12289, 12418, 12289, 12418, 10498, 12289, 12418, 12289, 12418, 
+    12289, 12418, 12289, 12418, 11906, 11906, 11906, 11906, 11906, 30850, 
+    16256, 16256, 16256, 16256, 6683, 6683, 16256, 16256, 16256, 16256, 
+    18052, 16256, 16256, 16256, 664, 16256, 21633, 21633, 21633, 21633, 
+    21633, 21633, 21633, 21633, 21633, 21633, 21633, 21633, 21633, 21633, 
+    21633, 21633, 16256, 16256, 18052, 21784, 21784, 21784, 21784, 21784, 
+    21784, 21404, 21404, 21404, 21404, 21404, 18310, 18310, 21404, 21404, 
+    21404, 21404, 21404, 21404, 18310, 21404, 21404, 21404, 21404, 21404, 
+    21404, 16256, 16256, 21404, 15109, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    19842, 19970, 20097, 20097, 20097, 20226, 20354, 10498, 12289, 12418, 
+    12289, 12418, 12289, 12418, 12289, 12418, 12289, 12418, 11906, 12289, 
+    12418, 12289, 12418, 12289, 12418, 14721, 12289, 12418, 14721, 10498, 
+    10498, 12289, 12418, 14721, 12289, 17666, 10498, 10498, 17666, 10498, 
+    10498, 10498, 10498, 17666, 10498, 17794, 17794, 10498, 10498, 10498, 
+    10498, 17410, 10498, 10498, 17538, 10498, 10498, 10498, 10498, 10498, 
+    10498, 10498, 10498, 10498, 10498, 16386, 16514, 10498, 16642, 16642, 
+    10498, 16770, 10498, 16898, 10498, 10498, 10498, 10498, 13057, 12289, 
+    12418, 12289, 12418, 13185, 12289, 12418, 13313, 13313, 12289, 12418, 
+    10498, 13441, 13569, 13697, 12289, 12418, 13313, 13825, 13954, 14081, 
+    14209, 12289, 12418, 10498, 10498, 14081, 14337, 14466, 14593, 12418, 
+    14849, 14849, 12289, 12418, 12289, 12418, 14977, 12289, 12418, 10498, 
+    15109, 12289, 12418, 10498, 15234, 18310, 18310, 18310, 18310, 18310, 
+    18438, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 
+    18310, 16256, 18310, 18310, 18310, 22168, 18310, 18310, 22168, 18310, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 24584, 16256, 16256, 16256, 16256, 15109, 15109, 16256, 15109, 
+    15109, 15109, 15109, 16256, 16256, 16256, 15109, 15109, 16256, 15109, 
+    16256, 15109, 15109, 16256, 15109, 15109, 16256, 15109, 15109, 16256, 
+    16256, 18310, 16256, 24584, 24584, 24584, 16256, 15109, 15109, 15109, 
+    15109, 15109, 15109, 15109, 15109, 16256, 15109, 15109, 15109, 16256, 
+    16256, 16256, 16256, 24584, 24584, 21784, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 24464, 24464, 24464, 10396, 10396, 16256, 16256, 16256, 
+    664, 664, 24713, 24841, 24969, 25097, 25225, 25353, 25481, 25609, 
+    25737, 25865, 16256, 16256, 16256, 16256, 16256, 16256, 18310, 15109, 
+    16256, 15109, 15109, 15109, 15109, 15109, 15109, 16256, 16256, 16256, 
+    15109, 15109, 16256, 16256, 16256, 15109, 15109, 15109, 16256, 16256, 
+    16256, 15109, 15109, 15109, 15109, 15109, 15109, 16256, 16256, 15109, 
+    15109, 15109, 16256, 16256, 16256, 21890, 21890, 21890, 21890, 21890, 
+    21890, 21890, 21890, 21890, 21890, 21890, 21890, 21890, 21890, 21890, 
+    21890, 11906, 16256, 21784, 22036, 16256, 16256, 16256, 16256, 16256, 
+    18310, 18310, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 22661, 22661, 22661, 22661, 22661, 22661, 22661, 22661, 22661, 
+    22661, 22661, 22661, 22661, 22661, 22661, 22661, 27541, 27670, 16642, 
+    10498, 10498, 17026, 10498, 10498, 10498, 10498, 17154, 17282, 10498, 
+    10498, 10498, 10498, 10498, 17282, 22416, 22416, 22416, 22416, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 1432, 22552, 10396, 
+    10396, 20097, 10396, 10396, 10396, 10396, 20097, 10396, 10396, 10498, 
+    20097, 20097, 20097, 10498, 10498, 17922, 10498, 10498, 10498, 10498, 
+    10498, 10498, 10498, 10498, 10498, 10498, 10498, 10498, 10498, 10498, 
+    10498, 10498, 18052, 18052, 18052, 18052, 18052, 18052, 18052, 18052, 
+    18052, 18052, 18052, 18052, 18052, 18052, 18052, 18052, 18180, 18180, 
+    18052, 18052, 18052, 18052, 18052, 6683, 6683, 6683, 6683, 6683, 
+    6683, 6683, 6683, 6683, 18052, 6683, 22036, 15109, 15109, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 16256, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 18052, 
+    18052, 6683, 6683, 6683, 6683, 18180, 18180, 18180, 18180, 18180, 
+    18180, 18180, 18180, 18180, 18180, 18052, 18052, 6683, 6683, 6683, 
+    6683, 6683, 6683, 6683, 6683, 6683, 6683, 6683, 6683, 6683, 
+    6683, 6683, 6683, 11906, 32258, 11906, 16256, 11906, 19074, 32769, 
+    32769, 32769, 32769, 32515, 6683, 6683, 6683, 10396, 44170, 44298, 
+    44426, 44554, 44682, 44810, 44938, 45066, 45194, 18310, 18310, 18310, 
+    18310, 18310, 18310, 18310, 18310, 16256, 18310, 18310, 18310, 18310, 
+    18310, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 
+    18310, 18310, 16256, 21404, 21404, 25995, 26123, 26251, 26379, 21404, 
+    21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 
+    10396, 3225, 10396, 10396, 10396, 10396, 10396, 10396, 10396, 10396, 
+    10396, 10396, 10396, 10396, 16256, 10396, 16256, 10396, 10396, 10396, 
+    10396, 16256, 10396, 10396, 10396, 10396, 16256, 16256, 10396, 10396, 
+    10396, 10396, 10396, 21404, 10396, 10396, 10396, 10396, 10396, 3225, 
+    3225, 3225, 3225, 3225, 27541, 27670, 664, 10396, 10396, 10396, 
+    10396, 10396, 10396, 10396, 10396, 10396, 10396, 16256, 10396, 10396, 
+    10396, 10396, 10396, 10396, 10396, 1109, 1238, 1109, 1238, 1109, 
+    1238, 1109, 1238, 29579, 29707, 29835, 29963, 30091, 30219, 30347, 
+    30475, 30603, 43915, 29579, 29707, 29835, 29963, 30091, 30219, 18310, 
+    18310, 18310, 18310, 18310, 18310, 18310, 18310, 16256, 16256, 16256, 
+    16256, 16256, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 
+    18310, 18310, 18310, 18310, 18310, 18310, 24584, 24584, 16256, 16256, 
+    16256, 24584, 24584, 24584, 16256, 24584, 24584, 24584, 18310, 16256, 
+    16256, 18310, 24584, 24584, 16256, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 15109, 16256, 16256, 15109, 15109, 15109, 16256, 15109, 
+    16256, 15109, 16256, 16256, 15109, 15109, 16256, 15109, 15109, 15109, 
+    15109, 15109, 16256, 15109, 15109, 16256, 24584, 18310, 18310, 18310, 
+    18310, 16256, 16256, 24584, 24584, 16256, 16256, 24584, 24584, 18310, 
+    16256, 16256, 20482, 20610, 20738, 10498, 20865, 20994, 3225, 12289, 
+    12418, 21121, 12289, 12418, 16256, 16256, 16256, 16256, 6683, 6683, 
+    18561, 664, 18689, 18689, 18689, 16256, 18817, 16256, 18945, 18945, 
+    11777, 11777, 16256, 11777, 11777, 11777, 11777, 11777, 11777, 11777, 
+    11777, 11777, 19202, 19330, 19330, 19330, 12034, 12034, 19458, 12034, 
+    12034, 12034, 12034, 12034, 12034, 12034, 12034, 12034, 19586, 19714, 
+    19714, 16256, 18310, 18310, 24584, 16256, 15109, 15109, 15109, 15109, 
+    15109, 15109, 16256, 16256, 16256, 16256, 15109, 15109, 15109, 15109, 
+    16256, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    16256, 15109, 16256, 16256, 16256, 15109, 15109, 15109, 15109, 16256, 
+    16256, 18310, 15109, 24584, 24584, 18310, 24584, 24584, 24584, 24584, 
+    24584, 24584, 18310, 18310, 18310, 16256, 16256, 16256, 16256, 21249, 
+    21249, 21249, 21249, 21249, 21249, 21249, 21249, 21249, 21249, 21249, 
+    21249, 21249, 21249, 21249, 21249, 20610, 20610, 20610, 20610, 20610, 
+    20610, 20610, 20610, 20610, 20610, 20610, 20610, 20610, 20610, 20610, 
+    20610, 20097, 12289, 12418, 12289, 12418, 12289, 12418, 12289, 12418, 
+    12289, 12418, 12289, 12418, 12289, 12418, 16256, 16256, 16256, 16256, 
+    16256, 16256, 24713, 24841, 24969, 25097, 25225, 25353, 25481, 25609, 
+    25737, 25865, 27403, 27403, 27403, 27403, 27403, 27403, 21404, 18310, 
+    21404, 18310, 21404, 18310, 27541, 27670, 27541, 27670, 24584, 24584, 
+    18310, 18310, 18310, 16256, 18310, 16256, 24584, 24584, 24584, 24584, 
+    24584, 24584, 24584, 24584, 18310, 24584, 24584, 18310, 18310, 18310, 
+    18310, 18310, 18310, 18310, 18310, 24584, 24584, 24584, 24584, 18310, 
+    16256, 16256, 21784, 21784, 21784, 21784, 21784, 21784, 21784, 21784, 
+    24841, 24969, 25097, 25225, 25353, 25481, 25609, 18310, 18310, 18310, 
+    18310, 18310, 18310, 18310, 18310, 18310, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 11906, 11906, 
+    11906, 11906, 11906, 16256, 16256, 16256, 16256, 16256, 22277, 18310, 
+    22277, 22277, 16256, 22277, 22277, 16256, 22277, 22277, 22277, 22277, 
+    22277, 22277, 22277, 22277, 22277, 22277, 22277, 22277, 22277, 22277, 
+    22277, 22277, 16256, 16256, 16256, 16256, 16256, 24584, 24584, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 15109, 16256, 15109, 15109, 
+    16256, 15109, 15109, 15109, 15109, 15109, 16256, 16256, 18310, 15109, 
+    24584, 18310, 18310, 18310, 18310, 18310, 16256, 18310, 18310, 24584, 
+    16256, 24584, 24584, 18310, 16256, 16256, 664, 664, 792, 922, 
+    792, 664, 664, 1109, 1238, 664, 1305, 1432, 1556, 1432, 
+    1688, 22277, 22277, 22277, 22168, 22168, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 24584, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 11659, 11659, 11659, 11659, 
+    11659, 11659, 11659, 11659, 11659, 11659, 11659, 11659, 29579, 22921, 
+    23049, 23177, 23305, 23433, 23561, 23689, 23817, 23945, 24073, 792, 
+    24216, 24216, 22552, 22661, 22661, 22661, 22661, 22552, 22661, 18310, 
+    18310, 18310, 18310, 18310, 18310, 18310, 22416, 21511, 18310, 21511, 
+    21511, 21511, 18310, 18310, 18310, 18310, 18310, 18310, 16256, 16256, 
+    16256, 16256, 16256, 22552, 16256, 16256, 16256, 22552, 22552, 22552, 
+    22552, 22552, 22552, 22552, 22552, 22552, 22552, 22552, 22552, 22552, 
+    22552, 16256, 24464, 22788, 22661, 22661, 22661, 22661, 22661, 22661, 
+    22661, 22661, 22661, 22661, 18310, 18310, 18310, 18310, 18310, 18310, 
+    18310, 18310, 18310, 18310, 18310, 16256, 16256, 22661, 22661, 22661, 
+    22661, 22661, 16256, 22661, 22661, 22661, 22661, 22661, 22661, 22661, 
+    22661, 22661, 22661, 22661, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 24841, 24969, 
+    25097, 25225, 25353, 25481, 25609, 25737, 25865, 26763, 27787, 27915, 
+    28043, 28171, 28299, 28427, 28555, 28683, 26891, 28811, 16256, 16256, 
+    16256, 1801, 1929, 2057, 2185, 2313, 2441, 2569, 2697, 2825, 
+    2953, 22661, 22661, 22661, 24348, 24348, 22661, 18310, 22661, 22661, 
+    22661, 22661, 22661, 22661, 22661, 22661, 22661, 22661, 22661, 22661, 
+    22661, 22661, 22661, 16256, 16256, 24464, 24464, 24464, 24464, 16256, 
+    16256, 16256, 16256, 16256, 16256, 24464, 24464, 24464, 24464, 24464, 
+    24464, 18310, 18310, 18310, 18310, 18310, 22788, 22788, 18310, 18310, 
+    10396, 18310, 18310, 18310, 18310, 22661, 22661, 22661, 22661, 22661, 
+    22661, 22661, 22661, 22661, 22661, 22661, 22661, 50458, 10396, 16256, 
+    16256, 18310, 22661, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 1238, 664, 1109, 
+    1238, 664, 6807, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 15109, 16256, 16256, 16256, 16256, 24584, 24584, 16256, 
+    15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 16256, 15109, 
+    15109, 15109, 15109, 15109, 16256, 16256, 16256, 16256, 18310, 18310, 
+    24584, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 15109, 27541, 27670, 16256, 16256, 16256, 524, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 15109, 15109, 16256, 16256, 16256, 16256, 16256, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    6807, 18052, 18052, 18052, 15109, 15109, 15109, 18052, 15109, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 15109, 16256, 16256, 18310, 15109, 24584, 24584, 24584, 
+    24584, 24584, 16256, 27142, 24584, 24584, 16256, 24584, 24584, 18310, 
+    18310, 16256, 16256, 16256, 16256, 18310, 18310, 16256, 16256, 18310, 
+    18310, 18310, 16256, 16256, 15109, 15109, 15109, 15109, 15109, 15109, 
+    15109, 16256, 16256, 18310, 18310, 6683, 6683, 18052, 18052, 15109, 
+    18310, 18310, 18310, 18310, 16256, 16256, 16256, 15109, 15109, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 16256, 16256, 21784, 16256, 
+    16256, 16256, 16256, 15109, 15109, 18310, 18310, 21784, 21784, 24713, 
+    24841, 24969, 25097, 25225, 25353, 25481, 25609, 25737, 25865, 21784, 
+    21784, 16256, 16256, 16256, 16256, 15109, 15109, 18310, 18310, 16256, 
+    16256, 24713, 24841, 24969, 25097, 25225, 25353, 25481, 25609, 25737, 
+    25865, 16256, 16256, 15109, 15109, 16256, 16256, 15109, 15109, 922, 
+    922, 25995, 26123, 26251, 26379, 26507, 26635, 21404, 16256, 16256, 
+    16256, 16256, 16256, 18310, 18310, 15109, 15109, 15109, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 15109, 
+    18310, 15109, 15109, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 
+    16256, 16256, 16256, 16256, 922, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 15109, 
+    15109, 15109, 15109, 15109, 15109, 18052, 18310, 18310, 18310, 18310, 
+    18310, 18310, 18310, 18310, 21784, 18310, 18310, 15109, 15109, 15109, 
+    15109, 16256, 16256, 16256, 16256, 24713, 24841, 24969, 25097, 25225, 
+    25353, 25481, 25609, 25737, 25865, 21784, 21784, 21784, 21784, 21784, 
+    21784, 26763, 26891, 27019, 10396, 10396, 10396, 10396, 10396, 10396, 
+    922, 10396, 16256, 16256, 16256, 16256, 16256, 18310, 24584, 24584, 
+    24584, 24584, 16256, 18310, 18310, 18310, 16256, 18310, 18310, 18310, 
+    18310, 16256, 16256, 15109, 15109, 15109, 15109, 16256, 15109, 15109, 
+    15109, 15109, 15109, 16256, 16256, 18310, 15109, 24584, 27142, 24584, 
+    18310, 18310, 18310, 16256, 16256, 24584, 24584, 24584, 16256, 24584, 
+    24584, 24584, 18310, 16256, 16256, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 16256, 16256, 16256, 18310, 16256, 16256, 16256, 16256, 
+    24584, 24584, 16256, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    15109, 15109, 15109, 15109, 21784, 21784, 21784, 28938, 29066, 15109, 
+    18310, 15109, 15109, 18310, 18310, 18310, 18310, 18310, 18310, 16256, 
+    18310, 18310, 15109, 16256, 16256, 15109, 15109, 15109, 15109, 15109, 
+    16256, 18052, 16256, 18310, 18310, 18310, 18310, 18310, 18310, 16256, 
+    16256, 15109, 21404, 21404, 21404, 21784, 21784, 21784, 21784, 21784, 
+    21784, 21784, 21784, 27320, 21784, 21784, 21784, 18310, 24584, 18310, 
+    16256, 16256, 16256, 18310, 18310, 24584, 18310, 16256, 16256, 16256, 
+    16256, 16256, 16256, 15109, 15109, 15109, 15109, 15109, 15109, 24584, 
+    24584, 18310, 18310, 16256, 16256, 16256, 16256, 16256, 16256, 20097, 
+    20097, 10396, 20097, 10498, 15109, 15109, 15109, 15109, 10498, 10396, 
+    10396, 16256, 10498, 20097, 20097, 20097, 20097, 20097, 20097, 20097, 
+    20097, 20097, 20097, 20097, 20097, 20097, 20097, 20097, 20097, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 15109, 
+    15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 29194, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 15109, 15109, 18310, 
+    18310, 18310, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 15109, 15109, 18310, 18310, 18310, 21784, 21784, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 15109, 
+    15109, 18310, 18310, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 15109, 16256, 18310, 18310, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 15109, 15109, 15109, 15109, 29328, 29328, 24584, 18310, 18310, 
+    18310, 18310, 18310, 18310, 18310, 24584, 24584, 24584, 24584, 18310, 
+    18310, 30728, 30728, 30728, 16256, 16256, 16256, 16256, 18310, 18310, 
+    18310, 18310, 21784, 21784, 21784, 18052, 21784, 21784, 21784, 922, 
+    15109, 18310, 16256, 16256, 43275, 43403, 43531, 43659, 43787, 29579, 
+    29707, 29835, 29963, 30091, 30219, 30347, 30475, 30603, 43915, 29451, 
+    29579, 29707, 29835, 29963, 30091, 30219, 30347, 30475, 30603, 16256, 
+    16256, 16256, 16256, 16256, 16256, 664, 664, 664, 664, 664, 
+    664, 22036, 664, 664, 664, 664, 18310, 18310, 18310, 524, 
+    16256, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 15109, 
+    18310, 16256, 16256, 16256, 16256, 16256, 16256, 20097, 20097, 20097, 
+    10498, 10396, 20097, 10396, 10396, 10396, 20097, 20097, 20097, 20097, 
+    20097, 10396, 10396, 3225, 10396, 3225, 10396, 10396, 10396, 10396, 
+    10396, 10396, 10396, 10396, 10396, 10396, 10396, 10396, 10396, 10396, 
+    10396, 10396, 3225, 3225, 3225, 3225, 3225, 3225, 3225, 3225, 
+    3225, 3225, 3225, 3225, 3225, 3225, 3225, 3225, 3161, 3161, 
+    3161, 3161, 3161, 3161, 3225, 3225, 1109, 1238, 3225, 3225, 
+    3225, 1109, 1238, 1109, 1238, 1109, 1238, 1109, 1238, 1109, 
+    1238, 1109, 1238, 1109, 1238, 3225, 3225, 3161, 3161, 3161, 
+    3161, 3161, 3225, 3225, 3225, 3225, 3225, 3161, 3225, 3161, 
+    3161, 3161, 3161, 3161, 3161, 3161, 3225, 3225, 3225, 3225, 
+    3225, 3161, 3225, 3161, 3225, 3161, 3161, 3161, 3161, 3161, 
+    3161, 3161, 3161, 3225, 3225, 3161, 3161, 3161, 3161, 3161, 
+    3161, 3161, 3161, 3225, 3161, 3225, 3161, 3161, 3161, 3225, 
+    3225, 3161, 3161, 3225, 3225, 3225, 3225, 3225, 3225, 3161, 
+    3225, 3225, 3225, 3161, 3161, 3161, 3161, 3161, 3225, 3161, 
+    3225, 3225, 3161, 3161, 3225, 3225, 3225, 3225, 3161, 3161, 
+    3161, 3161, 3161, 3161, 3161, 3161, 3161, 3161, 3161, 3161, 
+    3161, 3225, 3225, 3161, 3225, 3161, 3225, 3225, 3161, 3225, 
+    3161, 3161, 3161, 3161, 3225, 3225, 3225, 3161, 3161, 3161, 
+    3161, 3161, 3161, 3225, 3225, 3225, 3161, 3225, 3225, 3225, 
+    3225, 3161, 3161, 3225, 3225, 3225, 3225, 3225, 3225, 3161, 
+    3161, 3161, 3225, 3225, 3225, 3225, 3225, 3161, 3225, 3225, 
+    3225, 3225, 3225, 3225, 3225, 3225, 3161, 3225, 3225, 3225, 
+    3225, 3225, 3225, 3225, 3161, 3161, 3225, 3225, 3225, 3225, 
+    3225, 3225, 3225, 10396, 10396, 10396, 10396, 10396, 3225, 3225, 
+    10396, 10396, 10396, 10396, 20097, 10396, 35969, 10396, 20097, 10396, 
+    36097, 36225, 20097, 20097, 10908, 10498, 18052, 18052, 10498, 10498, 
+    10498, 10498, 10498, 10498, 10498, 10498, 10498, 10498, 16256, 16256, 
+    16256, 16256, 30978, 30978, 30978, 30978, 30978, 30978, 30978, 30978, 
+    31105, 31105, 31105, 31105, 31105, 31105, 31105, 31105, 30978, 30978, 
+    30978, 30978, 30978, 30978, 16256, 16256, 31105, 31105, 31105, 31105, 
+    31105, 31105, 16256, 16256, 11906, 30978, 19074, 30978, 19074, 30978, 
+    19074, 30978, 16256, 31105, 16256, 31105, 16256, 31105, 16256, 31105, 
+    31234, 31234, 31362, 31362, 31362, 31362, 31490, 31490, 31618, 31618, 
+    31746, 31746, 31874, 31874, 16256, 16256, 32002, 32002, 32002, 32002, 
+    32002, 32002, 32002, 32002, 32131, 32131, 32131, 32131, 32131, 32131, 
+    32131, 32131, 30978, 30978, 11906, 32258, 11906, 16256, 11906, 19074, 
+    31105, 31105, 32385, 32385, 32515, 6683, 32642, 6683, 30978, 30978, 
+    19074, 19074, 16256, 16256, 11906, 19074, 31105, 31105, 32897, 32897, 
+    16256, 6683, 6683, 6683, 30978, 30978, 19074, 19074, 11906, 20738, 
+    11906, 19074, 31105, 31105, 33025, 33025, 21121, 6683, 6683, 6683, 
+    524, 524, 524, 524, 524, 524, 524, 33452, 524, 524, 
+    524, 33548, 24464, 24464, 29328, 33680, 22036, 33844, 22036, 22036, 
+    22036, 22036, 664, 664, 33949, 34078, 27541, 33949, 33949, 34078, 
+    27541, 33949, 1432, 664, 1432, 16256, 664, 1432, 664, 664, 
+    22036, 27541, 27670, 27541, 27670, 27541, 27670, 792, 792, 792, 
+    792, 792, 664, 664, 664, 664, 10717, 11614, 664, 664, 
+    664, 664, 6807, 35083, 10498, 16256, 16256, 35211, 35339, 35467, 
+    35595, 35723, 35851, 1305, 1305, 3225, 1109, 1238, 10498, 35083, 
+    11403, 11019, 11147, 35211, 35339, 35467, 35595, 35723, 35851, 1305, 
+    1305, 3225, 1109, 1238, 16256, 922, 922, 922, 922, 922, 
+    922, 922, 922, 922, 922, 922, 922, 922, 922, 922, 
+    922, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 18310, 18310, 18310, 18310, 18310, 
+    18310, 18310, 18310, 18310, 18310, 18310, 18310, 18310, 21511, 21511, 
+    21511, 3225, 3225, 3225, 3161, 3161, 3161, 3161, 3225, 3225, 
+    3225, 3225, 3225, 3161, 3161, 3161, 3225, 3225, 3161, 3161, 
+    3161, 3161, 3225, 3225, 3225, 3225, 3225, 3225, 3225, 3225, 
+    3225, 3161, 3161, 3161, 3161, 3161, 3225, 3225, 3225, 3225, 
+    3225, 3161, 3161, 3161, 3225, 3225, 3161, 3161, 3225, 3225, 
+    3161, 3161, 3161, 3161, 3161, 3161, 3161, 3161, 3161, 3161, 
+    3161, 3161, 3161, 3161, 3161, 3161, 3225, 3225, 3225, 3225, 
+    3225, 3161, 3161, 3225, 3225, 3225, 3225, 3161, 3161, 3161, 
+    3161, 3225, 3161, 1305, 1305, 3225, 3161, 3161, 3225, 3225, 
+    3225, 3161, 3161, 3161, 3161, 3225, 3161, 3225, 3161, 3225, 
+    3225, 3225, 3225, 3161, 3161, 3161, 3161, 3161, 3161, 3161, 
+    3161, 3161, 3161, 3161, 3161, 3161, 3225, 3161, 3161, 3225, 
+    3225, 1109, 1238, 1109, 1238, 3161, 3225, 3225, 3225, 3225, 
+    20097, 10498, 10498, 10498, 10498, 10396, 3225, 16256, 16256, 16256, 
+    16256, 36362, 36490, 36618, 36746, 36874, 37002, 37130, 37258, 37386, 
+    37514, 37642, 37770, 37898, 38026, 38154, 38282, 38410, 38538, 38666, 
+    38794, 38922, 39050, 39178, 39306, 39434, 39562, 39690, 39818, 39946, 
+    40074, 40202, 40330, 40458, 40586, 40714, 40842, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 3225, 
+    10396, 10396, 3225, 10396, 10396, 3225, 10396, 10396, 10396, 10396, 
+    10396, 10396, 10396, 3225, 10396, 10396, 10396, 10396, 10396, 10396, 
+    10396, 10396, 3161, 3161, 3161, 3161, 10396, 10396, 10396, 10396, 
+    10396, 10396, 10396, 1109, 1238, 10396, 10396, 10396, 10396, 10396, 
+    10396, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 
+    21404, 21404, 21404, 21404, 21404, 21404, 21404, 10396, 10396, 16256, 
+    21404, 48267, 48395, 48523, 48651, 48779, 48907, 49035, 49163, 49291, 
+    49419, 49547, 49675, 49803, 49931, 50059, 30347, 30475, 30603, 43915, 
+    10396, 16256, 16256, 16256, 10396, 10396, 10396, 10396, 10396, 10396, 
+    10396, 10396, 10396, 10396, 10396, 10396, 10396, 10396, 16256, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 41355, 41483, 41611, 41739, 41867, 41995, 42123, 
+    42251, 11403, 11019, 11147, 35211, 35339, 35467, 35595, 35723, 35851, 
+    40971, 41099, 41227, 41355, 41483, 41611, 41739, 41867, 41995, 42123, 
+    42251, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 
+    21404, 21404, 21404, 10396, 10396, 10396, 10396, 21404, 21404, 21404, 
+    21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 21404, 
+    21404, 21404, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 
+    16256, 16256, 16256, 16256, 25995, 26123, 26251, 26379, 45707, 45835, 
+    45963, 46091, 46219, 26763, 21404, 21404, 21404, 21404, 21404, 21404, 
+    42396, 42396, 42396, 42396, 42396, 42396, 42396, 42396, 42396, 42396, 
+    42396, 42396, 42396, 42396, 42396, 42396, 42524, 42524, 42524, 42524, 
+    42524, 42524, 42524, 42524, 42524, 42524, 42524, 42524, 42524, 42524, 
+    42524, 42524, 35083, 42635, 42763, 42891, 43019, 43147, 22036, 18052, 
+    18052, 18052, 18052, 18052, 10396, 10396, 45322, 45450, 45578, 18052, 
+    15109, 664, 10396, 10396, 10396, 16256, 16256, 16256, 10396, 16256, 
+    10396, 10396, 10396, 10396, 10396, 10396, 10396, 16256, 3225, 3225, 
+    3161, 3161, 3161, 3161, 1109, 1238, 1109, 1238, 1109, 1238, 
+    16256, 16256, 16256, 16256, 524, 664, 664, 664, 10396, 18052, 
+    15109, 44042, 1109, 1238, 1109, 1238, 1109, 1238, 1109, 1238, 
+    10396, 10396, 1109, 1238, 1109, 1238, 1109, 1238, 1109, 1238, 
+    22036, 27541, 27670, 27670, 10396, 46347, 46475, 46603, 46731, 46859, 
+    46987, 47115, 47243, 47371, 47499, 47627, 47755, 47883, 48011, 48139, 
+    50195, 50195, 50195, 50195, 50195, 50195, 50195, 50195, 50195, 50195, 
+    50195, 50195, 50195, 50195, 50195, 50195, 50322, 50322, 50322, 50322, 
+    50322, 50322, 50322, 50322, 50322, 50322, 50322, 50322, 50322, 50322, 
+    50322, 50322, 11906, 11906, 11906, 19074, 19074, 11906, 11906, 16256, 
+    16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 22277, 22277, 
+    22277, 22277, 22277, 22277, 22277, 22277, 22277, 1305, 22277, 22277, 
+    22277, 22277, 22277, 22277, 22277, 16256, 22277, 22277, 22277, 22277, 
+    22277, 16256, 22277, 16256, 664, 22036, 22036, 6807, 6807, 27541, 
+    27670, 27541, 27670, 27541, 27670, 27541, 27670, 27541, 27670, 27541, 
+    27670, 664, 664, 27541, 27670, 664, 664, 664, 664, 6807, 
+    6807, 6807, 664, 664, 1305, 1556, 3225, 3225, 3225, 16256, 
+    664, 922, 792, 664, 16256, 16256, 16256, 16256, 8834, 8962, 
+    9090, 9218, 9346, 9474, 9602, 9730, 9858, 9986, 10114, 1109, 
+    3225, 1238, 3225, 1109, 922, 922, 3225, 6683, 10396, 922, 
+    922, 16256, 10396, 3225, 3225, 3225, 3225, 10396, 10396, 16256, 
+};
+
+static const jchar data1[] = {
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 128, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 128, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 128, 
+    5, 5, 128, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 128, 128, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 6529, 6529, 6529, 
+    6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 
+    6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 
+    6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 6529, 
+    6529, 6529, 6529, 6529, 6529, 6529, 6529, 6658, 6658, 6658, 
+    6658, 6658, 6658, 6658, 6658, 6658, 6658, 6658, 6658, 6658, 
+    6658, 6658, 6658, 6658, 6658, 6658, 6658, 6658, 6658, 6658, 
+    6658, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 128, 128, 128, 128, 128, 
+    280, 408, 540, 128, 128, 128, 128, 651, 779, 907, 
+    1035, 1163, 1291, 1419, 1547, 1675, 1803, 1931, 2059, 2187, 
+    2315, 2443, 2571, 2699, 2827, 2955, 3083, 3211, 3339, 3467, 
+    3595, 3723, 3851, 3979, 4107, 4235, 4363, 4491, 4619, 4747, 
+    4875, 5003, 5131, 5259, 5387, 5515, 5643, 5771, 5899, 6027, 
+    6155, 6283, 128, 128, 128, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 8200, 8200, 8326, 8326, 8326, 540, 540, 540, 
+    8200, 8200, 8200, 8200, 8200, 8200, 8464, 8464, 8464, 8464, 
+    8464, 8464, 8464, 8464, 8326, 8326, 8326, 8326, 8326, 540, 
+    540, 8326, 8326, 8326, 8326, 8326, 8326, 8326, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 8326, 8326, 
+    8326, 8326, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 128, 128, 128, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 
+    540, 540, 540, 540, 540, 540, 540, 540, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 6410, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 128, 651, 
+    1163, 1803, 2315, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 128, 280, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 128, 
+    128, 6793, 6921, 7049, 7177, 7305, 7433, 7561, 7689, 7817, 
+    7945, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 8069, 8069, 8069, 8069, 8069, 8069, 128, 
+    128, 8069, 128, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 
+    8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 
+    8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 
+    8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 8069, 
+    8069, 8069, 8069, 8069, 8069, 8069, 8069, 128, 8069, 8069, 
+    128, 128, 128, 8069, 128, 128, 8069, 8604, 8604, 8604, 
+    8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 
+    8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 
+    8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 
+    8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 
+    8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 
+    8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 8604, 
+    8604, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 8705, 8985, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8985, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8985, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 128, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    128, 128, 128, 128, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 128, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 128, 8705, 
+    128, 128, 128, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    128, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8705, 128, 8705, 8705, 128, 128, 8705, 
+    128, 128, 8705, 8705, 128, 128, 8705, 8705, 8705, 8705, 
+    128, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8705, 8834, 
+    8834, 8834, 8834, 128, 8834, 128, 8834, 8834, 8834, 8834, 
+    8705, 8705, 128, 8705, 8705, 8705, 8705, 128, 128, 8705, 
+    8705, 8705, 8705, 8705, 8705, 8705, 8705, 128, 8705, 8705, 
+    8705, 8705, 8705, 8705, 8705, 128, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 
+    8834, 8834, 8705, 8705, 128, 8705, 8705, 8705, 8705, 128, 
+    8834, 8834, 8834, 8985, 8834, 8834, 8834, 8834, 8834, 8834, 
+    128, 128, 128, 128, 9097, 9225, 9353, 9481, 9609, 9737, 
+    9865, 9993, 10121, 10249, 9097, 9225, 9353, 9481, 9609, 9737, 
+    9865, 9993, 10121, 10249, 9097, 9225, 9353, 9481, 9609, 9737, 
+    9865, 9993, 10121, 10249, 9097, 9225, 9353, 9481, 9609, 9737, 
+    9865, 9993, 10121, 10249, 9097, 9225, 9353, 9481, 9609, 9737, 
+    9865, 9993, 10121, 10249, 
+};
+
+static const jchar data2[] = {
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
+    5, 5, 5, 5, 5, 5, 5, 5, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
+    128, 128, 128, 128, 128, 128, 
+};
+
+static const jchar data14[] = {
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 
+    262, 262, 262, 262, 262, 262, 262, 262, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 
+    144, 144, 144, 
+};
+
+static const int data_length[] = {
+    3960, 1504, 256, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 383, -1, -1, };
+static const jchar* data[] = {
+    data0, data1, data2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
+    NULL, NULL, NULL, NULL, data14, NULL, NULL};
+
+
+/**
+ * This is the attribute table for computing the numeric value of a
+ * character.  The value is -1 if Unicode does not define a value, -2
+ * if the value is not a positive integer, otherwise it is the value.
+ */
+static const jshort numValue0[] = {
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, 
+    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
+    23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 
+    -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
+    21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 
+    34, 35, -1, -1, -1, -1, -1, -1, 2, 3, -1, 1, -1, 
+    -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 
+    3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 0, 1, 
+    2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, -1, 
+    16, 10, 100, 1000, -1, -1, -2, -1, -1, 20, 30, 40, 50, 
+    60, 70, 80, 90, 10000, 17, 18, 19, -1, 0, 1, 2, 3, 
+    4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    -1, 0, 4, 5, 6, 7, 8, 9, -1, -1, -1, 1, 2, 
+    3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 50, 100, 500, 
+    1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
+    50, 100, 500, 1000, 1000, 5000, 10000, -1, 10, 11, 12, 13, 14, 
+    15, 16, 17, 18, 19, 20, -1, -1, 11, 12, 13, 14, 15, 
+    16, 17, 18, 19, 20, 10, 0, 1, 2, 3, 4, 5, 6, 
+    7, 8, 9, 10, 20, 30, 5, 6, 7, 8, 9, 21, 22, 
+    23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 
+    36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 
+    49, 50, -1, -1, -1, 
+};
+
+static const jshort numValue1[] = {
+    -1, -1, -1, -1, -1, 1, 2, 3, 4, 5, 6, 7, 8, 
+    9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 
+    400, 500, 600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 
+    8000, 9000, 10000, 20000, 30000, -3, -4, -5, -6, -7, -8, -1, -1, 
+    -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, 
+    -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 
+    7, 8, 9, 
+};
+
+static const jshort numValue2[] = {
+    -1, -1, 
+};
+
+static const jshort numValue14[] = {
+    -1, -1, -1, 
+};
+
+static const int numValue_length[] = {
+    395, 81, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, };
+static const jshort* numValue[] = {
+    numValue0, numValue1, numValue2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
+    NULL, NULL, NULL, NULL, numValue14, NULL, NULL};
+
+
+
+/**
+ * This is the attribute table for computing the uppercase representation
+ * of a character.  The value is the difference between the character and
+ * its uppercase version.
+ */
+static const jshort upper0[] = {
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 
+    -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, 
+    -32, -32, 0, 0, 0, 0, 0, 0, 0, 0, 743, 0, 0, 
+    0, 0, 0, -32, 121, 0, -1, 0, -232, 0, -300, 0, 0, 
+    0, 0, 0, 0, 0, 97, 0, 0, 0, 130, 0, 0, 0, 
+    0, 0, 56, 0, -1, -2, -79, 0, 0, 0, 0, -210, -206, 
+    -205, -202, -203, -207, -209, -211, -213, -214, -218, -217, -219, 0, 0, 
+    0, 84, 0, 0, 0, 0, 0, -38, -37, -31, -64, -63, -62, 
+    -57, 0, -47, -54, -86, -80, 7, 0, -96, 0, 0, 0, 0, 
+    0, 0, -48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, -59, 8, 0, 74, 86, 100, 
+    128, 112, 126, 8, 0, 9, 0, 0, -7205, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, 
+    -16, -16, -16, -16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, -26, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 
+};
+
+static const jshort upper1[] = {
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    -40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 
+};
+
+static const jshort upper2[] = {
+    0, 0, 
+};
+
+static const jshort upper14[] = {
+    0, 0, 0, 
+};
+
+static const int upper_length[] = {
+    395, 81, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, };
+static const jshort* upper[] = {
+    upper0, upper1, upper2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
+    NULL, NULL, NULL, NULL, upper14, NULL, NULL};
+
+
+/**
+ * This is the attribute table for computing the lowercase representation
+ * of a character.  The value is the difference between the character and
+ * its lowercase version.
+ */
+static const jshort lower0[] = {
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 
+    32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 32, 0, 0, 0, 1, 0, -199, 0, -121, 0, 210, 206, 
+    205, 79, 202, 203, 207, 0, 211, 209, 213, 0, 214, 218, 217, 
+    219, 0, 0, 2, 1, 0, 0, -97, -56, -130, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 38, 37, 64, 63, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, -60, 0, -7, 80, 0, 0, 
+    48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, 0, 0, 
+    0, 0, 0, 0, -8, 0, -74, -9, 0, -86, -100, -112, -128, 
+    -126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, -7517, -8383, -8262, 16, 16, 
+    16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 
+    16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 
+};
+
+static const jshort lower1[] = {
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 
+};
+
+static const jshort lower2[] = {
+    0, 0, 
+};
+
+static const jshort lower14[] = {
+    0, 0, 0, 
+};
+
+static const int lower_length[] = {
+    395, 81, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, };
+static const jshort* lower[] = {
+    lower0, lower1, lower2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
+    NULL, NULL, NULL, NULL, lower14, NULL, NULL};
+
+
+/**
+ * This is the attribute table for computing the directionality class
+ * of a character.  At present, the value is in the range 0 - 18 if the
+ * character has a direction, otherwise it is -1.
+ */
+static const jbyte direction0[] = {
+    9, 11, 10, 12, 12, 13, 5, 5, 13, 13, 5, 7, 5, 4, 3, 3, 3, 3, 3, 
+    3, 3, 3, 3, 3, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 7, 13, 0, 13, 13, 5, 3, 3, 0, 3, 13, 13, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 8, 8, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 
+    0, 13, 1, 1, 2, 2, 2, 2, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 
+    2, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 8, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 9, 1, 13, 13, 
+    13, 12, 10, 14, 16, 18, 15, 17, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 
+    3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 
+    13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 
+    13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 2, 
+};
+
+static const jbyte direction1[] = {
+    0, -1, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    0, 0, 0, 0, 0, 0, 1, 0, 8, 9, 13, 0, 0, 0, 3, 3, 3, 3, 3, 
+    3, 3, 3, 3, 3, 
+};
+
+static const jbyte direction2[] = {
+    0, -1, 
+};
+
+static const jbyte direction14[] = {
+    -1, 9, 8, 
+};
+
+static const int direction_length[] = {
+    395, 81, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, };
+static const jbyte* direction[] = {
+    direction0, direction1, direction2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
+    NULL, NULL, NULL, NULL, direction14, NULL, NULL};
+
+
+/**
+ * This is the listing of titlecase special cases (all other character
+ * can use <code>upper</code> to determine their titlecase).  The listing
+ * is a sequence of character pairs; converting the first character of the
+ * pair to titlecase produces the second character.
+ */
+static const jchar title[] = {
+    452, 453, 453, 453, 454, 453, 455, 456, 456, 456, 
+    457, 456, 458, 459, 459, 459, 460, 459, 497, 498, 
+    498, 498, 499, 498, 
+  };
+/** Length of title. */
+static const int title_length = 24;
+
+#endif /* __JAVA_CHARTABLES_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/java-cpool.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/java-cpool.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/java-cpool.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/java-cpool.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,133 @@
+// java-cpool.h - Constant pool parsing header.  -*- c++ -*-
+
+/* Copyright (C) 1999, 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JAVA_CPOOL_H__
+#define __JAVA_CPOOL_H__
+
+#include <gcj/javaprims.h>
+
+// we rename these, to avoid polluting the name space
+#define JV_CONSTANT_Undefined (0L)
+#define JV_CONSTANT_Utf8 (1L)
+#define JV_CONSTANT_Unicode (2L)
+#define JV_CONSTANT_Integer (3L)
+#define JV_CONSTANT_Float (4L)
+#define JV_CONSTANT_Long (5L)
+#define JV_CONSTANT_Double (6L)
+#define JV_CONSTANT_Class (7L)
+#define JV_CONSTANT_String (8L)
+#define JV_CONSTANT_Fieldref (9L)
+#define JV_CONSTANT_Methodref (10L)
+#define JV_CONSTANT_InterfaceMethodref (11L)
+#define JV_CONSTANT_NameAndType (12L)
+#define JV_CONSTANT_ResolvedFlag (16L)
+#define JV_CONSTANT_ResolvedString (16L | 8L)
+#define JV_CONSTANT_ResolvedClass  (16L | 7L)
+
+extern inline void 
+_Jv_storeIndexes (_Jv_word *data,
+		 _Jv_ushort index0,
+		 _Jv_ushort index1)
+{
+  data->i = (((jint)index0) << 16) | (jint) index1;
+}
+
+extern inline void 
+_Jv_loadIndexes (const _Jv_word *data,
+		 _Jv_ushort& index0,
+		 _Jv_ushort& index1)
+{
+  jint udata = data->i;
+      
+  _Jv_uint uindex0 = ((udata >> 16) & 0xffff);
+  _Jv_uint uindex1 = udata & 0xffff;
+      
+  index0 = uindex0;
+  index1 = uindex1;
+}
+
+extern inline void
+_Jv_storeFloat (_Jv_word *data, jfloat f)
+{
+  data->f = f;
+}
+
+extern inline jfloat
+_Jv_loadFloat (_Jv_word *data)
+{
+  return data->f;
+}
+
+extern inline void
+_Jv_storeInt (_Jv_word *data, jint i)
+{
+  data->i = i;
+}
+
+extern inline jint
+_Jv_loadInt (_Jv_word *data)
+{
+  return data->i;
+}
+
+extern inline void
+_Jv_storeLong (_Jv_word *data, jlong l)
+{
+#if SIZEOF_VOID_P == 8
+  data[0].l = l;
+#else
+  _Jv_word2 tmp;
+  tmp.l = l;
+  data[0].ia[0] = tmp.ia[0];
+  data[1].ia[0] = tmp.ia[1];
+#endif
+}
+
+extern inline jlong
+_Jv_loadLong (_Jv_word *data)
+{
+#if SIZEOF_VOID_P == 8
+  return data -> l;
+#else
+  _Jv_word2 tmp;
+  tmp.ia[0] = data[0].ia[0];
+  tmp.ia[1] = data[1].ia[0];
+  return tmp.l;
+#endif
+}
+
+extern inline void
+_Jv_storeDouble (_Jv_word *data, jdouble d)
+{
+#if SIZEOF_VOID_P == 8
+  data[0].d = d;
+#else
+  _Jv_word2 tmp;
+  tmp.d = d;
+  data[0].ia[0] = tmp.ia[0];
+  data[1].ia[0] = tmp.ia[1];
+#endif
+}
+
+extern inline jdouble
+_Jv_loadDouble (_Jv_word *data)
+{
+#if SIZEOF_VOID_P == 8
+  return data -> d;
+#else
+  _Jv_word2 tmp;
+  tmp.ia[0] = data[0].ia[0];
+  tmp.ia[1] = data[1].ia[0];
+  return tmp.d;
+#endif
+}
+
+
+#endif /* __JAVA_CPOOL_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/java-insns.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/java-insns.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/java-insns.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/java-insns.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,248 @@
+// java-insns.h - Instruction encodings. This is -*- c++ -*-
+
+/* Copyright (C) 1999, 2001, 2002, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JAVA_INSNS_H__
+#define __JAVA_INSNS_H__
+
+enum java_opcode
+{
+  op_nop = 0x00,
+  op_aconst_null = 0x01,
+  op_iconst_m1 = 0x02,
+  op_iconst_0 = 0x03,
+  op_iconst_1 = 0x04,
+  op_iconst_2 = 0x05,
+  op_iconst_3 = 0x06,
+  op_iconst_4 = 0x07,
+  op_iconst_5 = 0x08,
+  op_lconst_0 = 0x09,
+  op_lconst_1 = 0x0a,
+  op_fconst_0 = 0x0b,
+  op_fconst_1 = 0x0c,
+  op_fconst_2 = 0x0d,
+  op_dconst_0 = 0x0e,
+  op_dconst_1 = 0x0f,
+  op_bipush = 0x10,
+  op_sipush = 0x11,
+  op_ldc = 0x12,
+  op_ldc_w = 0x13,
+  op_ldc2_w = 0x14,
+  op_iload = 0x15,
+  op_lload = 0x16,
+  op_fload = 0x17,
+  op_dload = 0x18,
+  op_aload = 0x19,
+  op_iload_0 = 0x1a,
+  op_iload_1 = 0x1b,
+  op_iload_2 = 0x1c,
+  op_iload_3 = 0x1d,
+  op_lload_0 = 0x1e,
+  op_lload_1 = 0x1f,
+  op_lload_2 = 0x20,
+  op_lload_3 = 0x21,
+  op_fload_0 = 0x22,
+  op_fload_1 = 0x23,
+  op_fload_2 = 0x24,
+  op_fload_3 = 0x25,
+  op_dload_0 = 0x26,
+  op_dload_1 = 0x27,
+  op_dload_2 = 0x28,
+  op_dload_3 = 0x29,
+  op_aload_0 = 0x2a,
+  op_aload_1 = 0x2b,
+  op_aload_2 = 0x2c,
+  op_aload_3 = 0x2d,
+  op_iaload = 0x2e,
+  op_laload = 0x2f,
+  op_faload = 0x30,
+  op_daload = 0x31,
+  op_aaload = 0x32,
+  op_baload = 0x33,
+  op_caload = 0x34,
+  op_saload = 0x35,
+  op_istore = 0x36,
+  op_lstore = 0x37,
+  op_fstore = 0x38,
+  op_dstore = 0x39,
+  op_astore = 0x3a,
+  op_istore_0 = 0x3b,
+  op_istore_1 = 0x3c,
+  op_istore_2 = 0x3d,
+  op_istore_3 = 0x3e,
+  op_lstore_0 = 0x3f,
+  op_lstore_1 = 0x40,
+  op_lstore_2 = 0x41,
+  op_lstore_3 = 0x42,
+  op_fstore_0 = 0x43,
+  op_fstore_1 = 0x44,
+  op_fstore_2 = 0x45,
+  op_fstore_3 = 0x46,
+  op_dstore_0 = 0x47,
+  op_dstore_1 = 0x48,
+  op_dstore_2 = 0x49,
+  op_dstore_3 = 0x4a,
+  op_astore_0 = 0x4b,
+  op_astore_1 = 0x4c,
+  op_astore_2 = 0x4d,
+  op_astore_3 = 0x4e,
+  op_iastore = 0x4f,
+  op_lastore = 0x50,
+  op_fastore = 0x51,
+  op_dastore = 0x52,
+  op_aastore = 0x53,
+  op_bastore = 0x54,
+  op_castore = 0x55,
+  op_sastore = 0x56,
+  op_pop = 0x57,
+  op_pop2 = 0x58,
+  op_dup = 0x59,
+  op_dup_x1 = 0x5a,
+  op_dup_x2 = 0x5b,
+  op_dup2 = 0x5c,
+  op_dup2_x1 = 0x5d,
+  op_dup2_x2 = 0x5e,
+  op_swap = 0x5f,
+  op_iadd = 0x60,
+  op_ladd = 0x61,
+  op_fadd = 0x62,
+  op_dadd = 0x63,
+  op_isub = 0x64,
+  op_lsub = 0x65,
+  op_fsub = 0x66,
+  op_dsub = 0x67,
+  op_imul = 0x68,
+  op_lmul = 0x69,
+  op_fmul = 0x6a,
+  op_dmul = 0x6b,
+  op_idiv = 0x6c,
+  op_ldiv = 0x6d,
+  op_fdiv = 0x6e,
+  op_ddiv = 0x6f,
+  op_irem = 0x70,
+  op_lrem = 0x71,
+  op_frem = 0x72,
+  op_drem = 0x73,
+  op_ineg = 0x74,
+  op_lneg = 0x75,
+  op_fneg = 0x76,
+  op_dneg = 0x77,
+  op_ishl = 0x78,
+  op_lshl = 0x79,
+  op_ishr = 0x7a,
+  op_lshr = 0x7b,
+  op_iushr = 0x7c,
+  op_lushr = 0x7d,
+  op_iand = 0x7e,
+  op_land = 0x7f,
+  op_ior = 0x80,
+  op_lor = 0x81,
+  op_ixor = 0x82,
+  op_lxor = 0x83,
+  op_iinc = 0x84,
+  op_i2l = 0x85,
+  op_i2f = 0x86,
+  op_i2d = 0x87,
+  op_l2i = 0x88,
+  op_l2f = 0x89,
+  op_l2d = 0x8a,
+  op_f2i = 0x8b,
+  op_f2l = 0x8c,
+  op_f2d = 0x8d,
+  op_d2i = 0x8e,
+  op_d2l = 0x8f,
+  op_d2f = 0x90,
+  op_i2b = 0x91,
+  op_i2c = 0x92,
+  op_i2s = 0x93,
+  op_lcmp = 0x94,
+  op_fcmpl = 0x95,
+  op_fcmpg = 0x96,
+  op_dcmpl = 0x97,
+  op_dcmpg = 0x98,
+  op_ifeq = 0x99,
+  op_ifne = 0x9a,
+  op_iflt = 0x9b,
+  op_ifge = 0x9c,
+  op_ifgt = 0x9d,
+  op_ifle = 0x9e,
+  op_if_icmpeq = 0x9f,
+  op_if_icmpne = 0xa0,
+  op_if_icmplt = 0xa1,
+  op_if_icmpge = 0xa2,
+  op_if_icmpgt = 0xa3,
+  op_if_icmple = 0xa4,
+  op_if_acmpeq = 0xa5,
+  op_if_acmpne = 0xa6,
+  op_goto = 0xa7,
+  op_jsr = 0xa8,
+  op_ret = 0xa9,
+  op_tableswitch = 0xaa,
+  op_lookupswitch = 0xab,
+  op_ireturn = 0xac,
+  op_lreturn = 0xad,
+  op_freturn = 0xae,
+  op_dreturn = 0xaf,
+  op_areturn = 0xb0,
+  op_return = 0xb1,
+  op_getstatic = 0xb2,
+  op_putstatic = 0xb3,
+  op_getfield = 0xb4,
+  op_putfield = 0xb5,
+  op_invokevirtual = 0xb6,
+  op_invokespecial = 0xb7,
+  op_invokestatic = 0xb8,
+  op_invokeinterface = 0xb9,
+  op_breakpoint = 0xba,
+  op_new = 0xbb,
+  op_newarray = 0xbc,
+  op_anewarray = 0xbd,
+  op_arraylength = 0xbe,
+  op_athrow = 0xbf,
+  op_checkcast = 0xc0,
+  op_instanceof = 0xc1,
+  op_monitorenter = 0xc2,
+  op_monitorexit = 0xc3,
+  op_wide = 0xc4,
+  op_multianewarray = 0xc5,
+  op_ifnull = 0xc6,
+  op_ifnonnull = 0xc7,
+  op_goto_w = 0xc8,
+  op_jsr_w = 0xc9,
+
+  // new opcodes
+
+  op_putfield_1 = 0xca,
+  op_putfield_2 = 0xcb,
+  op_putfield_4 = 0xcc,
+  op_putfield_8 = 0xcd,
+  op_putfield_a = 0xce,
+
+  op_putstatic_1 = 0xcf,
+  op_putstatic_2 = 0xd0,
+  op_putstatic_4 = 0xd1,
+  op_putstatic_8 = 0xd2,
+  op_putstatic_a = 0xd3,
+
+  op_getfield_1 = 0xd4,
+  op_getfield_2s = 0xd5,
+  op_getfield_2u = 0xd6,
+  op_getfield_4 = 0xd7,
+  op_getfield_8 = 0xd8,
+  op_getfield_a = 0xd9,
+
+  op_getstatic_1 = 0xda,
+  op_getstatic_2s = 0xdb,
+  op_getstatic_2u = 0xdc,
+  op_getstatic_4 = 0xdd,
+  op_getstatic_8 = 0xde,
+  op_getstatic_a = 0xdf
+};
+
+#endif /* __JAVA_INSNS_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/java-interp.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/java-interp.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/java-interp.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/java-interp.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,337 @@
+// java-interp.h - Header file for the bytecode interpreter.  -*- c++ -*-
+
+/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JAVA_INTERP_H__
+#define __JAVA_INTERP_H__
+
+#include <jvm.h>
+#include <java-cpool.h>
+#include <gnu/gcj/runtime/NameFinder.h>
+
+#ifdef INTERPRETER
+
+#pragma interface
+
+#include <java/lang/Class.h>
+#include <java/lang/ClassLoader.h>
+#include <java/lang/reflect/Modifier.h>
+#include <java/lang/Thread.h>
+#include <gnu/gcj/RawData.h>
+
+// Define this to get the direct-threaded interpreter.  If undefined,
+// we revert to a basic bytecode interpreter.  The former is faster
+// but uses more memory.
+#define DIRECT_THREADED
+
+#include <ffi.h>
+
+struct _Jv_ResolvedMethod;
+
+void _Jv_InitInterpreter ();
+void _Jv_DefineClass (jclass, jbyteArray, jint, jint,
+		      java::security::ProtectionDomain *,
+		      _Jv_Utf8Const **);
+
+void _Jv_InitField (jobject, jclass, int);
+void * _Jv_AllocMethodInvocation (jsize size);
+int  _Jv_count_arguments (_Jv_Utf8Const *signature,
+			  jboolean staticp = true);
+void _Jv_VerifyMethod (_Jv_InterpMethod *method);
+void _Jv_CompileMethod (_Jv_InterpMethod* method);
+
+/* the interpreter is written in C++, primarily because it makes it easy for
+ * the entire thing to be "friend" with class Class. */
+
+class _Jv_InterpClass;
+class _Jv_InterpMethod;
+
+// Before a method is "compiled" we store values as the bytecode PC,
+// an int.  Afterwards we store them as pointers into the prepared
+// code itself.
+union _Jv_InterpPC
+{
+  int i;
+  void *p;
+};
+
+class _Jv_InterpException
+{
+  _Jv_InterpPC start_pc;
+  _Jv_InterpPC end_pc;
+  _Jv_InterpPC handler_pc;
+  _Jv_InterpPC handler_type;
+
+  friend class _Jv_ClassReader;
+  friend class _Jv_InterpMethod;
+  friend class _Jv_BytecodeVerifier;
+};
+
+// Base class for method representations.  Subclasses are interpreted
+// and JNI methods.
+class _Jv_MethodBase
+{
+protected:
+  // The class which defined this method.
+  jclass defining_class;
+
+  // The method description.
+  _Jv_Method *self;
+
+  // Size of raw arguments.
+  _Jv_ushort args_raw_size;
+
+  friend class _Jv_InterpreterEngine;
+
+public:
+  _Jv_Method *get_method ()
+  {
+    return self;
+  }
+};
+
+// The type of the PC depends on whether we're doing direct threading
+// or a more ordinary bytecode interpreter.
+#ifdef DIRECT_THREADED
+// Slot in the "compiled" form of the bytecode.
+union insn_slot
+{
+  // Address of code.
+  void *insn;
+  // An integer value used by an instruction.
+  jint int_val;
+  // A pointer value used by an instruction.
+  void *datum;
+};
+
+typedef insn_slot *pc_t;
+#else
+typedef unsigned char *pc_t;
+#endif
+
+
+// This structure holds the bytecode pc and corresponding source code
+// line number.  An array (plus length field) of this structure is put
+// in each _Jv_InterpMethod and used to resolve the (internal) program
+// counter of the interpreted method to an actual java source file
+// line.
+struct  _Jv_LineTableEntry
+{
+  union
+  {
+    pc_t pc;
+    int bytecode_pc;
+  };
+  int line;
+};
+
+class _Jv_InterpMethod : public _Jv_MethodBase
+{
+  // Breakpoint instruction
+  static pc_t breakpoint_insn;
+#ifdef DIRECT_THREADED
+  static insn_slot bp_insn_slot;
+#else
+  static unsigned char bp_insn_opcode;
+#endif
+
+  _Jv_ushort       max_stack;
+  _Jv_ushort       max_locals;
+  int              code_length;
+
+  _Jv_ushort       exc_count;
+  bool             is_15;
+
+  // Length of the line_table - when this is zero then line_table is NULL.
+  int line_table_len;  
+  _Jv_LineTableEntry *line_table;
+
+  pc_t prepared;
+  int number_insn_slots;
+
+  unsigned char* bytecode () 
+  {
+    return 
+      ((unsigned char*)this) 
+      + ROUND((sizeof (_Jv_InterpMethod)
+	       + exc_count*sizeof (_Jv_InterpException)), 4);
+  }
+
+  _Jv_InterpException * exceptions ()
+  {
+    return (_Jv_InterpException*) (this+1);
+  }
+
+  static size_t size (int exc_count, int code_length)
+  {
+    return 
+      ROUND ((sizeof (_Jv_InterpMethod) 
+	      + (exc_count * sizeof (_Jv_InterpException))), 4)
+      + code_length;
+  }
+
+  // return the method's invocation pointer (a stub).
+  void *ncode ();
+  void compile (const void * const *);
+
+  static void run_normal (ffi_cif*, void*, ffi_raw*, void*);
+  static void run_synch_object (ffi_cif*, void*, ffi_raw*, void*);
+  static void run_class (ffi_cif*, void*, ffi_raw*, void*);
+  static void run_synch_class (ffi_cif*, void*, ffi_raw*, void*);
+  
+  static void run_normal_debug (ffi_cif*, void*, ffi_raw*, void*);
+  static void run_synch_object_debug (ffi_cif*, void*, ffi_raw*, void*);
+  static void run_class_debug (ffi_cif*, void*, ffi_raw*, void*);
+  static void run_synch_class_debug (ffi_cif*, void*, ffi_raw*, void*);
+
+  static void run (void *, ffi_raw *, _Jv_InterpMethod *);
+  static void run_debug (void *, ffi_raw *, _Jv_InterpMethod *);
+  
+
+  
+  // Returns source file line number for given PC value, or -1 if line
+  // number info is unavailable.
+  int get_source_line(pc_t mpc);
+
+  // Convenience function for indexing bytecode PC/insn slots in
+  // line tables for JDWP
+  jlong insn_index (pc_t pc);
+  
+   public:
+   
+  /* Get the line table for this method.
+   * start  is the lowest index in the method
+   * end    is the  highest index in the method
+   * line_numbers is an array to hold the list of source line numbers
+   * code_indices is an array to hold the corresponding list of code indices
+   */
+  void get_line_table (jlong& start, jlong& end, jintArray& line_numbers,
+		       jlongArray& code_indices);
+
+  /* Installs a break instruction at the given code index. Returns
+     the pc_t of the breakpoint or NULL if index is invalid. */
+  pc_t install_break (jlong index);
+
+  // Gets the instruction at the given index
+  pc_t get_insn (jlong index);
+
+  /* Writes the given instruction at the given code index. Returns
+     the insn or NULL if index is invalid. */
+  pc_t set_insn (jlong index, pc_t insn);
+
+#ifdef DIRECT_THREADED
+  friend void _Jv_CompileMethod (_Jv_InterpMethod*);
+#endif
+  
+  friend class _Jv_ClassReader;
+  friend class _Jv_BytecodeVerifier;
+  friend class _Jv_StackTrace;
+  friend class _Jv_InterpreterEngine;
+
+#ifdef JV_MARKOBJ_DECL
+  friend JV_MARKOBJ_DECL;
+#endif
+};
+
+class _Jv_InterpClass
+{
+  _Jv_MethodBase **interpreted_methods;
+  _Jv_ushort     *field_initializers;
+  jstring source_file_name;
+
+  friend class _Jv_ClassReader;
+  friend class _Jv_InterpMethod;
+  friend class _Jv_StackTrace;
+  friend class _Jv_InterpreterEngine;
+
+  friend void  _Jv_InitField (jobject, jclass, int);
+#ifdef JV_MARKOBJ_DECL
+  friend JV_MARKOBJ_DECL;
+#endif
+
+  friend _Jv_MethodBase ** _Jv_GetFirstMethod (_Jv_InterpClass *klass);
+};
+
+extern inline _Jv_MethodBase **
+_Jv_GetFirstMethod (_Jv_InterpClass *klass)
+{
+  return klass->interpreted_methods;
+}
+
+struct _Jv_ResolvedMethod
+{
+  jint            stack_item_count;	
+  jclass          klass;
+  _Jv_Method*     method;
+
+  // a resolved method holds the cif in-line, so that _Jv_MarkObj just needs
+  // to mark the resolved method to hold on to the cif.  Some memory could be
+  // saved by keeping a cache of cif's, since many will be the same.
+  ffi_cif         cif;
+  ffi_type *      arg_types[0];
+};
+
+class _Jv_JNIMethod : public _Jv_MethodBase
+{
+  // The underlying function.  If NULL we have to look for the
+  // function.
+  void *function;
+
+  // This is the CIF used by the JNI function.
+  ffi_cif jni_cif;
+
+  // These are the argument types used by the JNI function.
+  ffi_type **jni_arg_types;
+
+  // This function is used when making a JNI call from the interpreter.
+  static void call (ffi_cif *, void *, ffi_raw *, void *);
+
+  void *ncode ();
+
+  friend class _Jv_ClassReader;
+  friend class _Jv_InterpreterEngine;
+
+#ifdef JV_MARKOBJ_DECL
+  friend JV_MARKOBJ_DECL;
+#endif
+
+public:
+  // FIXME: this is ugly.
+  void set_function (void *f)
+  {
+    function = f;
+  }
+};
+
+// The interpreted call stack, represented by a linked list of frames.
+struct _Jv_InterpFrame
+{
+  _Jv_InterpMethod *self;
+  java::lang::Thread *thread;
+  _Jv_InterpFrame *next;
+  pc_t pc;
+
+  _Jv_InterpFrame (_Jv_InterpMethod *s, java::lang::Thread *thr)
+  {
+    self = s;
+    thread = thr;
+    next = (_Jv_InterpFrame *) thr->interp_frame;
+    thr->interp_frame = (gnu::gcj::RawData *) this;
+    pc = NULL;
+  }
+
+  ~_Jv_InterpFrame ()
+  {
+    thread->interp_frame = (gnu::gcj::RawData *) next;
+  }
+};
+
+#endif /* INTERPRETER */
+
+#endif /* __JAVA_INTERP_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/java-props.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/java-props.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/java-props.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/java-props.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,33 @@
+// java-props.h - Properties  -*- c++ -*-
+
+/* Copyright (C) 1999  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JAVA_PROPS_H__
+#define __JAVA_PROPS_H__
+
+typedef struct
+{
+  char *key;
+  size_t      key_length;
+  char *value;
+  size_t      value_length;
+} property_pair;
+
+// Set to NULL-terminated list of properties set at compile time.
+extern const char **_Jv_Compiler_Properties;
+extern int _Jv_Properties_Count;
+
+// Properties taken from the user's environment.
+extern property_pair *_Jv_Environment_Properties;
+
+// Module load path.
+extern char *_Jv_Module_Load_Path;
+
+#endif
+

Added: llvm-gcc-4.2/trunk/libjava/include/java-stack.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/java-stack.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/java-stack.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/java-stack.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,163 @@
+// java-stack.h - Definitions for unwinding & inspecting the call stack.
+
+/* Copyright (C) 2005, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JV_STACKTRACE_H__
+#define __JV_STACKTRACE_H__
+
+#include <stdlib.h>
+#include <unwind.h>
+
+#include <gcj/cni.h>
+#include <gcj/javaprims.h>
+
+#include <java-interp.h>
+
+#include <java/lang/Class.h>
+#include <java/lang/StackTraceElement.h>
+#include <java/lang/Throwable.h>
+#include <java/lang/Thread.h>
+
+#include <gnu/gcj/runtime/NameFinder.h>
+
+using namespace gnu::gcj::runtime;
+using namespace java::lang;
+
+enum _Jv_FrameType
+{
+  frame_native,
+  frame_interpreter
+};
+
+#ifdef INTERPRETER
+struct _Jv_InterpFrameInfo
+{
+  _Jv_InterpMethod *meth;
+  pc_t pc;
+};
+#endif
+
+union _Jv_FrameInfo
+{
+};
+
+struct _Jv_StackFrame
+{
+  _Jv_FrameType type;   /* Native or interpreted.  */
+  union {
+#ifdef INTERPRETER
+    _Jv_InterpFrameInfo interp;
+#endif
+    struct {
+      void *ip;
+      void *start_ip;
+    };
+  };
+//  _Jv_FrameInfo info;   /* Frame-type specific data.  */
+  jclass klass;
+  _Jv_Method *meth;
+};
+
+typedef struct _Jv_UnwindState;
+typedef _Unwind_Reason_Code (*_Jv_TraceFn) (_Jv_UnwindState *);
+
+struct _Jv_UnwindState
+{
+  jint length;                   // length of FRAMES
+  jint pos;                      // current position in FRAMES
+  _Jv_StackFrame *frames;        // array of stack frame data to be filled.
+#ifdef INTERPRETER
+  _Jv_InterpFrame *interp_frame; // current frame in the interpreter stack.
+#endif
+  _Jv_TraceFn trace_function;    // function to call back after each frame
+  				 // is enumerated. May be NULL.
+  void *trace_data;		 // additional state data for trace_function.
+  
+  _Jv_UnwindState (jint ln)
+    {
+      length = ln;
+      pos = 0;
+      frames = NULL;
+      Thread *thread = Thread::currentThread();
+      // Check for NULL currentThread(), in case an exception is created 
+      // very early during the runtime startup.
+#ifdef INTERPRETER
+      if (thread)
+	interp_frame = (_Jv_InterpFrame *) thread->interp_frame;
+#endif
+      trace_function = NULL;
+      trace_data = NULL;
+    }
+};
+
+class _Jv_StackTrace
+{
+private:
+  int length;
+  _Jv_StackFrame frames[];
+
+  static void UpdateNCodeMap ();
+  static jclass ClassForFrame (_Jv_StackFrame *frame);
+  static void FillInFrameInfo (_Jv_StackFrame *frame);
+  static void getLineNumberForFrame(_Jv_StackFrame *frame, NameFinder *finder, 
+				    jstring *sourceFileName, jint *lineNum,
+				    jstring *methodName);
+  
+  static _Unwind_Reason_Code UnwindTraceFn (struct _Unwind_Context *context, 
+    void *state_ptr);
+    
+  static _Unwind_Reason_Code calling_class_trace_fn (_Jv_UnwindState *state);
+  static _Unwind_Reason_Code non_system_trace_fn (_Jv_UnwindState *state);
+  static _Unwind_Reason_Code accesscontrol_trace_fn (_Jv_UnwindState *state);
+
+public:
+  static _Jv_StackTrace *GetStackTrace (void);
+  static JArray< ::java::lang::StackTraceElement *>*
+    GetStackTraceElements (_Jv_StackTrace *trace, 
+    java::lang::Throwable *throwable);
+  static jclass GetCallingClass (jclass);
+  static void GetCallerInfo (jclass checkClass, jclass *, _Jv_Method **);
+  static JArray<jclass> *GetClassContext (jclass checkClass);
+  static ClassLoader *GetFirstNonSystemClassLoader (void);
+  static jobjectArray GetAccessControlStack ();
+  
+};
+
+// Information about a given address.
+struct _Jv_AddrInfo
+{
+  // File name of the defining module.
+  const char *file_name;
+
+  // Base address of the loaded module.
+  void *base;
+
+  // Name of the nearest symbol.
+  const char *sym_name;
+
+  // Address of the nearest symbol.
+  void *sym_addr;
+
+  ~_Jv_AddrInfo (void)
+    {
+      // On systems with a real dladdr(), the file and symbol names given by
+      // _Jv_platform_dladdr() are not dynamically allocated.  On Windows,
+      // they are.
+
+#ifdef WIN32
+      if (file_name)
+        free ((void *)file_name);
+
+      if (sym_name)
+        free ((void *)sym_name);
+#endif /* WIN32 */
+    }
+};
+
+#endif /* __JV_STACKTRACE_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/jni_md.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/jni_md.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/jni_md.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/jni_md.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,148 @@
+/* jni_md.h
+   Copyright (C) 2001, 2005, 2007 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License. */
+
+#ifndef __GCJ_JNI_MD_H__
+#define __GCJ_JNI_MD_H__
+
+#include <gcj/libgcj-config.h>
+
+#ifdef __GCJ_JNI_IMPL__
+
+/* If __GCJ_JNI_IMPL__ is defined, then we assume that we're building
+   libgcj itself, and we include headers which taint the namespace
+   more than is acceptable for the ordinary JNI user.  */
+#include <gcj/javaprims.h>
+#include <gcj/array.h>
+#include <gnu/gcj/runtime/JNIWeakRef.h>
+
+typedef gnu::gcj::runtime::JNIWeakRef *jweak;
+
+typedef struct _Jv_JNIEnv JNIEnv;
+typedef struct _Jv_JavaVM JavaVM;
+
+#define JNI_TRUE true
+#define JNI_FALSE false
+
+/* We defined jobject and friends, so don't redefine them in jni.h.  */
+#define _CLASSPATH_VM_JNI_TYPES_DEFINED
+
+/* We defined jmethodID and and jfieldID, so don't redefine them in
+   jni.h.  */
+#define _CLASSPATH_VM_INTERNAL_TYPES_DEFINED
+
+/* Contents of the JNIEnv; but only inside the implementation.  */
+#define _CLASSPATH_JNIENV_CONTENTS					\
+  /* The current exception.  */						\
+  jthrowable ex;							\
+									\
+  /* The chain of local frames.  */					\
+  struct _Jv_JNI_LocalFrame *locals;					\
+									\
+  /* The bottom-most element of the chain, initialized with the env and	\
+     reused between non-nesting JNI calls.  */				\
+  struct _Jv_JNI_LocalFrame *bottom_locals;
+
+
+#else /* __GCJ_JNI_IMPL__ */
+
+# ifdef __GNUC__
+
+/* If we're using gcc, we can use a platform-independent scheme to get
+   the right integer types.  FIXME: this is not always correct, for
+   instance on the c4x it will be wrong -- it depends on whether
+   QImode is 8 bits.  */
+typedef int    jbyte  __attribute__((__mode__(__QI__)));
+typedef int    jshort __attribute__((__mode__(__HI__)));
+typedef int    jint   __attribute__((__mode__(__SI__)));
+typedef int    jlong  __attribute__((__mode__(__DI__)));
+typedef int    jboolean __attribute__((__mode__(__QI__)));
+typedef unsigned short jchar __attribute__((__mode__(__HI__)));
+typedef float  jfloat;
+typedef double jdouble;
+typedef jint jsize;
+
+# else /* __GNUC__ */
+
+#  ifdef JV_HAVE_INTTYPES_H
+
+/* If <inttypes.h> is available, we use it.  */
+
+#   include <inttypes.h>
+
+typedef int8_t jbyte;
+typedef int16_t jshort;
+typedef int32_t jint;
+typedef int64_t jlong;
+typedef float jfloat;
+typedef double jdouble;
+typedef jint jsize;
+typedef int8_t jboolean;
+typedef uint16_t jchar;
+
+#  else /* JV_HAVE_INTTYPES_H */
+
+/* For now, we require either gcc or <inttypes.h>.  If we did more
+   work at configure time we could get around this, but right now it
+   doesn't seem worth it.  */
+#   error jni.h not ported to this platform
+
+#  endif /* JV_HAVE_INTTYPES_H */
+
+# endif /* __GNUC__ */
+
+#endif /* __GCJ_JNI_IMPL__ */
+
+
+/* Linkage and calling conventions. */
+#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
+
+#define JNIIMPORT        __declspec(dllimport)
+#define JNIEXPORT        __declspec(dllexport)
+
+#define JNICALL          __stdcall
+
+/* These defines apply to symbols in libgcj */
+#ifdef __GCJ_DLL__
+# ifdef __GCJ_JNI_IMPL__
+#  define _CLASSPATH_JNIIMPEXP JNIEXPORT
+# else
+#  define _CLASSPATH_JNIIMPEXP JNIIMPORT
+# endif /* ! __GCJ_JNI_IMPL__ */
+#else /* ! __GCJ_DLL__ */
+# define _CLASSPATH_JNIIMPEXP
+#endif /*  __GCJ_DLL__ */
+
+#else /* !( _WIN32 || __WIN32__ || WIN32) */
+
+#define JNIIMPORT
+#define JNIEXPORT
+#define JNICALL
+#define _CLASSPATH_JNIIMPEXP
+
+#endif /* !( _WIN32 || __WIN32__ || WIN32) */
+
+
+#endif /* __GCJ_JNI_MD_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/jvm.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/jvm.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/jvm.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/jvm.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,698 @@
+// jvm.h - Header file for private implementation information. -*- c++ -*-
+
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JAVA_JVM_H__
+#define __JAVA_JVM_H__
+
+// Define this before including jni.h.
+// jni.h is included by jvmpi.h, which might be included.  We define
+// this unconditionally because it is convenient and it lets other
+// files include jni.h without difficulty.
+#define __GCJ_JNI_IMPL__
+
+#include <gcj/javaprims.h>
+
+#include <java-assert.h>
+#include <java-threads.h>
+// Must include java-gc.h before Object.h for the implementation.
+#include <java-gc.h>
+
+#include <java/lang/Object.h>
+
+// Include cni.h before field.h to enable all definitions.  FIXME.
+#include <gcj/cni.h>
+#include <gcj/field.h>
+
+/* Macro for possible unused arguments.  */
+#define MAYBE_UNUSED __attribute__((__unused__))
+
+/* Structure of the virtual table.  */
+struct _Jv_VTable
+{
+#ifdef __ia64__
+  typedef struct { void *pc, *gp; } vtable_elt;
+#else
+  typedef void *vtable_elt;
+#endif
+  jclass clas;
+  void *gc_descr;
+
+  // This must be last, as derived classes "extend" this by
+  // adding new data members.
+  vtable_elt method[1];
+
+#ifdef __ia64__
+  void *get_method(int i) { return &method[i]; }
+  void set_method(int i, void *fptr) { method[i] = *(vtable_elt *)fptr; }
+  void *get_finalizer()
+  {
+    // We know that get_finalizer is only used for checking whether
+    // this object needs to have a finalizer registered.  So it is
+    // safe to simply return just the PC component of the vtable
+    // slot.
+    return ((vtable_elt *)(get_method(0)))->pc;
+  }
+#else
+  void *get_method(int i) { return method[i]; }
+  void set_method(int i, void *fptr) { method[i] = fptr; }
+  void *get_finalizer() { return get_method(0); }
+#endif
+
+  static size_t vtable_elt_size() { return sizeof(vtable_elt); }
+
+  // Given a method index, return byte offset from the vtable pointer.
+  static jint idx_to_offset (int index)
+  {
+    return (2 * sizeof (void *)) + (index * vtable_elt_size ());
+  }
+
+  static _Jv_VTable *new_vtable (int count);
+};
+
+union _Jv_word
+{
+  jobject o;
+  jint i;			// Also stores smaller integral types.
+  jfloat f;
+  jint ia[1];			// Half of _Jv_word2.
+  void* p;
+
+#if SIZEOF_VOID_P == 8
+  // We can safely put a long or a double in here without increasing
+  // the size of _Jv_Word; we take advantage of this in the interpreter.
+  jlong l;
+  jdouble d;
+#endif
+
+  jclass                     clazz;
+  jstring                    string;
+  struct _Jv_Field          *field;
+  struct _Jv_Utf8Const      *utf8;
+  struct _Jv_ResolvedMethod *rmethod;
+};
+
+union _Jv_word2
+{
+  jint ia[2];
+  jlong l;
+  jdouble d;
+};                              
+
+union _Jv_value
+{
+  jbyte byte_value;
+  jshort short_value;
+  jchar char_value;
+  jint int_value;
+  jlong long_value;
+  jfloat float_value;
+  jdouble double_value;
+  jobject object_value;
+};
+
+/* Extract a character from a Java-style Utf8 string.
+ * PTR points to the current character.
+ * LIMIT points to the end of the Utf8 string.
+ * PTR is incremented to point after the character thta gets returns.
+ * On an error, -1 is returned. */
+#define UTF8_GET(PTR, LIMIT) \
+  ((PTR) >= (LIMIT) ? -1 \
+   : *(PTR) < 128 ? *(PTR)++ \
+   : (*(PTR)&0xE0) == 0xC0 && ((PTR)+=2)<=(LIMIT) && ((PTR)[-1]&0xC0) == 0x80 \
+   ? (((PTR)[-2] & 0x1F) << 6) + ((PTR)[-1] & 0x3F) \
+   : (*(PTR) & 0xF0) == 0xE0 && ((PTR) += 3) <= (LIMIT) \
+   && ((PTR)[-2] & 0xC0) == 0x80 && ((PTR)[-1] & 0xC0) == 0x80 \
+   ? (((PTR)[-3]&0x0F) << 12) + (((PTR)[-2]&0x3F) << 6) + ((PTR)[-1]&0x3F) \
+   : ((PTR)++, -1))
+
+extern int _Jv_strLengthUtf8(const char* str, int len);
+
+typedef struct _Jv_Utf8Const Utf8Const;
+_Jv_Utf8Const *_Jv_makeUtf8Const (const char *s, int len);
+_Jv_Utf8Const *_Jv_makeUtf8Const (jstring string);
+extern jboolean _Jv_equalUtf8Consts (const _Jv_Utf8Const *, const _Jv_Utf8Const *);
+extern jboolean _Jv_equal (_Jv_Utf8Const *, jstring, jint);
+extern jboolean _Jv_equaln (_Jv_Utf8Const *, jstring, jint);
+
+/* Helper class which converts a jstring to a temporary char*.
+   Uses the supplied buffer, if non-null. Otherwise, allocates
+   the buffer on the heap. Use the JV_TEMP_UTF_STRING macro,
+   which follows, to automatically allocate a stack buffer if
+   the string is small enough. */
+class _Jv_TempUTFString
+{
+public:
+  _Jv_TempUTFString(jstring jstr, char* buf=0);
+  ~_Jv_TempUTFString();
+
+// Accessors
+  operator const char*() const
+  {
+    return buf_;
+  }
+  const char* buf() const
+  {
+    return buf_;
+  }
+  char* buf()
+  {
+    return buf_;
+  }
+
+private:
+  char* buf_;
+  bool heapAllocated_;
+};
+
+inline _Jv_TempUTFString::_Jv_TempUTFString (jstring jstr, char* buf)
+  : buf_(0), heapAllocated_(false)
+{
+  if (!jstr) return;
+  jsize len = JvGetStringUTFLength (jstr);
+  if (buf)
+    buf_ = buf;
+  else
+    {
+      buf_ = (char*) _Jv_Malloc (len+1);
+      heapAllocated_ = true;
+    }
+
+  JvGetStringUTFRegion (jstr, 0, jstr->length(), buf_);
+  buf_[len] = '\0';
+}
+
+inline _Jv_TempUTFString::~_Jv_TempUTFString ()
+{
+  if (heapAllocated_)
+    _Jv_Free (buf_);
+}
+
+/* Macro which uses _Jv_TempUTFString. Allocates a stack-based
+   buffer if the string and its null terminator are <= 256
+   characters in length. Otherwise, a heap-based buffer is
+   used. The parameters to this macro are the variable name
+   which is an instance of _Jv_TempUTFString (above) and a
+   jstring.
+   
+   Sample Usage:
+   
+   jstring jstr = getAJString();
+   JV_TEMP_UTF_STRING(utfstr, jstr);
+   printf("The string is: %s\n", utfstr.buf());
+   
+ */
+#define JV_TEMP_UTF_STRING(utfstr, jstr) \
+  jstring utfstr##thejstr = (jstr); \
+  jsize utfstr##_len = utfstr##thejstr ? JvGetStringUTFLength (utfstr##thejstr) + 1 : 0; \
+  char utfstr##_buf[utfstr##_len <= 256 ? utfstr##_len : 0]; \
+  _Jv_TempUTFString utfstr(utfstr##thejstr, sizeof(utfstr##_buf)==0 ? 0 : utfstr##_buf)
+
+namespace gcj
+{
+  /* Some constants used during lookup of special class methods.  */
+  extern _Jv_Utf8Const *void_signature; /* "()V" */
+  extern _Jv_Utf8Const *clinit_name;    /* "<clinit>" */
+  extern _Jv_Utf8Const *init_name;      /* "<init>" */
+  extern _Jv_Utf8Const *finit_name;     /* "finit$", */
+  
+  /* Set to true by _Jv_CreateJavaVM. */
+  extern bool runtimeInitialized;
+
+  /* Print out class names as they are initialized. */
+  extern bool verbose_class_flag;
+  
+  /* When true, enable the bytecode verifier and BC-ABI verification. */
+  extern bool verifyClasses;
+
+  /* Thread stack size specified by the -Xss runtime argument. */
+  extern size_t stack_size;
+}
+
+// This class handles all aspects of class preparation and linking.
+class _Jv_Linker
+{
+private:
+  typedef unsigned int uaddr __attribute__ ((mode (pointer)));
+
+  static _Jv_Field *find_field_helper(jclass, _Jv_Utf8Const *, _Jv_Utf8Const *,
+				      jclass, jclass *);
+  static _Jv_Field *find_field(jclass, jclass, jclass *, _Jv_Utf8Const *,
+			       _Jv_Utf8Const *);
+  static void prepare_constant_time_tables(jclass);
+  static jshort get_interfaces(jclass, _Jv_ifaces *);
+  static void link_symbol_table(jclass);
+  static void link_exception_table(jclass);
+  static void layout_interface_methods(jclass);
+  static void layout_vtable_methods(jclass);
+  static void set_vtable_entries(jclass, _Jv_VTable *);
+  static void make_vtable(jclass);
+  static void ensure_fields_laid_out(jclass);
+  static void ensure_class_linked(jclass);
+  static void ensure_supers_installed(jclass);
+  static void add_miranda_methods(jclass, jclass);
+  static void ensure_method_table_complete(jclass);
+  static void verify_class(jclass);
+  static jshort find_iindex(jclass *, jshort *, jshort);
+  static jshort indexof(void *, void **, jshort);
+  static int get_alignment_from_class(jclass);
+  static void generate_itable(jclass, _Jv_ifaces *, jshort *);
+  static jshort append_partial_itable(jclass, jclass, void **, jshort);
+  static _Jv_Method *search_method_in_class (jclass, jclass,
+					     _Jv_Utf8Const *,
+					     _Jv_Utf8Const *,
+					     bool check_perms = true);
+  static _Jv_Method *search_method_in_superclasses (jclass cls, jclass klass, 
+						    _Jv_Utf8Const *method_name,
+ 						    _Jv_Utf8Const *method_signature,
+						    jclass *found_class,
+						    bool check_perms = true);
+  static void *create_error_method(_Jv_Utf8Const *);
+
+  /* The least significant bit of the signature pointer in a symbol
+     table is set to 1 by the compiler if the reference is "special",
+     i.e. if it is an access to a private field or method.  Extract
+     that bit, clearing it in the address and setting the LSB of
+     SPECIAL accordingly.  */
+  static void maybe_adjust_signature (_Jv_Utf8Const *&s, uaddr &special)
+  {
+    union {
+      _Jv_Utf8Const *signature;
+      uaddr signature_bits;
+    };
+    signature = s;
+    special = signature_bits & 1;
+    signature_bits -= special;
+    s = signature;
+  }  
+
+public:
+
+  static bool has_field_p (jclass, _Jv_Utf8Const *);
+  static void print_class_loaded (jclass);
+  static void resolve_class_ref (jclass, jclass *);
+  static void wait_for_state(jclass, int);
+  static _Jv_word resolve_pool_entry (jclass, int, bool =false);
+  static void resolve_field (_Jv_Field *, java::lang::ClassLoader *);
+  static void verify_type_assertions (jclass);
+};
+
+/* Type of pointer used as finalizer.  */
+typedef void _Jv_FinalizerFunc (jobject);
+
+/* Allocate space for a new Java object.  */
+void *_Jv_AllocObj (jsize size, jclass cl) __attribute__((__malloc__));
+/* Allocate space for a potentially uninitialized pointer-free object.
+   Interesting only with JV_HASH_SYNCHRONIZATION.  */
+void *_Jv_AllocPtrFreeObj (jsize size, jclass cl) __attribute__((__malloc__));
+/* Allocate space for an array of Java objects.  */
+void *_Jv_AllocArray (jsize size, jclass cl) __attribute__((__malloc__));
+/* Allocate space that is known to be pointer-free.  */
+void *_Jv_AllocBytes (jsize size) __attribute__((__malloc__));
+/* Allocate space for a new non-Java object, which does not have the usual 
+   Java object header but may contain pointers to other GC'ed objects.  */
+void *_Jv_AllocRawObj (jsize size) __attribute__((__malloc__));
+/* Explicitly throw an out-of-memory exception.	*/
+void _Jv_ThrowNoMemory() __attribute__((__noreturn__));
+/* Allocate an object with a single pointer.  The first word is reserved
+   for the GC, and the second word is the traced pointer.  */
+void *_Jv_AllocTraceOne (jsize size /* incl. reserved slot */);
+/* Ditto, but for two traced pointers.			   */
+void *_Jv_AllocTraceTwo (jsize size /* incl. reserved slot */);
+/* Initialize the GC.  */
+void _Jv_InitGC (void);
+/* Register a finalizer.  */
+void _Jv_RegisterFinalizer (void *object, _Jv_FinalizerFunc *method);
+/* Compute the GC descriptor for a class */
+void * _Jv_BuildGCDescr(jclass);
+
+/* Allocate some unscanned, unmoveable memory.  Return NULL if out of
+   memory.  */
+void *_Jv_MallocUnchecked (jsize size) __attribute__((__malloc__));
+
+/* Initialize finalizers.  The argument is a function to be called
+   when a finalizer is ready to be run.  */
+void _Jv_GCInitializeFinalizers (void (*notifier) (void));
+/* Run finalizers for objects ready to be finalized..  */
+void _Jv_RunFinalizers (void);
+/* Run all finalizers.  Should be called only before exit.  */
+void _Jv_RunAllFinalizers (void);
+/* Perform a GC.  */
+void _Jv_RunGC (void);
+/* Disable and enable GC.  */
+void _Jv_DisableGC (void);
+void _Jv_EnableGC (void);
+/* Register a disappearing link.  This is a field F which should be
+   cleared when *F is found to be inaccessible.  This is used in the
+   implementation of java.lang.ref.Reference.  */
+void _Jv_GCRegisterDisappearingLink (jobject *objp);
+/* Return true if OBJECT should be reclaimed.  This is used to
+   implement soft references.  */
+jboolean _Jv_GCCanReclaimSoftReference (jobject obj);
+
+/* Register a finalizer for a String object.  This is only used by
+   the intern() implementation.  */
+void _Jv_RegisterStringFinalizer (jobject str);
+/* This is called to actually finalize a possibly-intern()d String.  */
+void _Jv_FinalizeString (jobject str);
+
+/* Return approximation of total size of heap.  */
+long _Jv_GCTotalMemory (void);
+/* Return approximation of total free memory.  */
+long _Jv_GCFreeMemory (void);
+
+/* Set initial heap size.  If SIZE==0, ignore.  Should be run before
+   _Jv_InitGC.  Not required to have any actual effect.  */
+void _Jv_GCSetInitialHeapSize (size_t size);
+
+/* Set maximum heap size.  If SIZE==0, unbounded.  Should be run
+   before _Jv_InitGC.  Not required to have any actual effect.  */
+void _Jv_GCSetMaximumHeapSize (size_t size);
+
+/* External interface to setting the heap size.  Parses ARG (a number
+   which can optionally have "k" or "m" appended and calls
+   _Jv_GCSetInitialHeapSize.  */
+void _Jv_SetInitialHeapSize (const char *arg);
+
+/* External interface to setting the maximum heap size.  Parses ARG (a
+   number which can optionally have "k" or "m" appended and calls
+   _Jv_GCSetMaximumHeapSize.  */
+void _Jv_SetMaximumHeapSize (const char *arg);
+
+/* Free the method cache, if one was allocated.  This is only called
+   during thread deregistration.  */
+void _Jv_FreeMethodCache ();
+
+/* Set the stack size for threads.  Parses ARG, a number which can 
+   optionally have "k" or "m" appended.  */
+void _Jv_SetStackSize (const char *arg);
+
+extern "C" void JvRunMain (jclass klass, int argc, const char **argv);
+void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, 
+		  bool is_jar);
+
+void _Jv_RunMain (struct _Jv_VMInitArgs *vm_args, jclass klass,
+                  const char *name, int argc, const char **argv, bool is_jar);
+
+// Delayed until after _Jv_AllocRawObj is declared.
+inline _Jv_VTable *
+_Jv_VTable::new_vtable (int count)
+{
+  size_t size = sizeof(_Jv_VTable) + (count - 1) * vtable_elt_size ();
+  return (_Jv_VTable *) _Jv_AllocRawObj (size);
+}
+
+// Determine if METH gets an entry in a VTable.
+static inline jboolean _Jv_isVirtualMethod (_Jv_Method *meth)
+{
+  using namespace java::lang::reflect;
+  return (((meth->accflags & (Modifier::STATIC | Modifier::PRIVATE)) == 0)
+          && meth->name->first() != '<');
+}
+
+// This function is used to determine the hash code of an object.
+inline jint
+_Jv_HashCode (jobject obj)
+{
+  // This was chosen to yield relatively well distributed results on
+  // both 32- and 64-bit architectures.  Note 0x7fffffff is prime.
+  // FIXME: we assume sizeof(long) == sizeof(void *).
+  return (jint) ((unsigned long) obj % 0x7fffffff);
+}
+
+// Return a raw pointer to the elements of an array given the array
+// and its element type.  You might think we could just pick a single
+// array type and use elements() on it, but we can't because we must
+// account for alignment of the element type.  When ARRAY is null, we
+// obtain the number of bytes taken by the base part of the array.
+inline char *
+_Jv_GetArrayElementFromElementType (jobject array,
+				    jclass element_type)
+{
+  char *elts;
+  if (element_type == JvPrimClass (byte))
+    elts = (char *) elements ((jbyteArray) array);
+  else if (element_type == JvPrimClass (short))
+    elts = (char *) elements ((jshortArray) array);
+  else if (element_type == JvPrimClass (int))
+    elts = (char *) elements ((jintArray) array);
+  else if (element_type == JvPrimClass (long))
+    elts = (char *) elements ((jlongArray) array);
+  else if (element_type == JvPrimClass (boolean))
+    elts = (char *) elements ((jbooleanArray) array);
+  else if (element_type == JvPrimClass (char))
+    elts = (char *) elements ((jcharArray) array);
+  else if (element_type == JvPrimClass (float))
+    elts = (char *) elements ((jfloatArray) array);
+  else if (element_type == JvPrimClass (double))
+    elts = (char *) elements ((jdoubleArray) array);
+  else
+    elts = (char *) elements ((jobjectArray) array);
+  return elts;
+}
+
+extern "C" void _Jv_ThrowBadArrayIndex (jint bad_index)
+  __attribute__((noreturn));
+extern "C" void _Jv_ThrowNullPointerException (void)
+  __attribute__((noreturn));
+extern "C" void _Jv_ThrowNoSuchMethodError (void)
+  __attribute__((noreturn));
+extern "C" void _Jv_ThrowNoSuchFieldError (int)
+  __attribute__((noreturn));
+extern "C" jobject _Jv_NewArray (jint type, jint size)
+  __attribute__((__malloc__));
+extern "C" jobject _Jv_NewMultiArray (jclass klass, jint dims, ...)
+  __attribute__((__malloc__));
+extern "C" void *_Jv_CheckCast (jclass klass, jobject obj);
+extern "C" void *_Jv_LookupInterfaceMethod (jclass klass, Utf8Const *name,
+                                           Utf8Const *signature);
+extern "C" void *_Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface, 
+                                               int meth_idx);
+extern "C" void _Jv_CheckArrayStore (jobject array, jobject obj);
+extern "C" void _Jv_RegisterClass (jclass klass);
+extern "C" void _Jv_RegisterClasses (const jclass *classes);
+extern "C" void _Jv_RegisterClasses_Counted (const jclass *classes,
+					     size_t count);
+extern "C" void _Jv_RegisterResource (void *vptr);
+extern void _Jv_UnregisterClass (_Jv_Utf8Const*, java::lang::ClassLoader*);
+
+extern "C" jobject _Jv_UnwrapJNIweakReference (jobject);
+
+extern jclass _Jv_FindClass (_Jv_Utf8Const *name,
+			     java::lang::ClassLoader *loader);
+
+extern jclass _Jv_FindClassNoException (_Jv_Utf8Const *name,
+			     java::lang::ClassLoader *loader);
+
+extern jclass _Jv_FindClassFromSignature (char *,
+					  java::lang::ClassLoader *loader,
+					  char ** = NULL);
+
+extern jclass _Jv_FindClassFromSignatureNoException (char *,
+					  java::lang::ClassLoader *loader,
+					  char ** = NULL);
+
+extern void _Jv_GetTypesFromSignature (jmethodID method,
+				       jclass declaringClass,
+				       JArray<jclass> **arg_types_out,
+				       jclass *return_type_out);
+
+extern jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass,
+				 jint flags);
+
+extern jobject _Jv_CallAnyMethodA (jobject obj, jclass return_type,
+				   jmethodID meth, jboolean is_constructor,
+				   JArray<jclass> *parameter_types,
+				   jobjectArray args,
+				   jclass iface = NULL);
+
+union jvalue;
+extern void _Jv_CallAnyMethodA (jobject obj,
+				jclass return_type,
+				jmethodID meth,
+				jboolean is_constructor,
+				jboolean is_virtual_call,
+				JArray<jclass> *parameter_types,
+				jvalue *args,
+				jvalue *result,
+				jboolean is_jni_call = true,
+				jclass iface = NULL);
+
+extern jobject _Jv_NewMultiArray (jclass, jint ndims, jint* dims)
+  __attribute__((__malloc__));
+
+extern "C" void _Jv_ThrowAbstractMethodError () __attribute__((__noreturn__));
+
+/* Checked divide subroutines. */
+extern "C"
+{
+  jint _Jv_divI (jint, jint);
+  jint _Jv_remI (jint, jint);
+  jlong _Jv_divJ (jlong, jlong);
+  jlong _Jv_remJ (jlong, jlong);
+}
+
+/* Get the number of arguments (cf. argc) or 0 if our argument
+   list was never initialized.  */
+extern int _Jv_GetNbArgs (void);
+
+/* Get the specified argument (cf. argv[index]) or "" if either
+   our argument list was never initialized or the specified index
+   is out of bounds.  */
+extern const char * _Jv_GetSafeArg (int index);
+
+/* Sets our argument list. Can be used by programs with non-standard
+   entry points.  */
+extern void _Jv_SetArgs (int argc, const char **argv);
+
+/* Get the name of the running executable.  */
+extern const char *_Jv_ThisExecutable (void);
+
+/* Return a pointer to a symbol in executable or loaded library.  */
+void *_Jv_FindSymbolInExecutable (const char *);
+
+/* Initialize JNI.  */
+extern void _Jv_JNI_Init (void);
+
+/* Get or set the per-thread JNIEnv used by the invocation API.  */
+_Jv_JNIEnv *_Jv_GetCurrentJNIEnv ();
+void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *);
+
+/* Free a JNIEnv. */
+void _Jv_FreeJNIEnv (_Jv_JNIEnv *);
+
+extern "C" void _Jv_JNI_PopSystemFrame (_Jv_JNIEnv *);
+_Jv_JNIEnv *_Jv_GetJNIEnvNewFrameWithLoader (::java::lang::ClassLoader *);
+
+struct _Jv_JavaVM;
+_Jv_JavaVM *_Jv_GetJavaVM (); 
+
+/* Get a JVMTI environment */
+struct _Jv_JVMTIEnv;
+_Jv_JVMTIEnv *_Jv_GetJVMTIEnv (void);
+
+/* Initialize JVMTI */
+extern void _Jv_JVMTI_Init (void);
+
+// Some verification functions from defineclass.cc.
+bool _Jv_VerifyFieldSignature (_Jv_Utf8Const*sig);
+bool _Jv_VerifyMethodSignature (_Jv_Utf8Const*sig);
+bool _Jv_VerifyClassName (unsigned char* ptr, _Jv_ushort length);
+bool _Jv_VerifyClassName (_Jv_Utf8Const *name);
+bool _Jv_VerifyIdentifier (_Jv_Utf8Const *);
+bool _Jv_ClassNameSamePackage (_Jv_Utf8Const *name1, _Jv_Utf8Const *name2);
+
+struct _Jv_core_chain
+{
+  int name_length;
+  const char *name;
+  int data_length;
+  const void *data;
+
+  struct _Jv_core_chain *next;
+};
+
+// This is called when new core data is loaded.
+extern void (*_Jv_RegisterCoreHook) (_Jv_core_chain *);
+
+_Jv_core_chain *_Jv_FindCore (_Jv_core_chain *node, jstring name);
+void _Jv_FreeCoreChain (_Jv_core_chain *chain);
+
+#ifdef ENABLE_JVMPI
+
+#include "jvmpi.h"
+
+extern void (*_Jv_JVMPI_Notify_OBJECT_ALLOC) (JVMPI_Event *event);
+extern void (*_Jv_JVMPI_Notify_THREAD_START) (JVMPI_Event *event);
+extern void (*_Jv_JVMPI_Notify_THREAD_END) (JVMPI_Event *event);
+#endif
+
+/* FIXME: this should really be defined in some more generic place */
+#define ROUND(V, A) (((((unsigned) (V))-1) | ((A)-1))+1)
+
+extern void _Jv_RegisterBootstrapPackages ();
+
+#define FLAG_BINARYCOMPAT_ABI (1<<31)  /* Class is built with the BC-ABI. */
+
+#define FLAG_BOOTSTRAP_LOADER (1<<30)  /* Used when defining a class that 
+					  should be loaded by the bootstrap
+					  loader.  */
+
+// These are used to find ABI versions we recognize.
+#define GCJ_CXX_ABI_VERSION (__GNUC__ * 100000 + __GNUC_MINOR__ * 1000)
+
+// This is the old-style BC version ID used by GCJ 4.0.0.
+#define OLD_GCJ_40_BC_ABI_VERSION (4 * 10000 + 0 * 10 + 5)
+
+// New style version IDs used by GCJ 4.0.1 and later.
+#define GCJ_40_BC_ABI_VERSION (4 * 100000 + 0 * 1000)
+
+inline bool
+_Jv_CheckABIVersion (unsigned long value)
+{
+  // We are compatible with GCJ 4.0.0 BC-ABI classes. This release used a
+  // different format for the version ID string.
+   if (value == OLD_GCJ_40_BC_ABI_VERSION)
+     return true;
+     
+  // The 20 low-end bits are used for the version number.
+  unsigned long version = value & 0xfffff;
+
+  if (value & FLAG_BINARYCOMPAT_ABI)
+    {
+      int abi_rev = version % 100;
+      int abi_ver = version - abi_rev;
+      if (abi_ver == GCJ_40_BC_ABI_VERSION && abi_rev <= 0)
+        return true;
+    }
+  else
+    // C++ ABI
+    return version == GCJ_CXX_ABI_VERSION;
+  
+  return false;
+}
+
+inline bool
+_Jv_ClassForBootstrapLoader (unsigned long value)
+{
+  return (value & FLAG_BOOTSTRAP_LOADER);
+}
+
+// It makes the source cleaner if we simply always define this
+// function.  If the interpreter is not built, it will never return
+// 'true'.
+extern inline jboolean
+_Jv_IsInterpretedClass (jclass c)
+{
+  return (c->accflags & java::lang::reflect::Modifier::INTERPRETED) != 0;
+}
+
+// Return true if the class was compiled with the BC ABI.
+extern inline jboolean
+_Jv_IsBinaryCompatibilityABI (jclass c)
+{
+  // There isn't really a better test for the ABI type at this point,
+  // that will work once the class has been registered.
+  return c->otable_syms || c->atable_syms || c->itable_syms;
+}
+
+// Returns whether the given class does not really exists (ie. we have no
+// bytecode) but still allows us to do some very conservative actions.
+// E.g. throwing a NoClassDefFoundError with the name of the missing
+// class.
+extern inline jboolean
+_Jv_IsPhantomClass (jclass c)
+{
+  return c->state == JV_STATE_PHANTOM;
+}
+
+// A helper function defined in prims.cc.
+char* _Jv_PrependVersionedLibdir (char* libpath);
+
+#endif /* __JAVA_JVM_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/jvmpi.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/jvmpi.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/jvmpi.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/jvmpi.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,227 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+/* Note: this file must be compilable by the C compiler (for now,
+   assuming GNU C is ok).  This means you must never use `//'
+   comments, and all C++-specific code must be conditional on
+   __cplusplus.  */
+
+#ifndef __GCJ_JVMPI_H__
+#define __GCJ_JVMPI_H__
+
+#include <jni.h>
+
+/* JVMPI version numbers.  FIXME: this is a semi-random number.  The
+   documentation doesn't say what it should be.  */
+#define JVMPI_VERSION_1 0x00020001
+
+/* JVMPI return codes.  FIXME: These are semi-random numbers.  The
+   documentation doesn't say what they should be.  */
+#define JVMPI_SUCCESS       0
+#define JVMPI_FAIL          1
+#define JVMPI_NOT_AVAILABLE 2
+
+/* An opaque pointer representing an object ID.  */
+struct _jobjectID;
+typedef struct _jobjectID * jobjectID;       
+
+typedef struct
+{
+  /* Source line number.  */
+  jint lineno;
+  /* Method being executed.  */
+  jmethodID method_id;
+} JVMPI_CallFrame;
+
+typedef struct 
+{
+  JNIEnv *env_id;
+  /* Number of frames in the call trace.  */
+  jint num_frames;
+  /* An array of frames representing the trace.  Callees first.  */
+  JVMPI_CallFrame *frames;
+} JVMPI_CallTrace;
+
+typedef struct
+{
+  /* Name of the field.  */
+  char *field_name;
+  /* Signature of the field.  */
+  char *field_signature;
+} JVMPI_Field;
+
+/* The documentation doesn't actually specify what the
+   JVMPI_DUMP_LEVEL macros should be defined to.  Here's a reasonable
+   guess.  */
+#define JVMPI_DUMP_LEVEL_0 0
+#define JVMPI_DUMP_LEVEL_1 1
+#define JVMPI_DUMP_LEVEL_2 2
+#define JVMPI_DUMP_LEVEL_3 3
+
+typedef struct
+{
+  /* One of JVMPI_DUMP_LEVEL_0, JVMPI_DUMP_LEVEL_1 or
+     JVMPI_DUMP_LEVEL_2.  */
+  jint heap_dump_level;
+} JVMPI_HeapDumpArg;
+
+typedef struct
+{
+  /* Offset from the beginning of the method.  */
+  jint offset;
+  /* Line number from the beginning of the source file.  */
+  jint lineno;
+} JVMPI_Lineno;
+
+typedef struct
+{
+  /* Name of the method.  */
+  char *method_name;
+  /* Signature of the method.  */
+  char *method_signature;
+  /* Start line number from the beginning of the source file.  */
+  jint start_lineno;
+  /* End line number from the beginning of the source file.  */
+  jint end_lineno;
+  /* The method ID.  */
+  jmethodID method_id;
+} JVMPI_Method;
+
+/* An opaque pointer representing a raw monitor.  */
+struct _JVMPI_RawMonitor;
+typedef struct _JVMPI_RawMonitor *JVMPI_RawMonitor;
+
+/* JVMPI event codes.  FIXME: These are semi-random numbers.  The
+   documentation doesn't say what they should be.  */
+#define JVMPI_EVENT_ARENA_DELETE                   0
+#define JVMPI_EVENT_ARENA_NEW                      1
+#define JVMPI_EVENT_CLASS_LOAD                     2
+#define JVMPI_EVENT_CLASS_LOAD_HOOK                3
+#define JVMPI_EVENT_CLASS_UNLOAD                   4
+#define JVMPI_EVENT_COMPILED_METHOD_LOAD           5
+#define JVMPI_EVENT_COMPILED_METHOD_UNLOAD         6
+#define JVMPI_EVENT_DATA_DUMP_REQUEST              7
+#define JVMPI_EVENT_DATA_RESET_REQUEST             8
+#define JVMPI_EVENT_GC_FINISH                      9
+#define JVMPI_EVENT_GC_START                      10
+#define JVMPI_EVENT_HEAP_DUMP                     11
+#define JVMPI_EVENT_JNI_GLOBALREF_ALLOC           12
+#define JVMPI_EVENT_JNI_GLOBALREF_FREE            13
+#define JVMPI_EVENT_JNI_WEAK_GLOBALREF_ALLOC      14
+#define JVMPI_EVENT_JNI_WEAK_GLOBALREF_FREE       15
+#define JVMPI_EVENT_JVM_INIT_DONE                 16
+#define JVMPI_EVENT_JVM_SHUT_DOWN                 17
+#define JVMPI_EVENT_METHOD_ENTRY                  18
+#define JVMPI_EVENT_METHOD_ENTRY2                 19
+#define JVMPI_EVENT_METHOD_EXIT                   20
+#define JVMPI_EVENT_MONITOR_CONTENDED_ENTER       21
+#define JVMPI_EVENT_MONITOR_CONTENDED_ENTERED     22
+#define JVMPI_EVENT_MONITOR_CONTENDED_EXIT        23
+#define JVMPI_EVENT_MONITOR_DUMP                  24
+#define JVMPI_EVENT_MONITOR_WAIT                  25
+#define JVMPI_EVENT_MONITOR_WAITED                26
+#define JVMPI_EVENT_OBJECT_ALLOC                  27
+#define JVMPI_EVENT_OBJECT_DUMP                   28
+#define JVMPI_EVENT_OBJECT_FREE                   29
+#define JVMPI_EVENT_OBJECT_MOVE                   30
+#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTER   31
+#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTERED 32
+#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_EXIT    33
+#define JVMPI_EVENT_THREAD_END                    34
+#define JVMPI_EVENT_THREAD_START                  35
+#define JVMPI_EVENT_INSTRUCTION_START             36
+
+
+typedef struct
+{
+  /* Event type.  */
+  jint event_type;
+
+  /* Evn where this event occurred.  */
+  JNIEnv *env_id;
+
+  union 
+  {
+    struct
+    {
+      char *class_name;
+      char *source_name;
+      jint num_interfaces;
+      jint num_methods;
+      JVMPI_Method *methods;
+      jint num_static_fields;
+      JVMPI_Field *statics;
+      jint num_instance_fields;
+      JVMPI_Field *instances;
+      jobjectID class_id;
+    } class_load;
+
+    struct
+    {
+      jobjectID class_id;
+    } class_unload;
+
+    struct
+    {
+      jint arena_id;
+      jobjectID class_id;
+      jint is_array;
+      jint size;
+      jobjectID obj_id;
+    } obj_alloc;
+
+    struct
+    {
+      char *thread_name;
+      char *group_name;
+      char *parent_name;
+      jobjectID thread_id;
+      JNIEnv *thread_env_id;
+    } thread_start;
+
+  } u;
+
+} JVMPI_Event;
+
+typedef struct
+{
+  /* JVMPI version number.  */
+  jint version;
+  
+  /* Implemented by the user...  */
+  void (*NotifyEvent) (JVMPI_Event *event);
+  
+  /* Implemented by the runtime...  */
+  jint (*EnableEvent) (jint event_type, void *arg);
+  jint (*DisableEvent) (jint event_type, void *arg);
+  jint (*RequestEvent) (jint event_type, void *arg);
+  void (*GetCallTrace) (JVMPI_CallTrace *trace, jint depth);
+  void (*ProfilerExit) (jint);
+  JVMPI_RawMonitor (*RawMonitorCreate) (char *lock_name);
+  void (*RawMonitorEnter) (JVMPI_RawMonitor lock_id);
+  void (*RawMonitorExit) (JVMPI_RawMonitor lock_id);
+  void (*RawMonitorWait) (JVMPI_RawMonitor lock_id, jlong ms);
+  void (*RawMonitorNotifyAll) (JVMPI_RawMonitor lock_id);
+  void (*RawMonitorDestroy) (JVMPI_RawMonitor lock_id);
+  jlong (*GetCurrentThreadCpuTime) (void);
+  void (*SuspendThread) (JNIEnv *env);
+  void (*ResumeThread) (JNIEnv *env);
+  jint (*GetThreadStatus) (JNIEnv *env);
+  jboolean (*ThreadHasRun) (JNIEnv *env);
+  jint (*CreateSystemThread) (char *name, jint priority, void (*f) (void *));
+  void (*SetThreadLocalStorage) (JNIEnv *env_id, void *ptr);
+  void *(*GetThreadLocalStorage) (JNIEnv *env_id);
+  void (*DisableGC) (void);
+  void (*EnableGC) (void);
+  void (*RunGC) (void);
+  jobjectID (*GetThreadObject) (JNIEnv *env);
+  jobjectID (*GetMethodClass) (jmethodID mid);
+  
+} JVMPI_Interface;
+
+#endif /* __GCJ_JVMPI_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/jvmti-int.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/jvmti-int.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/jvmti-int.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/jvmti-int.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,85 @@
+/* jvmti-int.h -- Internal JVMTI definitions
+   Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License. */
+
+#ifndef __GCJ_JVTMI_INT_H__
+#define __GCJ_JVMTI_INT_H__
+
+/* A macro to map jvmtiEvent to an index in thread[] and enabled[]
+   in the jvmtiEnv. This will only work if the order of events listed
+   in jvmtiEvent and jvmtiEventCallbacks is kept the same (which should
+   not be a problem). */
+#define EVENT_INDEX(jvmtievent) (int)(jvmtievent - JVMTI_EVENT_VM_INIT)
+
+/* A few globals to help limit the impact of JVMTI on normal operations.
+   False means no JVMTI environment requested that event type. */
+namespace JVMTI
+{
+  extern bool VMInit;
+  extern bool VMDeath;
+  extern bool ThreadStart;
+  extern bool ThreadEnd;
+  extern bool ClassFileLoadHook;
+  extern bool ClassLoad;
+  extern bool ClassPrepare;
+  extern bool VMStart;
+  extern bool Exception;
+  extern bool ExceptionCatch;
+  extern bool SingleStep;
+  extern bool FramePop;
+  extern bool Breakpoint;
+  extern bool FieldAccess;
+  extern bool FieldModification;
+  extern bool MethodEntry;
+  extern bool MethodExit;
+  extern bool NativeMethodBind;
+  extern bool CompiledMethodLoad;
+  extern bool CompiledMethodUnload;
+  extern bool DynamicCodeGenerated;
+  extern bool DataDumpRequest;
+  extern bool reserved72;
+  extern bool MonitorWait;
+  extern bool MonitorWaited;
+  extern bool MonitorContendedEnter;
+  extern bool MonitorContendedEntered;
+  extern bool reserved77;
+  extern bool reserved78;
+  extern bool reserved79;
+  extern bool reserved80;
+  extern bool GarbageCollectionStart;
+  extern bool GarbageCollectionFinish;
+  extern bool ObjectFree;
+  extern bool VMObjectAlloc;
+};
+
+/* A macro to test whether an event should be posted to JVMTI.*/
+#define JVMTI_REQUESTED_EVENT(Event) __builtin_expect (JVMTI::Event, false)
+
+/* Post the event to requesting JVMTI environments.
+
+   For speed, this function should only be called after 
+   JVMTI_REQUESTED_EVENT is checked. */
+extern void _Jv_JVMTI_PostEvent (jvmtiEvent type, jthread event_thread,				 ...);
+#endif /* __GCJ_JVMTI_INT_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/jvmti_md.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/jvmti_md.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/jvmti_md.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/jvmti_md.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,58 @@
+/* jvmti_md.h
+   Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License. */
+
+#ifndef __GCJ_JVMTI_MD_H__
+#define __GCJ_JVMTI_MD_H__
+
+#ifdef __GCJ_JNI_IMPL__
+
+/* If __GCJ_JNI_IMPL__ is defined, then we assume that we're building
+   libgcj itself, and we include functions which should not be exposed
+   to JVMTI users. */
+
+/* The number of event slots needed to keep track of event reporting
+   constraints for an environment. This will only work if the order of
+   events listed in jvmtiEvent and jvmtiEventCallbacks is kept the same
+   (which should not be a problem). */
+#define EVENT_SLOTS \
+  (int)(JVMTI_EVENT_VM_OBJECT_ALLOC - JVMTI_EVENT_VM_INIT + 1)
+
+/* Contents of the jvmtiEnv; but only inside the implementation. */
+#define _CLASSPATH_JVMTIENV_CONTENTS					\
+  /* Event handlers registered via SetEventCallbacks */			\
+  jvmtiEventCallbacks callbacks;					\
+									\
+  /* Array of event thread for which to report event. */		\
+  /* NULL means all threads. One for each callback.   */		\
+  jthread thread[EVENT_SLOTS];						\
+  									\
+  /* Array of notification modes for callbacks. */			\
+  /* One for each callback.                     */			\
+  bool enabled[EVENT_SLOTS];
+
+#endif /* __GCJ_JNI_IMPL__ */
+
+#endif /* __GCJ_JVMTI_MD_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/mips-signal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/mips-signal.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/mips-signal.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/mips-signal.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,83 @@
+// mips-signal.h - Catch runtime signals and turn them into exceptions
+// on an mips based Linux system. 
+
+/* Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2006
+   Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+/* Adapted from sparc-signal.h and powerpc-signal.h
+   by David Daney <ddaney at avtrex.com> */
+
+#ifndef JAVA_SIGNAL_H
+#define JAVA_SIGNAL_H 1
+
+#include <signal.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+/* #include <asm/ucontext.h> structures we use are here but clash with
+   sys/ucontext.h included by java-signal.h from prims.cc */
+
+#define HANDLE_SEGV 1
+#define HANDLE_FPE 1
+
+/* The third parameter to the signal handler points to something with
+ * this structure defined in asm/ucontext.h, but the name clashes with
+ * struct ucontext from sys/ucontext.h so this private copy is used. */
+typedef struct _sig_ucontext {
+    unsigned long	  uc_flags;
+    struct _sig_ucontext  *uc_link;
+    stack_t		  uc_stack;
+    struct sigcontext uc_mcontext;
+    sigset_t	  uc_sigmask;
+} sig_ucontext_t;
+
+#define SIGNAL_HANDLER(_name) \
+static void _name (int _dummy __attribute__ ((__unused__)), \
+		   siginfo_t *_info __attribute__ ((__unused__)), \
+		   void *_arg __attribute__ ((__unused__)))
+
+/*
+ *  MIPS leaves pc pointing at the faulting instruction, but the
+ *  unwinder expects it to point to the following instruction
+ */
+
+#define MAKE_THROW_FRAME(_exception) \
+do                                   \
+{                                    \
+  ((sig_ucontext_t *)_arg)->uc_mcontext.sc_pc += 4;      \
+  (void)_dummy;                      \
+  (void)_info;                       \
+}                                    \
+while (0)
+
+#define INIT_SEGV                            \
+do                                           \
+  {                                          \
+    struct sigaction act;                    \
+    act.sa_sigaction = catch_segv;           \
+    act.sa_flags = SA_SIGINFO | SA_NODEFER;  \
+    sigemptyset (&act.sa_mask);              \
+    sigaction(SIGSEGV, &act, NULL);          \
+  }                                          \
+while (0)
+
+#define INIT_FPE                             \
+do                                           \
+  {                                          \
+    struct sigaction act;                    \
+    act.sa_sigaction = catch_fpe;            \
+    act.sa_flags = SA_SIGINFO | SA_NODEFER;  \
+    sigemptyset (&act.sa_mask);              \
+    sigaction(SIGFPE, &act, NULL);           \
+  }                                          \
+while (0)
+
+#undef HANDLE_DIVIDE_OVERFLOW
+
+#endif /* JAVA_SIGNAL_H */
+  

Added: llvm-gcc-4.2/trunk/libjava/include/no-gc.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/no-gc.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/no-gc.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/no-gc.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,21 @@
+// -*- c++ -*-
+// no-gc.h - Defines for no garbage collector.
+
+/* Copyright (C) 1998, 1999, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JV_NO_GC__
+#define __JV_NO_GC__
+
+// Suspend the given thread. This includes suspending the calling thread.
+extern "C" void _Jv_SuspendThread (_Jv_Thread_t *);
+
+// Resume a suspended thread.
+extern "C" void _Jv_ResumeThread (_Jv_Thread_t *);
+
+#endif /* __JV_NO_GC__ */

Added: llvm-gcc-4.2/trunk/libjava/include/no-threads.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/no-threads.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/no-threads.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/no-threads.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,162 @@
+// -*- c++ -*-
+// no-threads.h - Defines for using no threads.
+
+/* Copyright (C) 1998, 1999, 2004, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JV_NO_THREADS__
+#define __JV_NO_THREADS__
+
+#include "config.h"
+
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+//
+// Typedefs.
+//
+
+typedef int _Jv_ConditionVariable_t;
+typedef int _Jv_Mutex_t;
+typedef void _Jv_ThreadStartFunc (java::lang::Thread *);
+
+//
+// Declarations
+//
+
+class _Jv_Thread_t { };
+
+//
+// Condition variables.
+//
+
+inline void
+_Jv_CondInit (_Jv_ConditionVariable_t *)
+{
+}
+
+// Waiting is ok provided there is a timeout.  Otherwise we will just
+// wait forever.
+inline int
+_Jv_CondWait (_Jv_ConditionVariable_t *, _Jv_Mutex_t *,
+	      jlong millis, jint nanos)
+{
+  if (millis == 0 && nanos == 0)
+    JvFail ("_Jv_CondWait without timeout");
+
+#ifdef HAVE_SLEEP
+  int seconds = millis / 1000;
+  if (seconds > 0)
+    sleep (seconds);
+#endif
+
+  return 0;
+}
+
+inline int
+_Jv_CondNotify (_Jv_ConditionVariable_t *, _Jv_Mutex_t *)
+{
+  // It is ok to notify -- it just has no effect.
+  return 0;
+}
+
+inline int
+_Jv_CondNotifyAll (_Jv_ConditionVariable_t *, _Jv_Mutex_t *)
+{
+  // It is ok to notify -- it just has no effect.
+  return 0;
+}
+
+
+//
+// Mutexes.
+//
+
+inline int _Jv_MutexCheckMonitor (_Jv_Mutex_t *)
+{
+  return 0;
+}
+
+inline void
+_Jv_MutexInit (_Jv_Mutex_t *)
+{
+}
+
+inline int
+_Jv_MutexLock (_Jv_Mutex_t *)
+{
+  return 0;
+}
+
+inline int
+_Jv_MutexUnlock (_Jv_Mutex_t *)
+{
+  return 0;
+}
+
+
+//
+// Thread creation and manipulation.
+//
+
+inline void
+_Jv_InitThreads (void)
+{
+}
+
+_Jv_Thread_t *
+_Jv_ThreadInitData (java::lang::Thread *);
+
+inline void
+_Jv_ThreadDestroyData (_Jv_Thread_t *)
+{
+}
+
+inline java::lang::Thread *
+_Jv_ThreadCurrent (void)
+{
+  extern java::lang::Thread *_Jv_OnlyThread;
+  return _Jv_OnlyThread;
+}
+
+inline void
+_Jv_ThreadYield (void)
+{
+}
+
+inline void
+_Jv_ThreadSetPriority (_Jv_Thread_t *, jint)
+{
+}
+
+inline void
+_Jv_ThreadRegister (_Jv_Thread_t *)
+{
+}
+
+inline void
+_Jv_ThreadUnRegister (void)
+{
+}
+
+void _Jv_ThreadStart (java::lang::Thread *, _Jv_Thread_t *,
+		      _Jv_ThreadStartFunc *meth);
+
+inline void
+_Jv_ThreadWait (void)
+{
+}
+
+inline void
+_Jv_ThreadInterrupt (_Jv_Thread_t *)
+{
+}
+
+#endif /* __JV_NO_THREADS__ */

Added: llvm-gcc-4.2/trunk/libjava/include/pa-signal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/pa-signal.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/pa-signal.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/pa-signal.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,61 @@
+// pa-signal.h - Catch runtime signals and turn them into exceptions.
+
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef JAVA_SIGNAL_H
+#define JAVA_SIGNAL_H 1
+
+#include <signal.h>
+#include <ucontext.h>
+#include <sys/syscall.h>
+
+#define HANDLE_SEGV 1
+#define HANDLE_FPE 1
+
+#define SIGNAL_HANDLER(_name) 					\
+static void _Jv_##_name (int _dummy, siginfo_t *_info, void *arg)
+
+#define MAKE_THROW_FRAME(_exception)				\
+do								\
+{								\
+  struct ucontext *uc = (struct ucontext *)arg;			\
+  struct sigcontext *sc = &uc->uc_mcontext;			\
+  (void)_dummy;							\
+  (void)_info;							\
+  /* Advance the program counter so that it is after the start 	\
+     of the instruction:  the exception handler expects		\
+     the PC to point to the instruction after a call. */	\
+  sc->sc_iaoq[0] = sc->sc_iaoq[1];				\
+  sc->sc_iaoq[1] += 4;						\
+}								\
+while (0)
+
+#define INIT_SEGV						\
+do								\
+  {								\
+    struct sigaction act;					\
+    act.sa_sigaction = _Jv_catch_segv;      			\
+    sigemptyset (&act.sa_mask);					\
+    act.sa_flags = SA_SIGINFO;	       				\
+    syscall (SYS_rt_sigaction, SIGSEGV, &act, NULL, _NSIG / 8);	\
+  }								\
+while (0)  
+
+#define INIT_FPE						\
+do								\
+  { 								\
+    struct sigaction act;					\
+    act.sa_sigaction = _Jv_catch_fpe;				\
+    sigemptyset (&act.sa_mask);					\
+    act.sa_flags = SA_SIGINFO;		       			\
+    syscall (SYS_rt_sigaction, SIGFPE, &act, NULL, _NSIG / 8);	\
+  }								\
+while (0)  
+
+#endif /* JAVA_SIGNAL_H */

Added: llvm-gcc-4.2/trunk/libjava/include/posix-threads.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/posix-threads.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/posix-threads.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/posix-threads.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,377 @@
+// -*- c++ -*-
+// posix-threads.h - Defines for using POSIX threads.
+
+/* Copyright (C) 1998, 1999, 2001, 2003, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JV_POSIX_THREADS__
+#define __JV_POSIX_THREADS__
+
+// NOTE: This file may only reference those pthread functions which
+// are known not to be overridden by the Boehm GC.  If in doubt, scan
+// boehm-gc/gc.h.  This is yucky but lets us avoid including gc.h
+// everywhere (which would be truly yucky).
+
+#include <pthread.h>
+#include <sched.h>
+
+//
+// Typedefs.
+//
+
+typedef struct _Jv_Thread_t
+{
+  // Flag values are defined in implementation.
+  int flags;
+
+  // Actual thread id.
+  pthread_t thread;
+  
+  // Java Thread object.
+  java::lang::Thread *thread_obj;
+  
+  // Condition variable and corresponding mutex, used to implement the
+  // interruptable wait/notify mechanism.
+  pthread_cond_t wait_cond;
+  pthread_mutex_t wait_mutex;
+
+  // Next thread for Condition Variable wait-list chain.
+  _Jv_Thread_t *next;
+  
+} _Jv_Thread_t;
+
+typedef void _Jv_ThreadStartFunc (java::lang::Thread *);
+
+// Condition Variables used to implement wait/notify/sleep/interrupt.
+typedef struct
+{
+  // Linked list of Threads that are waiting to be notified.
+  _Jv_Thread_t *first;
+
+} _Jv_ConditionVariable_t;
+
+typedef struct
+{
+  // For compatibility, simplicity, and correctness, we do not use the native
+  // pthreads recursive mutex implementation, but simulate them instead.
+
+  // Mutex the thread holds the entire time this mutex is held. 
+  pthread_mutex_t mutex;
+
+  // Thread holding this mutex.
+  pthread_t owner;
+
+  // Number of times mutex is held (lock depth).  If 0, the lock is not held.
+  int count;
+} _Jv_Mutex_t;
+
+// This is a convenience function used only by the pthreads thread
+// implementation.  This is slow, but that's too bad -- we need to do
+// the checks for correctness.  It might be nice to be able to compile
+// this out.  Returns 0 if the lock is held by the current thread, and
+// 1 otherwise.
+inline int
+_Jv_MutexCheckMonitor (_Jv_Mutex_t *mu)
+{
+  return (mu->owner != pthread_self());
+}
+
+// Type identifying a POSIX thread.
+typedef pthread_t _Jv_ThreadDesc_t;
+
+inline _Jv_ThreadDesc_t
+_Jv_GetPlatformThreadID(_Jv_Thread_t *t)
+{
+  return t->thread;
+}
+
+//
+// Condition variables.
+//
+
+int _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu,
+		  jlong millis, jint nanos);
+		  
+int _Jv_CondNotify (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu);
+
+int _Jv_CondNotifyAll (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu);
+
+inline void
+_Jv_CondInit (_Jv_ConditionVariable_t *cv)
+{
+  cv->first = 0;
+}
+
+//
+// Mutexes.
+//
+
+#ifdef LOCK_DEBUG
+# include <stdio.h>
+#endif
+
+inline void
+_Jv_MutexInit (_Jv_Mutex_t *mu)
+{
+# ifdef LOCK_DEBUG /* Assumes Linuxthreads */
+  pthread_mutexattr_t attr;
+  pthread_mutexattr_init(&attr);
+  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
+  pthread_mutex_init (&mu->mutex, &attr);
+# else
+  pthread_mutex_init (&mu->mutex, 0);
+# endif
+
+  mu->count = 0;
+  mu->owner = 0;
+}
+
+inline int
+_Jv_MutexLock (_Jv_Mutex_t *mu)
+{
+  pthread_t self = pthread_self ();
+  if (mu->owner == self)
+    {
+      mu->count++;
+    }
+  else
+    {
+#     ifdef LOCK_DEBUG
+	int result = pthread_mutex_lock (&mu->mutex);
+	if (0 != result)
+	  {
+	    fprintf(stderr, "Pthread_mutex_lock returned %d\n", result);
+	    for (;;) {}
+	  }
+#     else
+        pthread_mutex_lock (&mu->mutex);
+#     endif
+      mu->count = 1;
+      mu->owner = self;
+    }
+  return 0;
+}
+
+inline int
+_Jv_MutexUnlock (_Jv_Mutex_t *mu)
+{
+  if (_Jv_MutexCheckMonitor (mu))
+    {
+#     ifdef LOCK_DEBUG
+	fprintf(stderr, "_Jv_MutexUnlock: Not owner\n");
+	for (;;) {}
+#     endif
+      return 1;
+    }
+    
+  mu->count--;
+
+  if (mu->count == 0)
+    {
+      mu->owner = 0;
+#     ifdef LOCK_DEBUG
+	int result = pthread_mutex_unlock (&mu->mutex);
+	if (0 != result)
+	  {
+	    fprintf(stderr, "Pthread_mutex_unlock returned %d\n", result);
+	    for (;;) {}
+	  }
+#     else
+        pthread_mutex_unlock (&mu->mutex);
+#     endif
+    }
+  return 0;
+}
+
+#ifndef LINUX_THREADS
+
+// pthread_mutex_destroy does nothing on Linux and it is a win to avoid
+// defining this macro.
+
+#define _Jv_HaveMutexDestroy
+
+inline void 
+_Jv_MutexDestroy (_Jv_Mutex_t *mu)
+{
+  pthread_mutex_destroy (&mu->mutex);
+}
+
+#endif /* LINUX_THREADS */
+
+//
+// Thread creation and manipulation.
+//
+
+void _Jv_InitThreads (void);
+
+_Jv_Thread_t *_Jv_ThreadInitData (java::lang::Thread *thread);
+void _Jv_ThreadDestroyData (_Jv_Thread_t *data);
+
+inline java::lang::Thread *
+_Jv_ThreadCurrent (void)
+{
+  extern pthread_key_t _Jv_ThreadKey;
+  return (java::lang::Thread *) pthread_getspecific (_Jv_ThreadKey);
+}
+
+#ifdef JV_HASH_SYNCHRONIZATION
+// Should be specialized to just load the "current thread" register
+// on platforms that support it.   Speed is of the essence.  The value
+// of the descriptor is not, so long as there is a one-to-one correspondence
+// to threads.
+
+
+#ifdef __ia64__
+
+typedef size_t _Jv_ThreadId_t;
+
+register size_t _Jv_self __asm__("r13");
+	// For linux_threads this is really a pointer to its thread data
+	// structure.  We treat it as opaque.  That should also work
+	// on other operating systems that follow the ABI standard.
+
+// This should become the prototype for machines that maintain a thread
+// pointer in a register.
+inline _Jv_ThreadId_t
+_Jv_ThreadSelf (void)
+{
+  return _Jv_self;
+}
+
+#define JV_SELF_DEFINED
+
+#endif /* __ia64__ */
+
+#ifdef __alpha__
+
+typedef void *_Jv_ThreadId_t;
+
+inline _Jv_ThreadId_t
+_Jv_ThreadSelf (void)
+{
+  return __builtin_thread_pointer ();
+}
+
+#define JV_SELF_DEFINED
+
+#endif /* __alpha__ */
+
+#if defined(SLOW_PTHREAD_SELF)
+
+#include "sysdep/locks.h"
+
+typedef pthread_t _Jv_ThreadId_t;
+
+// E.g. on X86 Linux, pthread_self() is too slow for our purpose.
+// Instead we maintain a cache based on the current sp value.
+// This is similar to what's done for thread local allocation in the
+// GC, only far simpler.
+// This code should probably go away when Linux/X86 starts using a
+// segment register to hold the thread id.
+# define LOG_THREAD_SPACING 12
+			// If two thread pointer values are closer than
+			// 1 << LOG_THREAD_SPACING, we assume they belong
+			// to the same thread.
+# define SELF_CACHE_SIZE 1024
+# define SC_INDEX(sp) (((unsigned long)(sp) >> 19) & (SELF_CACHE_SIZE-1))
+		        // Mapping from sp value to cache index.
+			// Note that this is not in any real sense a hash
+			// function, since we need to be able to clear
+			// all possibly matching slots on thread startup.
+			// Thus all entries that might correspond to
+			// a given thread are intentionally contiguous.
+			// Works well with anything that allocates at least
+			// 512KB stacks.
+# define SC_CLEAR_MIN (-16)	// When starting a new thread, we clear
+# define SC_CLEAR_MAX 0		// all self cache entries between
+				// SC_INDEX(sp)+SC_CLEAR_MIN and
+				// SC_INDEX(sp)+SC_CLEAR_MAX to ensure
+				// we never see stale values.  The
+				// current values assume a downward
+				// growing stack of size <= 7.5 MB.
+# define BAD_HIGH_SP_VALUE ((size_t)(-1))
+
+extern volatile
+struct self_cache_entry {
+  size_t high_sp_bits;	// sp value >> LOG_THREAD_SPACING
+  pthread_t self;	// Corresponding thread
+} _Jv_self_cache[];
+
+void _Jv_Self_Cache_Init();
+
+_Jv_ThreadId_t
+_Jv_ThreadSelf_out_of_line(volatile self_cache_entry *sce,
+			   size_t high_sp_bits);
+  
+inline _Jv_ThreadId_t
+_Jv_ThreadSelf (void)
+{
+  int dummy;
+  size_t sp = (size_t)(&dummy);
+  unsigned h = SC_INDEX(sp);
+  volatile self_cache_entry *sce = _Jv_self_cache + h;
+  pthread_t candidate_self = sce -> self;  // Read must precede following one.
+  read_barrier();
+  if (sce -> high_sp_bits == sp >> LOG_THREAD_SPACING)
+    {
+      // The sce -> self value we read must be valid.  An intervening
+      // cache replacement by another thread would have first replaced
+      // high_sp_bits by something else, and it can't possibly change
+      // back without our intervention.
+      return candidate_self;
+    }
+  else
+    return _Jv_ThreadSelf_out_of_line(sce, sp >> LOG_THREAD_SPACING);
+}
+
+#define JV_SELF_DEFINED
+
+#endif /* SLOW_PTHREAD_SELF */
+
+#ifndef JV_SELF_DEFINED /* If all else fails, call pthread_self directly */
+
+typedef pthread_t _Jv_ThreadId_t;
+
+inline _Jv_ThreadId_t
+_Jv_ThreadSelf (void)
+{
+  return pthread_self();
+}
+
+#endif /* !JV_SELF_DEFINED */
+
+#endif /* JV_HASH_SYNCHRONIZATION */
+
+inline _Jv_Thread_t *
+_Jv_ThreadCurrentData (void)
+{
+  extern pthread_key_t _Jv_ThreadDataKey;
+  return (_Jv_Thread_t *) pthread_getspecific (_Jv_ThreadDataKey);
+}
+
+inline void
+_Jv_ThreadYield (void)
+{
+#ifdef HAVE_SCHED_YIELD
+  sched_yield ();
+#endif /* HAVE_SCHED_YIELD */
+}
+
+void _Jv_ThreadRegister (_Jv_Thread_t *data);
+void _Jv_ThreadUnRegister ();
+
+void _Jv_ThreadSetPriority (_Jv_Thread_t *data, jint prio);
+
+void _Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data,
+		      _Jv_ThreadStartFunc *meth);
+
+void _Jv_ThreadWait (void);
+
+void _Jv_ThreadInterrupt (_Jv_Thread_t *data);
+
+#endif /* __JV_POSIX_THREADS__ */

Added: llvm-gcc-4.2/trunk/libjava/include/posix.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/posix.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/posix.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/posix.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,195 @@
+// posix.h -- Helper functions for POSIX-flavored OSs.
+
+/* Copyright (C) 2000, 2002, 2003, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JV_POSIX_H__
+#define __JV_POSIX_H__
+
+/* Required on Tru64 UNIX V4/V5 so <sys/socket.h> defines prototypes of
+   socket functions with socklen_t instead of size_t.  This must be defined
+   early so <standards.h> defines the correct version of __PIIX.  */
+#define _POSIX_PII_SOCKET
+
+#include <time.h>
+#include <sys/types.h>
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <fcntl.h>
+
+/* The header file <sys/rw_lock.h> needs to be included before javaprims.h
+   on HP-UX 11 to avoid a compilation error.  */
+#ifdef HAVE_SYS_RW_LOCK_H
+#include <sys/rw_lock.h>
+#endif
+
+#include <gcj/cni.h>
+#include <java/util/Properties.h>
+
+// Prefix and suffix for shared libraries.
+#define _Jv_platform_solib_prefix "lib"
+#if defined(__APPLE__) && defined(__MACH__)
+#define _Jv_platform_solib_suffix ".dylib"
+#elif defined(HPUX) && defined(HP_PA)
+#define _Jv_platform_solib_suffix ".sl"
+#else
+#define _Jv_platform_solib_suffix ".so"
+#endif
+
+// Some POSIX systems don't have O_SYNC and O_DYSNC so we define them here.
+// Needed in java/io/natFileDescriptorPosix.cc.
+#if !defined (O_SYNC) && defined (O_FSYNC)
+#define O_SYNC O_FSYNC
+#endif
+#if !defined (O_DSYNC) && defined (O_FSYNC)
+#define O_DSYNC O_FSYNC
+#endif
+// If O_DSYNC is still not defined, use O_SYNC (needed for newlib)
+#if !defined (O_DSYNC) 
+#define O_DSYNC O_SYNC
+#endif
+
+// Separator for file name components.
+#define _Jv_platform_file_separator ((jchar) '/')
+// Separator for path components.
+#define _Jv_platform_path_separator ((jchar) ':')
+
+// List of names for `JNI_OnLoad'.
+#define _Jv_platform_onload_names { "JNI_OnLoad", NULL }
+
+// Type of libffi ABI used by JNICALL methods.  NOTE: This must agree
+// with the JNICALL definition in jni.h
+#define _Jv_platform_ffi_abi FFI_DEFAULT_ABI
+
+#ifndef DISABLE_JAVA_NET
+#include <java/net/InetAddress.h>
+#endif
+
+extern int _Jv_select (int n, fd_set *, fd_set *, fd_set *, struct timeval *);
+extern jlong _Jv_platform_gettimeofday ();
+extern jlong _Jv_platform_nanotime ();
+extern void _Jv_platform_initialize (void);
+extern void _Jv_platform_initProperties (java::util::Properties*);
+
+#ifdef JV_HASH_SYNCHRONIZATION
+#ifndef HAVE_USLEEP_DECL
+extern "C" int usleep (useconds_t useconds);
+#endif /* not HAVE_USLEEP_DECL */
+
+inline void
+_Jv_platform_usleep (unsigned long usecs)
+{
+  usleep (usecs);
+}
+#endif /* JV_HASH_SYNCHRONIZATION */
+
+#ifndef DISABLE_JAVA_NET
+
+#ifndef HAVE_SOCKLEN_T
+#define socklen_t int
+#endif
+
+static inline int
+_Jv_socket (int domain, int type, int protocol)
+{
+  return ::socket (domain, type, protocol);
+}
+
+#undef socket
+
+inline int
+_Jv_connect (jint fd, sockaddr *ptr, int len)
+{
+   return ::connect (fd, ptr, len);
+}
+
+#undef connect
+
+inline int
+_Jv_close (jint fd)
+{
+  return ::close (fd);
+}
+
+#undef close
+
+// Avoid macro definitions of bind from system headers, e.g. on
+// Solaris 7 with _XOPEN_SOURCE.  FIXME
+inline int
+_Jv_bind (int fd, struct sockaddr *addr, int addrlen)
+{
+  return ::bind (fd, addr, addrlen);
+}
+
+#undef bind
+
+// Same problem with accept on Tru64 UNIX with _POSIX_PII_SOCKET
+inline int
+_Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
+{
+  return ::accept (fd, addr, addrlen);
+}
+
+#undef accept
+
+inline int
+_Jv_listen (int fd, int backlog)
+{
+  return ::listen (fd, backlog);
+}
+
+#undef listen
+
+inline int
+_Jv_write(int s, void *buf, int len)
+{
+  return ::write (s, buf, len);
+}
+
+#undef write
+
+inline int
+_Jv_read(int s, void *buf, int len)
+{
+  return ::read (s, buf, len);
+}
+
+#undef read
+
+#endif /* DISABLE_JAVA_NET */
+
+// Wraps ::pipe
+static inline int
+_Jv_pipe (int filedes[2])
+{
+  return ::pipe (filedes);
+}
+
+// Forward declaration.  See java-stack.h for definition.
+struct _Jv_AddrInfo;
+
+// Given an address, determine the executable or shared object that defines
+// it and the nearest named symbol.
+extern int _Jv_platform_dladdr (void *addr, _Jv_AddrInfo *info);
+
+#endif /* __JV_POSIX_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/powerpc-signal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/powerpc-signal.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/powerpc-signal.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/powerpc-signal.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,113 @@
+// powerpc-signal.h - Catch runtime signals and turn them into exceptions
+// on a powerpc based Linux system.
+
+/* Copyright (C) 2003, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+
+#ifndef JAVA_SIGNAL_H
+#define JAVA_SIGNAL_H 1
+
+#include <signal.h>
+#include <sys/syscall.h>
+
+#define HANDLE_SEGV 1
+#undef HANDLE_FPE
+
+#define SIGNAL_HANDLER(_name)						\
+  static void _name (int /* _signal */, struct sigcontext *_sc)
+
+/* MD_FALLBACK_FRAME_STATE_FOR takes care of special casing PC
+   before the faulting instruction, so we don't need to do anything
+   here.  */
+
+#define MAKE_THROW_FRAME(_exception)
+
+/* For an explanation why we cannot simply use sigaction to
+   install the handlers, see i386-signal.h.  */
+
+/* We use kernel_old_sigaction here because we're calling the kernel
+   directly rather than via glibc. The sigaction structure that the
+   syscall uses is a different shape from the one in userland and not
+   visible to us in a header file so we define it here.
+   Additionally we want a proper prototype for the handler function
+   with the struct sigcontext pointer passed by the kernel as the 2nd
+   argument, which isn't there in userland headers.
+
+   Note that we explicitly avoid the SA_SIGINFO flag in INIT_SEGV and
+   INIT_FPE below. Using the ucontext pointer passed as 3rd argument
+   of a SA_SIGINFO type handler would need complicated backwards
+   compatibility hacks in MAKE_THROW_FRAME, as the ucontext layout
+   on PPC changed during the 2.5 kernel series.  */
+
+#ifndef __powerpc64__
+struct kernel_old_sigaction {
+  void (*k_sa_handler) (int, struct sigcontext *);
+  unsigned long k_sa_mask;
+  unsigned long k_sa_flags;
+  void (*k_sa_restorer) (void);
+};
+
+#define INIT_SEGV							\
+do									\
+  {									\
+    struct kernel_old_sigaction kact;					\
+    kact.k_sa_handler = catch_segv;					\
+    kact.k_sa_mask = 0;							\
+    kact.k_sa_flags = 0;						\
+    if (syscall (SYS_sigaction, SIGSEGV, &kact, NULL) != 0)		\
+      __asm__ __volatile__ (".long 0");					\
+  }									\
+while (0)  
+
+#define INIT_FPE							\
+do									\
+  {									\
+    struct kernel_old_sigaction kact;					\
+    kact.k_sa_handler = catch_fpe;					\
+    kact.k_sa_mask = 0;							\
+    kact.k_sa_flags = 0;						\
+    if (syscall (SYS_sigaction, SIGFPE, &kact, NULL) != 0)		\
+      __asm__ __volatile__ (".long 0");					\
+  }									\
+while (0)
+
+#else /* powerpc64 */
+
+struct kernel_sigaction
+{
+  void (*k_sa_handler) (int, struct sigcontext *);
+  unsigned long k_sa_flags;
+  void (*k_sa_restorer)(void);
+  unsigned long k_sa_mask;
+};
+
+#define INIT_SEGV							\
+do									\
+  {									\
+    struct kernel_sigaction kact;					\
+    memset (&kact, 0, sizeof (kact));					\
+    kact.k_sa_handler = catch_segv;					\
+    if (syscall (SYS_rt_sigaction, SIGSEGV, &kact, NULL, 8) != 0)	\
+      __asm__ __volatile__ (".long 0");					\
+  }									\
+while (0)  
+
+#define INIT_FPE							\
+do									\
+  {									\
+    struct kernel_sigaction kact;					\
+    memset (&kact, 0, sizeof (kact));					\
+    kact.k_sa_handler = catch_fpe;					\
+    if (syscall (SYS_rt_sigaction, SIGFPE, &kact, NULL, 8) != 0)	\
+      __asm__ __volatile__ (".long 0");					\
+  }									\
+while (0)
+#endif
+
+#endif /* JAVA_SIGNAL_H */

Added: llvm-gcc-4.2/trunk/libjava/include/s390-signal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/s390-signal.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/s390-signal.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/s390-signal.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,220 @@
+// s390-signal.h - Catch runtime signals and turn them into exceptions
+// on an s390 based Linux system.
+
+/* Copyright (C) 2002  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+
+#ifndef JAVA_SIGNAL_H
+#define JAVA_SIGNAL_H 1
+
+#include <signal.h>
+#include <sys/syscall.h>
+#include <ucontext.h>
+#include <limits.h>
+
+#define HANDLE_SEGV 1
+#define HANDLE_FPE 1
+
+#define SIGNAL_HANDLER(_name)	\
+static void _name (int, siginfo_t *_si __attribute__((unused)), \
+		   ucontext_t *_uc __attribute__((unused)))
+
+/* We no longer need to fiddle with the PSW address in the signal handler;
+   this is now all handled correctly in MD_FALLBACK_FRAME_STATE_FOR.  */
+#define MAKE_THROW_FRAME(_exception)
+
+
+/* According to the JVM spec, "if the dividend is the negative integer 
+   of the smallest magnitude and the divisor is -1, then overflow occurs 
+   and the result is equal to the dividend.  Despite the overflow, no 
+   exception occurs".
+
+   We handle this by inspecting the instruction which generated the signal,
+   and if dividend and divisor are as above, we simply return from the signal
+   handler.  This causes execution to continue after the instruction.  
+   Before returning, we the set result registers as expected.  */
+
+#define HANDLE_DIVIDE_OVERFLOW						\
+do									\
+{									\
+  unsigned char *_eip = (unsigned char *)				\
+    __builtin_extract_return_addr (_si->si_addr);			\
+  unsigned long *_regs = _uc->uc_mcontext.gregs;			\
+  int _r1, _r2, _d2, _x2, _b2;						\
+									\
+  /* First, a couple of helper routines to decode instructions.  */	\
+  struct _decode 							\
+    {									\
+      /* Decode RR instruction format.  */				\
+      static inline int _is_rr (unsigned char *_eip, 			\
+				unsigned char _op,			\
+				int *_r1, int *_r2) 			\
+      {									\
+	if (_eip[0] == _op)						\
+	  {								\
+	    *_r1 = _eip[1] >> 4;					\
+	    *_r2 = _eip[1] & 0xf;					\
+	    return 1;							\
+	  }								\
+	return 0;							\
+      }									\
+									\
+      /* Decode RX instruction format.  */				\
+      static inline int _is_rx (unsigned char *_eip,			\
+				unsigned char _op,			\
+				int *_r1, int *_d2, int *_x2, int *_b2) \
+      {									\
+	if (_eip[0] == _op)						\
+	  {								\
+	    *_r1 = _eip[1] >> 4;					\
+	    *_x2 = _eip[1] & 0xf;					\
+	    *_b2 = _eip[2] >> 4;					\
+	    *_d2 = ((_eip[2] & 0xf) << 8) + _eip[3];			\
+	    return 1;							\
+	  }								\
+	return 0;							\
+      }									\
+									\
+      /* Decode RRE instruction format.  */				\
+      static inline int _is_rre (unsigned char *_eip,			\
+				 unsigned char _op1, unsigned char _op2,\
+				 int *_r1, int *_r2)			\
+      {									\
+	if (_eip[0] == _op1 && _eip[1] == _op2)				\
+	  {								\
+	    *_r1 = _eip[3] >> 4;					\
+	    *_r2 = _eip[3] & 0xf;					\
+	    return 1;							\
+	  }								\
+	return 0;							\
+      }									\
+									\
+      /* Decode RXY instruction format.  */				\
+      static inline int _is_rxy (unsigned char *_eip,			\
+				 unsigned char _op1, unsigned char _op2,\
+				 int *_r1, int *_d2, int *_x2, int *_b2)\
+      {									\
+	if (_eip[0] == _op1 && _eip[5] == _op2)				\
+	  {								\
+	    *_r1 = _eip[1] >> 4;					\
+	    *_x2 = _eip[1] & 0xf;					\
+	    *_b2 = _eip[2] >> 4;					\
+	    *_d2 = ((_eip[2] & 0xf) << 8) + _eip[3] + (_eip[4] << 12);	\
+	    /* We have a 20-bit signed displacement.  */		\
+	    *_d2 = (*_d2 ^ 0x80000) - 0x80000;				\
+	    return 1;							\
+	  }								\
+	return 0;							\
+      }									\
+									\
+      /* Compute effective address.  */					\
+      static inline unsigned long _eff (unsigned long *_regs,		\
+					long _d, int _x, int _b)	\
+      {									\
+	return _d + (_x? _regs[_x] : 0) + (_b? _regs[_b] : 0);		\
+      }									\
+    };									\
+									\
+									\
+  /* DR r1,r2 */							\
+  if (_decode::_is_rr (_eip, 0x1d, &_r1, &_r2)				\
+      && (int) _regs[_r1] == -1 && (int) _regs[_r1+1] == INT_MIN	\
+      && (int) _regs[_r2] == -1)					\
+    {									\
+      _regs[_r1] &= ~0xffffffff;					\
+      return;								\
+    }									\
+ 									\
+  /* D r1,d2(x2,b2) */							\
+  if (_decode::_is_rx (_eip, 0x5d, &_r1, &_d2, &_x2, &_b2)		\
+      && (int) _regs[_r1] == -1 && (int) _regs[_r1+1] == INT_MIN	\
+      && *(int *) _decode::_eff (_regs, _d2, _x2, _b2) == -1)		\
+    {									\
+      _regs[_r1] &= ~0xffffffff;					\
+      return;								\
+    }									\
+									\
+  /* DSGR r1,r2 */							\
+  if (_decode::_is_rre (_eip, 0xb9, 0x0d, &_r1, &_r2)			\
+      && (long) _regs[_r1+1] == LONG_MIN				\
+      && (long) _regs[_r2] == -1L)					\
+    {									\
+      _regs[_r1] = 0;							\
+      return;								\
+    }									\
+									\
+  /* DSGFR r1,r2 */							\
+  if (_decode::_is_rre (_eip, 0xb9, 0x1d, &_r1, &_r2)			\
+      && (long) _regs[_r1+1] == LONG_MIN				\
+      && (int) _regs[_r2] == -1)					\
+    {									\
+      _regs[_r1] = 0;							\
+      return;								\
+    }									\
+									\
+  /* DSG r1,d2(x2,b2) */						\
+  if (_decode::_is_rxy (_eip, 0xe3, 0x0d, &_r1, &_d2, &_x2, &_b2)	\
+      && (long) _regs[_r1+1] == LONG_MIN				\
+      && *(long *) _decode::_eff (_regs, _d2, _x2, _b2) == -1L)		\
+    {									\
+      _regs[_r1] = 0;							\
+      return;								\
+    }									\
+									\
+  /* DSGF r1,d2(x2,b2) */						\
+  if (_decode::_is_rxy (_eip, 0xe3, 0x1d, &_r1, &_d2, &_x2, &_b2)	\
+      && (long) _regs[_r1+1] == LONG_MIN				\
+      && *(int *) _decode::_eff (_regs, _d2, _x2, _b2) == -1)		\
+    {									\
+      _regs[_r1] = 0;							\
+      return;								\
+    }									\
+									\
+}									\
+while (0)
+
+/* For an explanation why we cannot simply use sigaction to
+   install the handlers, see i386-signal.h.  */
+
+/* We use old_kernel_sigaction here because we're calling the kernel
+   directly rather than via glibc.  The sigaction structure that the
+   syscall uses is a different shape from the one in userland and not
+   visible to us in a header file so we define it here.  */
+
+struct old_s390_kernel_sigaction {
+	void (*k_sa_handler) (int, siginfo_t *, ucontext_t *);
+	unsigned long k_sa_mask;
+	unsigned long k_sa_flags;
+	void (*sa_restorer) (void);
+};
+
+#define INIT_SEGV					\
+do							\
+  {							\
+    struct old_s390_kernel_sigaction kact;		\
+    kact.k_sa_handler = catch_segv;			\
+    kact.k_sa_mask = 0;					\
+    kact.k_sa_flags = SA_SIGINFO;			\
+    syscall (SYS_sigaction, SIGSEGV, &kact, NULL);	\
+  }							\
+while (0)  
+
+#define INIT_FPE						\
+do								\
+  {								\
+    struct old_s390_kernel_sigaction kact;			\
+    kact.k_sa_handler = catch_fpe;				\
+    kact.k_sa_mask = 0;						\
+    kact.k_sa_flags = SA_SIGINFO;				\
+    syscall (SYS_sigaction, SIGFPE, &kact, NULL);		\
+  }								\
+while (0)  
+
+#endif /* JAVA_SIGNAL_H */
+

Added: llvm-gcc-4.2/trunk/libjava/include/sh-signal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/sh-signal.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/sh-signal.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/sh-signal.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,75 @@
+// sh-signal.h - Catch runtime signals and turn them into exceptions
+// on a SuperH based Linux system.
+
+/* Copyright (C) 2004, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+
+#ifndef JAVA_SIGNAL_H
+#define JAVA_SIGNAL_H 1
+
+#include <signal.h>
+#include <sys/syscall.h>
+
+#define HANDLE_SEGV 1
+#define HANDLE_FPE 1
+
+/* The third parameter to the signal handler points to something with
+ * this structure defined in asm/ucontext.h, but the name clashes with
+ * struct ucontext from sys/ucontext.h so this private copy is used.  */
+typedef struct _sig_ucontext {
+  unsigned long uc_flags;
+  struct _sig_ucontext *uc_link;
+  stack_t uc_stack;
+  struct sigcontext uc_mcontext;
+  sigset_t uc_sigmask;
+} sig_ucontext_t;
+
+#define SIGNAL_HANDLER(_name)						\
+  static void _name (int , siginfo_t *, sig_ucontext_t *_uc)
+
+#define MAKE_THROW_FRAME(_exception)
+
+/* For an explanation why we cannot simply use sigaction to
+   install the handlers, see i386-signal.h.  */
+
+/* We use kernel_old_sigaction here because we're calling the kernel
+   directly rather than via glibc.  The sigaction structure that the
+   syscall uses is a different shape from the one in userland and not
+   visible to us in a header file so we define it here.  */
+
+struct kernel_old_sigaction {
+  void (*k_sa_handler) (int, siginfo_t *, sig_ucontext_t *);
+  unsigned long k_sa_mask;
+  unsigned long k_sa_flags;
+  void (*k_sa_restorer) (void);
+};
+
+#define INIT_SEGV							\
+do									\
+  {									\
+    struct kernel_old_sigaction kact;					\
+    kact.k_sa_handler = catch_segv;					\
+    kact.k_sa_mask = 0;							\
+    kact.k_sa_flags = SA_SIGINFO | SA_NODEFER;				\
+    syscall (SYS_sigaction, SIGSEGV, &kact, NULL);			\
+  }									\
+while (0)  
+
+#define INIT_FPE							\
+do									\
+  {									\
+    struct kernel_old_sigaction kact;					\
+    kact.k_sa_handler = catch_fpe;					\
+    kact.k_sa_mask = 0;							\
+    kact.k_sa_flags = SA_SIGINFO | SA_NODEFER;				\
+    syscall (SYS_sigaction, SIGFPE, &kact, NULL);			\
+  }									\
+while (0)
+
+#endif /* JAVA_SIGNAL_H */

Added: llvm-gcc-4.2/trunk/libjava/include/sparc-signal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/sparc-signal.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/sparc-signal.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/sparc-signal.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,69 @@
+// sparc-signal.h - Catch runtime signals and turn them into exceptions.
+
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef JAVA_SIGNAL_H
+#define JAVA_SIGNAL_H 1
+
+#include <signal.h>
+#include <ucontext.h>
+
+#define HANDLE_SEGV 1
+#define HANDLE_FPE 1
+
+#define SIGNAL_HANDLER(_name) 						\
+static void _name (int _dummy __attribute__ ((__unused__)), \
+		   siginfo_t *_info __attribute__ ((__unused__)), \
+		   void *arg __attribute__ ((__unused__)))
+
+#ifdef __arch64__
+#define FLUSH_REGISTER_WINDOWS					\
+  asm volatile ("flushw");
+#else
+#define FLUSH_REGISTER_WINDOWS					\
+  asm volatile ("ta 3");
+#endif
+
+#define MAKE_THROW_FRAME(_exception)				\
+do								\
+{								\
+  ucontext_t *_context = (ucontext_t *) arg;                    \
+  (void)_dummy;							\
+  (void)_info;							\
+  register long sp = _context->uc_mcontext.gregs[REG_SP];	\
+  register long retaddr = _context->uc_mcontext.gregs[REG_O7];	\
+  FLUSH_REGISTER_WINDOWS;					\
+  asm volatile ("mov %0, %%i6; mov %1, %%i7"			\
+		: : "r"(sp), "r"(retaddr));			\
+}								\
+while (0)
+
+#define INIT_SEGV						\
+do								\
+  {								\
+    struct sigaction act;					\
+    act.sa_sigaction = catch_segv;				\
+    act.sa_flags = SA_SIGINFO | SA_NODEFER;			\
+    sigemptyset (&act.sa_mask);					\
+    sigaction (SIGSEGV, &act, NULL);				\
+  }								\
+while (0)							
+								
+#define INIT_FPE						\
+do								\
+  {								\
+    struct sigaction act;					\
+    act.sa_flags = SA_SIGINFO | SA_NODEFER;			\
+    act.sa_sigaction = catch_fpe;				\
+    sigemptyset (&act.sa_mask);					\
+    sigaction (SIGFPE, &act, NULL);				\
+  }								\
+while (0)
+
+#endif /* JAVA_SIGNAL_H */

Added: llvm-gcc-4.2/trunk/libjava/include/stamp-h.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/stamp-h.in?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/stamp-h.in (added)
+++ llvm-gcc-4.2/trunk/libjava/include/stamp-h.in Thu Nov  8 16:56:19 2007
@@ -0,0 +1 @@
+timestamp

Added: llvm-gcc-4.2/trunk/libjava/include/win32-signal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/win32-signal.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/win32-signal.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/win32-signal.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,40 @@
+// win32-signal.h - Catch runtime signals and turn them into exceptions.
+
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+// Exception handling is done totally differently on Win32 this stuff
+// just keeps it compatible
+
+#ifndef JAVA_SIGNAL_H
+#define JAVA_SIGNAL_H 1
+
+#define HANDLE_SEGV 1
+#define HANDLE_FPE 1
+
+#define SIGNAL_HANDLER(_name)	\
+static void _name (int _dummy)
+
+#define MAKE_THROW_FRAME(_exception)    do {} while (0)
+#define HANDLE_DIVIDE_OVERFLOW	do {} while (0)
+
+#define INIT_SEGV						\
+do								\
+  {								\
+  }								\
+while (0)
+
+
+#define INIT_FPE						\
+do								\
+  {								\
+  }								\
+while (0)
+
+
+#endif /* JAVA_SIGNAL_H */

Added: llvm-gcc-4.2/trunk/libjava/include/win32-threads.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/win32-threads.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/win32-threads.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/win32-threads.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,208 @@
+// -*- c++ -*-
+// win32-threads.h - Defines for using Win32 threads.
+
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006 Free Software
+   Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JV_WIN32_THREADS__
+#define __JV_WIN32_THREADS__
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+//
+// Typedefs.
+//
+
+typedef struct
+{
+  // ev[0] (signal) is a Win32 auto-reset event for _Jv_CondNotify
+  // ev[1] (broadcast) is a Win32 manual-reset event for _Jv_CondNotifyAll
+  HANDLE ev[2];
+
+  // Number of threads waiting on this condition variable
+  int blocked_count;
+
+  // Protects access to the blocked_count variable
+  CRITICAL_SECTION count_mutex;
+
+} _Jv_ConditionVariable_t;
+
+typedef struct
+{
+  // The thread-id of the owner thread if any, 0 otherwise
+  DWORD owner;
+
+  // Track nested mutex acquisitions by the same thread
+  int refcount;
+
+  // The actual Windows construct used to implement this mutex
+  CRITICAL_SECTION cs;
+
+} _Jv_Mutex_t;
+
+typedef struct _Jv_Thread_t
+{
+  int flags;            // Flags are defined in implementation.
+  HANDLE handle;        // Actual handle to the thread
+
+  // Protects access to the thread's interrupt_flag and
+  // interrupt_event variables within this module.
+  CRITICAL_SECTION interrupt_mutex;
+  
+  // A Win32 auto-reset event for thread interruption
+  HANDLE interrupt_event;
+
+  java::lang::Thread *thread_obj;
+} _Jv_Thread_t;
+
+typedef DWORD _Jv_ThreadId_t;
+
+inline _Jv_ThreadId_t
+_Jv_ThreadSelf (void)
+{
+  return GetCurrentThreadId();
+}
+
+typedef void _Jv_ThreadStartFunc (java::lang::Thread *);
+
+// Type identifying a win32 thread.
+typedef HANDLE _Jv_ThreadDesc_t;
+
+inline _Jv_ThreadDesc_t
+_Jv_GetPlatformThreadID(_Jv_Thread_t *t)
+{
+  return t->handle;
+}
+
+//
+// Condition variables.
+//
+
+#define _Jv_HaveCondDestroy
+int _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu, jlong millis, jint nanos);
+void _Jv_CondInit (_Jv_ConditionVariable_t *cv);
+void _Jv_CondDestroy (_Jv_ConditionVariable_t *cv);
+int _Jv_CondNotify (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *);
+int _Jv_CondNotifyAll (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *);
+
+//
+// Mutexes.
+// We use CRITICAL_SECTIONs instead of CreateMutex() for better performance
+//
+
+// Returns 0 if the mutex lock is held by the current thread, and 1 otherwise.
+inline int _Jv_MutexCheckMonitor (_Jv_Mutex_t *mu)
+{
+  return (mu->owner != GetCurrentThreadId ( ));
+}
+
+inline void _Jv_MutexInit (_Jv_Mutex_t *mu)
+{
+  mu->owner = 0UL;
+  mu->refcount = 0;
+  InitializeCriticalSection (&(mu->cs));
+}
+
+#define _Jv_HaveMutexDestroy
+inline void _Jv_MutexDestroy (_Jv_Mutex_t *mu)
+{
+  mu->owner = 0UL;
+  mu->refcount = 0;
+  DeleteCriticalSection (&(mu->cs));
+  mu = NULL;
+}
+
+inline int _Jv_MutexUnlock (_Jv_Mutex_t *mu)
+{
+  if (mu->owner == GetCurrentThreadId ( ))
+    {
+      mu->refcount--;
+      if (mu->refcount == 0)
+        mu->owner = 0UL;
+      LeaveCriticalSection (&(mu->cs));
+      return 0;
+    }
+  else
+    return 1;
+}
+
+inline int _Jv_MutexLock (_Jv_Mutex_t *mu)
+{
+  EnterCriticalSection (&(mu->cs));
+  mu->owner = GetCurrentThreadId ( );
+  mu->refcount++;
+  return 0;
+}
+
+//
+// Thread creation and manipulation.
+//
+
+void _Jv_InitThreads (void);
+_Jv_Thread_t *_Jv_ThreadInitData (java::lang::Thread *thread);
+void _Jv_ThreadDestroyData (_Jv_Thread_t *data);
+
+inline java::lang::Thread* _Jv_ThreadCurrent (void)
+{
+  extern DWORD _Jv_ThreadKey;
+  return (java::lang::Thread *) TlsGetValue(_Jv_ThreadKey);
+}
+
+inline _Jv_Thread_t *_Jv_ThreadCurrentData(void)
+{
+  extern DWORD _Jv_ThreadDataKey;
+  return (_Jv_Thread_t *) TlsGetValue(_Jv_ThreadDataKey);
+}
+
+inline void _Jv_ThreadYield (void)
+{
+  Sleep (0);
+}
+
+void _Jv_ThreadRegister (_Jv_Thread_t *data);
+void _Jv_ThreadUnRegister ();
+
+void _Jv_ThreadSetPriority (_Jv_Thread_t *data, jint prio);
+void _Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data,
+		      _Jv_ThreadStartFunc *meth);
+void _Jv_ThreadWait (void);
+void _Jv_ThreadInterrupt (_Jv_Thread_t *data);
+
+//
+// Thread interruption support
+//
+
+// Gets the auto-reset event for the current thread which is
+// signalled by _Jv_ThreadInterrupt. The caller can wait on this
+// event in addition to other waitable objects.
+//
+// NOTE: After waiting on this event with WaitForMultipleObjects,
+// you should ALWAYS use the return value of WaitForMultipleObjects
+// to test whether this event was signalled and whether thread
+// interruption has occurred. You should do this instead of checking
+// the thread's interrupted_flag, because someone could have reset
+// this flag in the interval of time between the return of
+// WaitForMultipleObjects and the time you query interrupted_flag.
+// See java/lang/natWin32Process.cc (waitFor) for an example.
+HANDLE _Jv_Win32GetInterruptEvent (void);
+
+// Remove defines from <windows.h> that conflict with various things in libgcj code
+
+#undef TRUE
+#undef FALSE
+#undef MAX_PRIORITY
+#undef MIN_PRIORITY
+#undef min
+#undef max
+#undef interface
+#undef STRICT
+#undef VOID
+
+#endif /* __JV_WIN32_THREADS__ */

Added: llvm-gcc-4.2/trunk/libjava/include/win32.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/win32.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/win32.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/win32.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,185 @@
+// win32.h -- Helper functions for Microsoft-flavored OSs.
+
+/* Copyright (C) 2002, 2003, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JV_WIN32_H__
+#define __JV_WIN32_H__
+
+// Enable UNICODE support?
+
+#ifdef MINGW_LIBGCJ_UNICODE
+#define UNICODE
+#define _UNICODE
+#endif // MINGW_LIBGCJ_UNICODE
+
+#include <tchar.h>
+
+// Includes
+#define WIN32_LEAN_AND_MEAN
+// Force Winsock 2 interface.
+#include <winsock2.h>
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#undef STRICT
+
+#include <ws2tcpip.h>
+#include <gcj/cni.h>
+#include <jvm.h>
+#include <java/util/Properties.h>
+
+#include <io.h>
+
+/* Begin UNICODE Support Classes and Functions */
+
+/* Helper class which creates a temporary, null-terminated,
+   wide-character C string. */
+class _Jv_Win32TempString
+{
+public:
+  _Jv_Win32TempString(jstring jstr);
+  ~_Jv_Win32TempString();
+
+// Accessors
+  operator LPCTSTR() const
+  {
+    return buf_;
+  }
+  LPCTSTR buf() const
+  {
+    return buf_;
+  }
+  LPTSTR buf()
+  {
+    return buf_;
+  }
+
+private:
+  TCHAR stackbuf_[500];
+  LPTSTR buf_;
+};
+
+// Mimics the JV_TEMP_STRING_UTF macro in jvm.h
+#define JV_TEMP_STRING_WIN32(x,y) _Jv_Win32TempString x(y);
+
+// Creates a jstring from a LPCTSTR
+extern jstring _Jv_Win32NewString (LPCTSTR pcsz);
+
+/* End UNICODE Helpers */
+
+// Prefix and suffix for shared libraries.
+#define _Jv_platform_solib_prefix ""
+#define _Jv_platform_solib_suffix ".dll"
+
+// Separator for file name components.
+#define _Jv_platform_file_separator ((jchar) '\\')
+// Separator for path components.
+#define _Jv_platform_path_separator ((jchar) ';')
+
+// List of names for `JNI_OnLoad'.  On Win32, JNI_OnLoad is an
+// "stdcall" function taking two pointers (8 bytes) as arguments.  It
+// could also have been exported as "JNI_OnLoad at 8" (MinGW) or
+// "_JNI_OnLoad at 8" (MSVC).
+#define _Jv_platform_onload_names \
+    { "JNI_OnLoad", "JNI_OnLoad at 8", "_JNI_OnLoad at 8", NULL }
+
+// Type of libffi ABI used by JNICALL methods.  NOTE: This must agree
+// with the JNICALL definition in jni.h
+#define _Jv_platform_ffi_abi FFI_STDCALL
+
+/* Useful helper classes and methods. */
+
+/* A C++ wrapper around a WSAEVENT which closes the event
+   in its destructor. If dwSelFlags is non-zero, we also
+   issue an WSAEventSelect on the socket descriptor with
+   the given flags; this is undone by a corresponding call
+   to WSAEventSelect(fd, 0, 0) in our destructor. */
+class WSAEventWrapper
+{
+public:
+  // Default constructor. Call init() after this.
+  WSAEventWrapper();
+  WSAEventWrapper(int fd, DWORD dwSelFlags);
+  ~WSAEventWrapper();
+
+  // Used for two-step initialization after calling
+  // default constructor.
+  void init(int fd, DWORD dwSelFlags);
+
+  int getFD()
+  {
+    return m_fd;
+  }
+
+  WSAEVENT getEventHandle()
+  {
+    return m_hEvent;
+  }
+
+private:
+  WSAEVENT m_hEvent;
+  int m_fd;
+  DWORD m_dwSelFlags;
+};
+
+// Error string text. The int argument is compatible
+// with both int WSAGetLastError() and DWORD GetLastError()
+// I tried avoiding having to pass the error explicitly, but
+// it didn't work this was invoked with say
+// throw new SomeException(_Jv_WinStrError()).
+extern jstring
+_Jv_WinStrError (LPCTSTR lpszPrologue, int nErrorCode);
+
+extern jstring
+_Jv_WinStrError (int nErrorCode);
+
+extern void
+_Jv_ThrowIOException (DWORD dwErrorCode);
+
+extern void
+_Jv_ThrowIOException ();
+
+extern void
+_Jv_ThrowSocketException (DWORD dwErrorCode);
+
+extern void
+_Jv_ThrowSocketException ();
+
+// Platform implementation
+extern void _Jv_platform_initialize (void);
+extern void _Jv_platform_initProperties (java::util::Properties*);
+extern jlong _Jv_platform_gettimeofday ();
+extern jlong _Jv_platform_nanotime ();
+extern int _Jv_pipe (int filedes[2]);
+
+extern void
+_Jv_platform_close_on_exec (HANDLE h);
+
+#ifdef JV_HASH_SYNCHRONIZATION
+/* Suspends the execution of the current thread for the specified
+   number of microseconds.  Tries to emulate the behaviour of usleep()
+   on UNIX and provides a granularity of 1 millisecond.  */
+inline void
+_Jv_platform_usleep (unsigned long usecs)
+{
+  if (usecs > 0UL)
+    {
+      unsigned long millis = ((usecs + 999UL) / 1000UL);
+      Sleep (millis);
+    }
+}
+#endif /* JV_HASH_SYNCHRONIZATION */
+
+// Forward declaration.  See java-stack.h for definition.
+struct _Jv_AddrInfo;
+
+// Given an address, determine the executable or shared object that defines
+// it and the nearest named symbol.
+extern int _Jv_platform_dladdr (void *addr, _Jv_AddrInfo *info);
+
+#endif /* __JV_WIN32_H__ */

Added: llvm-gcc-4.2/trunk/libjava/include/x86_64-signal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/include/x86_64-signal.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/include/x86_64-signal.h (added)
+++ llvm-gcc-4.2/trunk/libjava/include/x86_64-signal.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,180 @@
+// x86_64-signal.h - Catch runtime signals and turn them into exceptions
+// on an x86_64 based GNU/Linux system.
+
+/* Copyright (C) 2003, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+
+#ifdef __x86_64__
+
+#ifndef JAVA_SIGNAL_H
+#define JAVA_SIGNAL_H 1
+
+#include <signal.h>
+#include <sys/syscall.h>
+
+#define HANDLE_SEGV 1
+#define HANDLE_FPE 1
+
+#define SIGNAL_HANDLER(_name)					\
+static void _Jv_##_name (int, siginfo_t *,			\
+			 void *_p __attribute__ ((__unused__)))
+
+#define HANDLE_DIVIDE_OVERFLOW						\
+do									\
+{									\
+  struct ucontext *_uc = (struct ucontext *)_p;				\
+  volatile struct sigcontext *_sc = (struct sigcontext *) &_uc->uc_mcontext; \
+									\
+  register unsigned char *_rip = (unsigned char *)_sc->rip;		\
+									\
+  /* According to the JVM spec, "if the dividend is the negative	\
+   * integer of largest possible magnitude for the type and the		\
+   * divisor is -1, then overflow occurs and the result is equal to	\
+   * the dividend.  Despite the overflow, no exception occurs".		\
+									\
+   * We handle this by inspecting the instruction which generated the	\
+   * signal and advancing ip to point to the following instruction.	\
+   * As the instructions are variable length it is necessary to do a	\
+   * little calculation to figure out where the following instruction	\
+   * actually is.							\
+									\
+   */									\
+									\
+  bool _is_64_bit = false;						\
+									\
+  if ((_rip[0] & 0xf0) == 0x40)  /* REX byte present.  */		\
+    {									\
+      unsigned char _rex = _rip[0] & 0x0f;				\
+      _is_64_bit = (_rex & 0x08) != 0;					\
+      _rip++;								\
+    }									\
+									\
+  /* Detect a signed division of Integer.MIN_VALUE or Long.MIN_VALUE.  */ \
+  if (_rip[0] == 0xf7)							\
+    {									\
+      bool _min_value_dividend = false;					\
+      unsigned char _modrm = _rip[1];					\
+									\
+      if (((_modrm >> 3) & 7) == 7)					\
+	{								\
+	  if (_is_64_bit)						\
+	    _min_value_dividend = (_sc->rax == 0x8000000000000000L);	\
+	  else								\
+	    _min_value_dividend = ((_sc->rax & 0xffffffff) == 0x80000000); \
+	}								\
+									\
+      if (_min_value_dividend)						\
+	{								\
+	  unsigned char _rm = _modrm & 7;				\
+	  _sc->rdx = 0; /* the remainder is zero */			\
+	  switch (_modrm >> 6)						\
+	    {								\
+	    case 0:  /* register indirect */				\
+	      if (_rm == 5)   /* 32-bit displacement */			\
+		_rip += 4;						\
+	      if (_rm == 4)  /* A SIB byte follows the ModR/M byte */	\
+		_rip += 1;						\
+	      break;							\
+	    case 1:  /* register indirect + 8-bit displacement */	\
+	      _rip += 1;						\
+	      if (_rm == 4)  /* A SIB byte follows the ModR/M byte */	\
+		_rip += 1;						\
+	      break;							\
+	    case 2:  /* register indirect + 32-bit displacement */	\
+	      _rip += 4;						\
+	      if (_rm == 4)  /* A SIB byte follows the ModR/M byte */	\
+		_rip += 1;						\
+	      break;							\
+	    case 3:							\
+	      break;							\
+	    }								\
+	  _rip += 2;							\
+	  _sc->rip = (unsigned long)_rip;				\
+	  return;							\
+	}								\
+    }									\
+}									\
+while (0)
+
+extern "C" 
+{
+  struct kernel_sigaction 
+  {
+    void (*k_sa_sigaction)(int,siginfo_t *,void *);
+    unsigned long k_sa_flags;
+    void (*k_sa_restorer) (void);
+    sigset_t k_sa_mask;
+  };
+}
+
+#define MAKE_THROW_FRAME(_exception)
+
+#define RESTORE(name, syscall) RESTORE2 (name, syscall)
+#define RESTORE2(name, syscall)			\
+asm						\
+  (						\
+   ".text\n"					\
+   ".byte 0  # Yes, this really is necessary\n" \
+   ".align 16\n"				\
+   "__" #name ":\n"				\
+   "	movq $" #syscall ", %rax\n"		\
+   "	syscall\n"				\
+   );
+
+/* The return code for realtime-signals.  */
+RESTORE (restore_rt, __NR_rt_sigreturn)
+void restore_rt (void) asm ("__restore_rt")
+  __attribute__ ((visibility ("hidden")));
+
+#define INIT_SEGV						\
+do								\
+  {								\
+    struct kernel_sigaction act;				\
+    act.k_sa_sigaction = _Jv_catch_segv;			\
+    sigemptyset (&act.k_sa_mask);				\
+    act.k_sa_flags = SA_SIGINFO|0x4000000;			\
+    act.k_sa_restorer = restore_rt;				\
+    syscall (SYS_rt_sigaction, SIGSEGV, &act, NULL, _NSIG / 8);	\
+  }								\
+while (0)  
+
+#define INIT_FPE						\
+do								\
+  {								\
+    struct kernel_sigaction act;				\
+    act.k_sa_sigaction = _Jv_catch_fpe;				\
+    sigemptyset (&act.k_sa_mask);				\
+    act.k_sa_flags = SA_SIGINFO|0x4000000;			\
+    act.k_sa_restorer = restore_rt;				\
+    syscall (SYS_rt_sigaction, SIGFPE, &act, NULL, _NSIG / 8);	\
+  }								\
+while (0)  
+
+/* You might wonder why we use syscall(SYS_sigaction) in INIT_FPE
+ * instead of the standard sigaction().  This is necessary because of
+ * the shenanigans above where we increment the PC saved in the
+ * context and then return.  This trick will only work when we are
+ * called _directly_ by the kernel, because linuxthreads wraps signal
+ * handlers and its wrappers do not copy the sigcontext struct back
+ * when returning from a signal handler.  If we return from our divide
+ * handler to a linuxthreads wrapper, we will lose the PC adjustment
+ * we made and return to the faulting instruction again.  Using
+ * syscall(SYS_sigaction) causes our handler to be called directly
+ * by the kernel, bypassing any wrappers.  */
+
+#endif /* JAVA_SIGNAL_H */
+
+#else /* __x86_64__ */
+
+/* This is for the 32-bit subsystem on x86-64.  */
+
+#define sigcontext_struct sigcontext
+#include <java-signal-aux.h>
+
+#endif /* __x86_64__ */

Added: llvm-gcc-4.2/trunk/libjava/interpret-run.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/interpret-run.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/interpret-run.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/interpret-run.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,2513 @@
+// interpret-run.cc - Code to interpret bytecode
+
+/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+/* This file is meant only to be included in interpret.cc, it should not be
+ * compiled directly.	*/
+
+  using namespace java::lang::reflect;
+
+  // FRAME_DESC registers this particular invocation as the top-most
+  // interpreter frame.  This lets the stack tracing code (for
+  // Throwable) print information about the method being interpreted
+  // rather than about the interpreter itself.  FRAME_DESC has a
+  // destructor so it cleans up automatically when the interpreter
+  // returns.
+  java::lang::Thread *thread = java::lang::Thread::currentThread();
+  _Jv_InterpFrame frame_desc (meth, thread);
+
+  _Jv_word stack[meth->max_stack];
+  _Jv_word *sp = stack;
+
+  _Jv_word locals[meth->max_locals];
+
+#define INSN_LABEL(op) &&insn_##op
+
+  static const void *const insn_target[] = 
+  {
+    INSN_LABEL(nop),
+    INSN_LABEL(aconst_null),
+    INSN_LABEL(iconst_m1),
+    INSN_LABEL(iconst_0),
+    INSN_LABEL(iconst_1),
+    INSN_LABEL(iconst_2),
+    INSN_LABEL(iconst_3),
+    INSN_LABEL(iconst_4),
+    INSN_LABEL(iconst_5),
+    INSN_LABEL(lconst_0),
+    INSN_LABEL(lconst_1),
+    INSN_LABEL(fconst_0),
+    INSN_LABEL(fconst_1),
+    INSN_LABEL(fconst_2),
+    INSN_LABEL(dconst_0),
+    INSN_LABEL(dconst_1),
+    INSN_LABEL(bipush),
+    INSN_LABEL(sipush),
+    INSN_LABEL(ldc),
+    INSN_LABEL(ldc_w),
+    INSN_LABEL(ldc2_w),
+    INSN_LABEL(iload),
+    INSN_LABEL(lload),
+    INSN_LABEL(fload),
+    INSN_LABEL(dload),
+    INSN_LABEL(aload),
+    INSN_LABEL(iload_0),
+    INSN_LABEL(iload_1),
+    INSN_LABEL(iload_2),
+    INSN_LABEL(iload_3),
+    INSN_LABEL(lload_0),
+    INSN_LABEL(lload_1),
+    INSN_LABEL(lload_2),
+    INSN_LABEL(lload_3),
+    INSN_LABEL(fload_0),
+    INSN_LABEL(fload_1),
+    INSN_LABEL(fload_2),
+    INSN_LABEL(fload_3),
+    INSN_LABEL(dload_0),
+    INSN_LABEL(dload_1),
+    INSN_LABEL(dload_2),
+    INSN_LABEL(dload_3),
+    INSN_LABEL(aload_0),
+    INSN_LABEL(aload_1),
+    INSN_LABEL(aload_2),
+    INSN_LABEL(aload_3),
+    INSN_LABEL(iaload),
+    INSN_LABEL(laload),
+    INSN_LABEL(faload),
+    INSN_LABEL(daload),
+    INSN_LABEL(aaload),
+    INSN_LABEL(baload),
+    INSN_LABEL(caload),
+    INSN_LABEL(saload),
+    INSN_LABEL(istore),
+    INSN_LABEL(lstore),
+    INSN_LABEL(fstore),
+    INSN_LABEL(dstore),
+    INSN_LABEL(astore),
+    INSN_LABEL(istore_0),
+    INSN_LABEL(istore_1),
+    INSN_LABEL(istore_2),
+    INSN_LABEL(istore_3),
+    INSN_LABEL(lstore_0),
+    INSN_LABEL(lstore_1),
+    INSN_LABEL(lstore_2),
+    INSN_LABEL(lstore_3),
+    INSN_LABEL(fstore_0),
+    INSN_LABEL(fstore_1),
+    INSN_LABEL(fstore_2),
+    INSN_LABEL(fstore_3),
+    INSN_LABEL(dstore_0),
+    INSN_LABEL(dstore_1),
+    INSN_LABEL(dstore_2),
+    INSN_LABEL(dstore_3),
+    INSN_LABEL(astore_0),
+    INSN_LABEL(astore_1),
+    INSN_LABEL(astore_2),
+    INSN_LABEL(astore_3),
+    INSN_LABEL(iastore),
+    INSN_LABEL(lastore),
+    INSN_LABEL(fastore),
+    INSN_LABEL(dastore),
+    INSN_LABEL(aastore),
+    INSN_LABEL(bastore),
+    INSN_LABEL(castore),
+    INSN_LABEL(sastore),
+    INSN_LABEL(pop),
+    INSN_LABEL(pop2),
+    INSN_LABEL(dup),
+    INSN_LABEL(dup_x1),
+    INSN_LABEL(dup_x2),
+    INSN_LABEL(dup2),
+    INSN_LABEL(dup2_x1),
+    INSN_LABEL(dup2_x2),
+    INSN_LABEL(swap),
+    INSN_LABEL(iadd),
+    INSN_LABEL(ladd),
+    INSN_LABEL(fadd),
+    INSN_LABEL(dadd),
+    INSN_LABEL(isub),
+    INSN_LABEL(lsub),
+    INSN_LABEL(fsub),
+    INSN_LABEL(dsub),
+    INSN_LABEL(imul),
+    INSN_LABEL(lmul),
+    INSN_LABEL(fmul),
+    INSN_LABEL(dmul),
+    INSN_LABEL(idiv),
+    INSN_LABEL(ldiv),
+    INSN_LABEL(fdiv),
+    INSN_LABEL(ddiv),
+    INSN_LABEL(irem),
+    INSN_LABEL(lrem),
+    INSN_LABEL(frem),
+    INSN_LABEL(drem),
+    INSN_LABEL(ineg),
+    INSN_LABEL(lneg),
+    INSN_LABEL(fneg),
+    INSN_LABEL(dneg),
+    INSN_LABEL(ishl),
+    INSN_LABEL(lshl),
+    INSN_LABEL(ishr),
+    INSN_LABEL(lshr),
+    INSN_LABEL(iushr),
+    INSN_LABEL(lushr),
+    INSN_LABEL(iand),
+    INSN_LABEL(land),
+    INSN_LABEL(ior),
+    INSN_LABEL(lor),
+    INSN_LABEL(ixor),
+    INSN_LABEL(lxor),
+    INSN_LABEL(iinc),
+    INSN_LABEL(i2l),
+    INSN_LABEL(i2f),
+    INSN_LABEL(i2d),
+    INSN_LABEL(l2i),
+    INSN_LABEL(l2f),
+    INSN_LABEL(l2d),
+    INSN_LABEL(f2i),
+    INSN_LABEL(f2l),
+    INSN_LABEL(f2d),
+    INSN_LABEL(d2i),
+    INSN_LABEL(d2l),
+    INSN_LABEL(d2f),
+    INSN_LABEL(i2b),
+    INSN_LABEL(i2c),
+    INSN_LABEL(i2s),
+    INSN_LABEL(lcmp),
+    INSN_LABEL(fcmpl),
+    INSN_LABEL(fcmpg),
+    INSN_LABEL(dcmpl),
+    INSN_LABEL(dcmpg),
+    INSN_LABEL(ifeq),
+    INSN_LABEL(ifne),
+    INSN_LABEL(iflt),
+    INSN_LABEL(ifge),
+    INSN_LABEL(ifgt),
+    INSN_LABEL(ifle),
+    INSN_LABEL(if_icmpeq),
+    INSN_LABEL(if_icmpne),
+    INSN_LABEL(if_icmplt),
+    INSN_LABEL(if_icmpge),
+    INSN_LABEL(if_icmpgt),
+    INSN_LABEL(if_icmple),
+    INSN_LABEL(if_acmpeq),
+    INSN_LABEL(if_acmpne),
+    INSN_LABEL(goto), 
+    INSN_LABEL(jsr),
+    INSN_LABEL(ret),
+    INSN_LABEL(tableswitch),
+    INSN_LABEL(lookupswitch),
+    INSN_LABEL(ireturn),
+    INSN_LABEL(lreturn),
+    INSN_LABEL(freturn),
+    INSN_LABEL(dreturn),
+    INSN_LABEL(areturn),
+    INSN_LABEL(return),
+    INSN_LABEL(getstatic),
+    INSN_LABEL(putstatic),
+    INSN_LABEL(getfield),
+    INSN_LABEL(putfield),
+    INSN_LABEL(invokevirtual),
+    INSN_LABEL(invokespecial),
+    INSN_LABEL(invokestatic),
+    INSN_LABEL(invokeinterface),
+    INSN_LABEL (breakpoint),
+    INSN_LABEL(new),
+    INSN_LABEL(newarray),
+    INSN_LABEL(anewarray),
+    INSN_LABEL(arraylength),
+    INSN_LABEL(athrow),
+    INSN_LABEL(checkcast),
+    INSN_LABEL(instanceof),
+    INSN_LABEL(monitorenter),
+    INSN_LABEL(monitorexit),
+#ifdef DIRECT_THREADED
+    0, // wide
+#else
+    INSN_LABEL(wide),
+#endif
+    INSN_LABEL(multianewarray),
+    INSN_LABEL(ifnull),
+    INSN_LABEL(ifnonnull),
+    INSN_LABEL(goto_w),
+    INSN_LABEL(jsr_w),
+#ifdef DIRECT_THREADED
+    INSN_LABEL (ldc_class)
+#else
+    0
+#endif
+  };
+
+  pc_t pc;
+
+#ifdef DIRECT_THREADED
+
+#define NEXT_INSN goto *((pc++)->insn)
+#define INTVAL() ((pc++)->int_val)
+#define AVAL() ((pc++)->datum)
+
+#define GET1S() INTVAL ()
+#define GET2S() INTVAL ()
+#define GET1U() INTVAL ()
+#define GET2U() INTVAL ()
+#define AVAL1U() AVAL ()
+#define AVAL2U() AVAL ()
+#define AVAL2UP() AVAL ()
+#define SKIP_GOTO ++pc
+#define GOTO_VAL() (insn_slot *) pc->datum
+#define PCVAL(unionval) unionval.p
+#define AMPAMP(label) &&label
+
+  // Compile if we must. NOTE: Double-check locking.
+  if (meth->prepared == NULL)
+    {
+      _Jv_MutexLock (&compile_mutex);
+      if (meth->prepared == NULL)
+	meth->compile (insn_target);
+      _Jv_MutexUnlock (&compile_mutex);
+    }
+
+  // If we're only compiling, stop here
+  if (args == NULL)
+    return;
+
+  pc = (insn_slot *) meth->prepared;
+
+#else
+
+#define NEXT_INSN goto *(insn_target[*pc++])
+
+#define GET1S() get1s (pc++)
+#define GET2S() (pc += 2, get2s (pc- 2))
+#define GET1U() get1u (pc++)
+#define GET2U() (pc += 2, get2u (pc - 2))
+  // Note that these could be more efficient when not handling 'ldc
+  // class'.
+#define AVAL1U()						\
+  ({ int index = get1u (pc++);					\
+    _Jv_Linker::resolve_pool_entry (meth->defining_class, index).o; })
+#define AVAL2U()						\
+  ({ int index = get2u (pc); pc += 2;				\
+    _Jv_Linker::resolve_pool_entry (meth->defining_class, index).o; })
+  // Note that we don't need to resolve the pool entry here as class
+  // constants are never wide.
+#define AVAL2UP() ({ int index = get2u (pc); pc += 2; &pool_data[index]; })
+#define SKIP_GOTO pc += 2
+#define GOTO_VAL() pc - 1 + get2s (pc)
+#define PCVAL(unionval) unionval.i
+#define AMPAMP(label) NULL
+
+  pc = meth->bytecode ();
+
+#endif /* DIRECT_THREADED */
+
+#define TAKE_GOTO pc = GOTO_VAL ()
+
+  /* Go straight at it!  the ffi raw format matches the internal
+     stack representation exactly.  At least, that's the idea.
+  */
+  memcpy ((void*) locals, (void*) args, meth->args_raw_size);
+
+  _Jv_word *pool_data = meth->defining_class->constants.data;
+
+  /* These three are temporaries for common code used by several
+     instructions.  */
+  void (*fun)();
+  _Jv_ResolvedMethod* rmeth;
+  int tmpval;
+
+  try
+    {
+      // We keep nop around.  It is used if we're interpreting the
+      // bytecodes and not doing direct threading.
+    insn_nop:
+      NEXT_INSN;
+
+      /* The first few instructions here are ordered according to their
+	 frequency, in the hope that this will improve code locality a
+	 little.  */
+
+    insn_aload_0:		// 0x2a
+      LOADA (0);
+      NEXT_INSN;
+
+    insn_iload:		// 0x15
+      LOADI (GET1U ());
+      NEXT_INSN;
+
+    insn_iload_1:		// 0x1b
+      LOADI (1);
+      NEXT_INSN;
+
+    insn_invokevirtual:	// 0xb6
+      {
+	SAVE_PC();
+	int index = GET2U ();
+
+	/* _Jv_Linker::resolve_pool_entry returns immediately if the
+	 * value already is resolved.  If we want to clutter up the
+	 * code here to gain a little performance, then we can check
+	 * the corresponding bit JV_CONSTANT_ResolvedFlag in the tag
+	 * directly.  For now, I don't think it is worth it.  */
+
+	rmeth = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+						   index)).rmethod;
+
+	sp -= rmeth->stack_item_count;
+
+	if (rmeth->method->accflags & Modifier::FINAL)
+	  {
+	    // We can't rely on NULLCHECK working if the method is final.
+	    if (! sp[0].o)
+	      throw_null_pointer_exception ();
+
+	    // Final methods might not appear in the vtable.
+	    fun = (void (*)()) rmeth->method->ncode;
+	  }
+	else
+	  {
+	    NULLCHECK (sp[0].o);
+	    jobject rcv = sp[0].o;
+	    _Jv_VTable *table = *(_Jv_VTable**) rcv;
+	    fun = (void (*)()) table->get_method (rmeth->method->index);
+	  }
+
+#ifdef DIRECT_THREADED
+	// Rewrite instruction so that we use a faster pre-resolved
+	// method.
+	pc[-2].insn = &&invokevirtual_resolved;
+	pc[-1].datum = rmeth;
+#endif /* DIRECT_THREADED */
+      }
+      goto perform_invoke;
+
+#ifdef DIRECT_THREADED
+    invokevirtual_resolved:
+      {
+	SAVE_PC();
+	rmeth = (_Jv_ResolvedMethod *) AVAL ();
+	sp -= rmeth->stack_item_count;
+
+	if (rmeth->method->accflags & Modifier::FINAL)
+	  {
+	    // We can't rely on NULLCHECK working if the method is final.
+	    if (! sp[0].o)
+	      throw_null_pointer_exception ();
+
+	    // Final methods might not appear in the vtable.
+	    fun = (void (*)()) rmeth->method->ncode;
+	  }
+	else
+	  {
+	    jobject rcv = sp[0].o;
+	    _Jv_VTable *table = *(_Jv_VTable**) rcv;
+	    fun = (void (*)()) table->get_method (rmeth->method->index);
+	  }
+      }
+      goto perform_invoke;
+#endif /* DIRECT_THREADED */
+
+    perform_invoke:
+      {
+	/* here goes the magic again... */
+	ffi_cif *cif = &rmeth->cif;
+	ffi_raw *raw = (ffi_raw*) sp;
+
+	_Jv_value rvalue;
+
+#if FFI_NATIVE_RAW_API
+	/* We assume that this is only implemented if it's correct	*/
+	/* to use it here.  On a 64 bit machine, it never is.		*/
+	ffi_raw_call (cif, fun, (void*)&rvalue, raw);
+#else
+	ffi_java_raw_call (cif, fun, (void*)&rvalue, raw);
+#endif
+
+	int rtype = cif->rtype->type;
+
+	/* the likelyhood of object, int, or void return is very high,
+	 * so those are checked before the switch */
+	if (rtype == FFI_TYPE_POINTER)
+	  {
+	    PUSHA (rvalue.object_value);
+	  }
+	else if (rtype == FFI_TYPE_SINT32)
+	  {
+	    PUSHI (rvalue.int_value);
+	  }
+	else if (rtype == FFI_TYPE_VOID)
+	  {
+	    /* skip */
+	  }
+	else
+	  {
+	    switch (rtype)
+	      {
+	      case FFI_TYPE_SINT8:
+		PUSHI ((jbyte)(rvalue.int_value & 0xff));
+		break;
+
+	      case FFI_TYPE_SINT16:
+		PUSHI ((jshort)(rvalue.int_value & 0xffff));
+		break;
+
+	      case FFI_TYPE_UINT16:
+		PUSHI (rvalue.int_value & 0xffff);
+		break;
+
+	      case FFI_TYPE_FLOAT:
+	        PUSHF (rvalue.float_value);
+		break;
+
+	      case FFI_TYPE_DOUBLE:
+	        PUSHD (rvalue.double_value);
+		break;
+
+	      case FFI_TYPE_SINT64:
+	        PUSHL (rvalue.long_value);
+		break;
+
+	      default:
+		throw_internal_error ("unknown return type in invokeXXX");
+	      }
+	  }
+      }
+      NEXT_INSN;
+
+    insn_aconst_null:
+      PUSHA (NULL);
+      NEXT_INSN;
+
+    insn_iconst_m1:
+      PUSHI (-1);
+      NEXT_INSN;
+
+    insn_iconst_0:
+      PUSHI (0);
+      NEXT_INSN;
+
+    insn_iconst_1:
+      PUSHI (1);
+      NEXT_INSN;
+
+    insn_iconst_2:
+      PUSHI (2);
+      NEXT_INSN;
+
+    insn_iconst_3:
+      PUSHI (3);
+      NEXT_INSN;
+
+    insn_iconst_4:
+      PUSHI (4);
+      NEXT_INSN;
+
+    insn_iconst_5:
+      PUSHI (5);
+      NEXT_INSN;
+
+    insn_lconst_0:
+      PUSHL (0);
+      NEXT_INSN;
+
+    insn_lconst_1:
+      PUSHL (1);
+      NEXT_INSN;
+
+    insn_fconst_0:
+      PUSHF (0);
+      NEXT_INSN;
+
+    insn_fconst_1:
+      PUSHF (1);
+      NEXT_INSN;
+
+    insn_fconst_2:
+      PUSHF (2);
+      NEXT_INSN;
+
+    insn_dconst_0:
+      PUSHD (0);
+      NEXT_INSN;
+
+    insn_dconst_1:
+      PUSHD (1);
+      NEXT_INSN;
+
+    insn_bipush:
+      // For direct threaded, bipush and sipush are the same.
+#ifndef DIRECT_THREADED
+      PUSHI (GET1S ());
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+    insn_sipush:
+      PUSHI (GET2S ());
+      NEXT_INSN;
+
+    insn_ldc:
+      // For direct threaded, ldc and ldc_w are the same.
+#ifndef DIRECT_THREADED
+      PUSHA ((jobject) AVAL1U ());
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+    insn_ldc_w:
+      PUSHA ((jobject) AVAL2U ());
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+      // For direct threaded we have a separate 'ldc class' operation.
+    insn_ldc_class:
+      {
+	SAVE_PC();
+	// We could rewrite the instruction at this point.
+	int index = INTVAL ();
+	jobject k = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+						     index)).o;
+	PUSHA (k);
+      }
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_ldc2_w:
+      {
+	void *where = AVAL2UP ();
+	memcpy (sp, where, 2*sizeof (_Jv_word));
+	sp += 2;
+      }
+      NEXT_INSN;
+
+    insn_lload:
+      LOADL (GET1U ());
+      NEXT_INSN;
+
+    insn_fload:
+      LOADF (GET1U ());
+      NEXT_INSN;
+
+    insn_dload:
+      LOADD (GET1U ());
+      NEXT_INSN;
+
+    insn_aload:
+      LOADA (GET1U ());
+      NEXT_INSN;
+
+    insn_iload_0:
+      LOADI (0);
+      NEXT_INSN;
+
+    insn_iload_2:
+      LOADI (2);
+      NEXT_INSN;
+
+    insn_iload_3:
+      LOADI (3);
+      NEXT_INSN;
+
+    insn_lload_0:
+      LOADL (0);
+      NEXT_INSN;
+
+    insn_lload_1:
+      LOADL (1);
+      NEXT_INSN;
+
+    insn_lload_2:
+      LOADL (2);
+      NEXT_INSN;
+
+    insn_lload_3:
+      LOADL (3);
+      NEXT_INSN;
+
+    insn_fload_0:
+      LOADF (0);
+      NEXT_INSN;
+
+    insn_fload_1:
+      LOADF (1);
+      NEXT_INSN;
+
+    insn_fload_2:
+      LOADF (2);
+      NEXT_INSN;
+
+    insn_fload_3:
+      LOADF (3);
+      NEXT_INSN;
+
+    insn_dload_0:
+      LOADD (0);
+      NEXT_INSN;
+
+    insn_dload_1:
+      LOADD (1);
+      NEXT_INSN;
+
+    insn_dload_2:
+      LOADD (2);
+      NEXT_INSN;
+
+    insn_dload_3:
+      LOADD (3);
+      NEXT_INSN;
+
+    insn_aload_1:
+      LOADA(1);
+      NEXT_INSN;
+
+    insn_aload_2:
+      LOADA(2);
+      NEXT_INSN;
+
+    insn_aload_3:
+      LOADA(3);
+      NEXT_INSN;
+
+    insn_iaload:
+      {
+	jint index = POPI();
+	jintArray arr = (jintArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	PUSHI( elements(arr)[index] );
+      }
+      NEXT_INSN;
+
+    insn_laload:
+      {
+	jint index = POPI();
+	jlongArray arr = (jlongArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	PUSHL( elements(arr)[index] );
+      }
+      NEXT_INSN;
+
+    insn_faload:
+      {
+	jint index = POPI();
+	jfloatArray arr = (jfloatArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	PUSHF( elements(arr)[index] );
+      }
+      NEXT_INSN;
+
+    insn_daload:
+      {
+	jint index = POPI();
+	jdoubleArray arr = (jdoubleArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	PUSHD( elements(arr)[index] );
+      }
+      NEXT_INSN;
+
+    insn_aaload:
+      {
+	jint index = POPI();
+	jobjectArray arr = (jobjectArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	PUSHA( elements(arr)[index] );
+      }
+      NEXT_INSN;
+
+    insn_baload:
+      {
+	jint index = POPI();
+	jbyteArray arr = (jbyteArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	PUSHI( elements(arr)[index] );
+      }
+      NEXT_INSN;
+
+    insn_caload:
+      {
+	jint index = POPI();
+	jcharArray arr = (jcharArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	PUSHI( elements(arr)[index] );
+      }
+      NEXT_INSN;
+
+    insn_saload:
+      {
+	jint index = POPI();
+	jshortArray arr = (jshortArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	PUSHI( elements(arr)[index] );
+      }
+      NEXT_INSN;
+
+    insn_istore:
+      STOREI (GET1U ());
+      NEXT_INSN;
+
+    insn_lstore:
+      STOREL (GET1U ());
+      NEXT_INSN;
+
+    insn_fstore:
+      STOREF (GET1U ());
+      NEXT_INSN;
+
+    insn_dstore:
+      STORED (GET1U ());
+      NEXT_INSN;
+
+    insn_astore:
+      STOREA (GET1U ());
+      NEXT_INSN;
+
+    insn_istore_0:
+      STOREI (0);
+      NEXT_INSN;
+
+    insn_istore_1:
+      STOREI (1);
+      NEXT_INSN;
+
+    insn_istore_2:
+      STOREI (2);
+      NEXT_INSN;
+
+    insn_istore_3:
+      STOREI (3);
+      NEXT_INSN;
+
+    insn_lstore_0:
+      STOREL (0);
+      NEXT_INSN;
+
+    insn_lstore_1:
+      STOREL (1);
+      NEXT_INSN;
+
+    insn_lstore_2:
+      STOREL (2);
+      NEXT_INSN;
+
+    insn_lstore_3:
+      STOREL (3);
+      NEXT_INSN;
+
+    insn_fstore_0:
+      STOREF (0);
+      NEXT_INSN;
+
+    insn_fstore_1:
+      STOREF (1);
+      NEXT_INSN;
+
+    insn_fstore_2:
+      STOREF (2);
+      NEXT_INSN;
+
+    insn_fstore_3:
+      STOREF (3);
+      NEXT_INSN;
+
+    insn_dstore_0:
+      STORED (0);
+      NEXT_INSN;
+
+    insn_dstore_1:
+      STORED (1);
+      NEXT_INSN;
+
+    insn_dstore_2:
+      STORED (2);
+      NEXT_INSN;
+
+    insn_dstore_3:
+      STORED (3);
+      NEXT_INSN;
+
+    insn_astore_0:
+      STOREA(0);
+      NEXT_INSN;
+
+    insn_astore_1:
+      STOREA(1);
+      NEXT_INSN;
+
+    insn_astore_2:
+      STOREA(2);
+      NEXT_INSN;
+
+    insn_astore_3:
+      STOREA(3);
+      NEXT_INSN;
+
+    insn_iastore:
+      {
+	jint value = POPI();
+	jint index  = POPI();
+	jintArray arr = (jintArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	elements(arr)[index] = value;
+      }
+      NEXT_INSN;
+
+    insn_lastore:
+      {
+	jlong value = POPL();
+	jint index  = POPI();
+	jlongArray arr = (jlongArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	elements(arr)[index] = value;
+      }
+      NEXT_INSN;
+
+    insn_fastore:
+      {
+	jfloat value = POPF();
+	jint index  = POPI();
+	jfloatArray arr = (jfloatArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	elements(arr)[index] = value;
+      }
+      NEXT_INSN;
+
+    insn_dastore:
+      {
+	jdouble value = POPD();
+	jint index  = POPI();
+	jdoubleArray arr = (jdoubleArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	elements(arr)[index] = value;
+      }
+      NEXT_INSN;
+
+    insn_aastore:
+      {
+	jobject value = POPA();
+	jint index  = POPI();
+	jobjectArray arr = (jobjectArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	_Jv_CheckArrayStore (arr, value);
+	elements(arr)[index] = value;
+      }
+      NEXT_INSN;
+
+    insn_bastore:
+      {
+	jbyte value = (jbyte) POPI();
+	jint index  = POPI();
+	jbyteArray arr = (jbyteArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	elements(arr)[index] = value;
+      }
+      NEXT_INSN;
+
+    insn_castore:
+      {
+	jchar value = (jchar) POPI();
+	jint index  = POPI();
+	jcharArray arr = (jcharArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	elements(arr)[index] = value;
+      }
+      NEXT_INSN;
+
+    insn_sastore:
+      {
+	jshort value = (jshort) POPI();
+	jint index  = POPI();
+	jshortArray arr = (jshortArray) POPA();
+	NULLARRAYCHECK (arr);
+	ARRAYBOUNDSCHECK (arr, index);
+	elements(arr)[index] = value;
+      }
+      NEXT_INSN;
+
+    insn_pop:
+      sp -= 1;
+      NEXT_INSN;
+
+    insn_pop2:
+      sp -= 2;
+      NEXT_INSN;
+
+    insn_dup:
+      sp[0] = sp[-1];
+      sp += 1;
+      NEXT_INSN;
+
+    insn_dup_x1:
+      dupx (sp, 1, 1); sp+=1;
+      NEXT_INSN;
+
+    insn_dup_x2:
+      dupx (sp, 1, 2); sp+=1;
+      NEXT_INSN;
+
+    insn_dup2:
+      sp[0] = sp[-2];
+      sp[1] = sp[-1];
+      sp += 2;
+      NEXT_INSN;
+
+    insn_dup2_x1:
+      dupx (sp, 2, 1); sp+=2;
+      NEXT_INSN;
+
+    insn_dup2_x2:
+      dupx (sp, 2, 2); sp+=2;
+      NEXT_INSN;
+
+    insn_swap:
+      {
+	jobject tmp1 = POPA();
+	jobject tmp2 = POPA();
+	PUSHA (tmp1);
+	PUSHA (tmp2);
+      }
+      NEXT_INSN;
+
+    insn_iadd:
+      BINOPI(+);
+      NEXT_INSN;
+
+    insn_ladd:
+      BINOPL(+);
+      NEXT_INSN;
+
+    insn_fadd:
+      BINOPF(+);
+      NEXT_INSN;
+
+    insn_dadd:
+      BINOPD(+);
+      NEXT_INSN;
+
+    insn_isub:
+      BINOPI(-);
+      NEXT_INSN;
+
+    insn_lsub:
+      BINOPL(-);
+      NEXT_INSN;
+
+    insn_fsub:
+      BINOPF(-);
+      NEXT_INSN;
+
+    insn_dsub:
+      BINOPD(-);
+      NEXT_INSN;
+
+    insn_imul:
+      BINOPI(*);
+      NEXT_INSN;
+
+    insn_lmul:
+      BINOPL(*);
+      NEXT_INSN;
+
+    insn_fmul:
+      BINOPF(*);
+      NEXT_INSN;
+
+    insn_dmul:
+      BINOPD(*);
+      NEXT_INSN;
+
+    insn_idiv:
+      {
+	SAVE_PC();
+	jint value2 = POPI();
+	jint value1 = POPI();
+	jint res = _Jv_divI (value1, value2);
+	PUSHI (res);
+      }
+      NEXT_INSN;
+
+    insn_ldiv:
+      {
+	SAVE_PC();
+	jlong value2 = POPL();
+	jlong value1 = POPL();
+	jlong res = _Jv_divJ (value1, value2);
+	PUSHL (res);
+      }
+      NEXT_INSN;
+
+    insn_fdiv:
+      {
+	jfloat value2 = POPF();
+	jfloat value1 = POPF();
+	jfloat res = value1 / value2;
+	PUSHF (res);
+      }
+      NEXT_INSN;
+
+    insn_ddiv:
+      {
+	jdouble value2 = POPD();
+	jdouble value1 = POPD();
+	jdouble res = value1 / value2;
+	PUSHD (res);
+      }
+      NEXT_INSN;
+
+    insn_irem:
+      {
+	SAVE_PC();
+	jint value2 = POPI();
+	jint value1 =  POPI();
+	jint res = _Jv_remI (value1, value2);
+	PUSHI (res);
+      }
+      NEXT_INSN;
+
+    insn_lrem:
+      {
+	SAVE_PC();
+	jlong value2 = POPL();
+	jlong value1 = POPL();
+	jlong res = _Jv_remJ (value1, value2);
+	PUSHL (res);
+      }
+      NEXT_INSN;
+
+    insn_frem:
+      {
+	jfloat value2 = POPF();
+	jfloat value1 = POPF();
+	jfloat res    = __ieee754_fmod (value1, value2);
+	PUSHF (res);
+      }
+      NEXT_INSN;
+
+    insn_drem:
+      {
+	jdouble value2 = POPD();
+	jdouble value1 = POPD();
+	jdouble res    = __ieee754_fmod (value1, value2);
+	PUSHD (res);
+      }
+      NEXT_INSN;
+
+    insn_ineg:
+      {
+	jint value = POPI();
+	PUSHI (value * -1);
+      }
+      NEXT_INSN;
+
+    insn_lneg:
+      {
+	jlong value = POPL();
+	PUSHL (value * -1);
+      }
+      NEXT_INSN;
+
+    insn_fneg:
+      {
+	jfloat value = POPF();
+	PUSHF (value * -1);
+      }
+      NEXT_INSN;
+
+    insn_dneg:
+      {
+	jdouble value = POPD();
+	PUSHD (value * -1);
+      }
+      NEXT_INSN;
+
+    insn_ishl:
+      {
+	jint shift = (POPI() & 0x1f);
+	jint value = POPI();
+	PUSHI (value << shift);
+      }
+      NEXT_INSN;
+
+    insn_lshl:
+      {
+	jint shift = (POPI() & 0x3f);
+	jlong value = POPL();
+	PUSHL (value << shift);
+      }
+      NEXT_INSN;
+
+    insn_ishr:
+      {
+	jint shift = (POPI() & 0x1f);
+	jint value = POPI();
+	PUSHI (value >> shift);
+      }
+      NEXT_INSN;
+
+    insn_lshr:
+      {
+	jint shift = (POPI() & 0x3f);
+	jlong value = POPL();
+	PUSHL (value >> shift);
+      }
+      NEXT_INSN;
+
+    insn_iushr:
+      {
+	jint shift = (POPI() & 0x1f);
+	_Jv_uint value = (_Jv_uint) POPI();
+	PUSHI ((jint) (value >> shift));
+      }
+      NEXT_INSN;
+
+    insn_lushr:
+      {
+	jint shift = (POPI() & 0x3f);
+	_Jv_ulong value = (_Jv_ulong) POPL();
+	PUSHL ((jlong) (value >> shift));
+      }
+      NEXT_INSN;
+
+    insn_iand:
+      BINOPI (&);
+      NEXT_INSN;
+
+    insn_land:
+      BINOPL (&);
+      NEXT_INSN;
+
+    insn_ior:
+      BINOPI (|);
+      NEXT_INSN;
+
+    insn_lor:
+      BINOPL (|);
+      NEXT_INSN;
+
+    insn_ixor:
+      BINOPI (^);
+      NEXT_INSN;
+
+    insn_lxor:
+      BINOPL (^);
+      NEXT_INSN;
+
+    insn_iinc:
+      {
+	jint index  = GET1U ();
+	jint amount = GET1S ();
+	locals[index].i += amount;
+      }
+      NEXT_INSN;
+
+    insn_i2l:
+      {jlong value = POPI(); PUSHL (value);}
+      NEXT_INSN;
+
+    insn_i2f:
+      {jfloat value = POPI(); PUSHF (value);}
+      NEXT_INSN;
+
+    insn_i2d:
+      {jdouble value = POPI(); PUSHD (value);}
+      NEXT_INSN;
+
+    insn_l2i:
+      {jint value = POPL(); PUSHI (value);}
+      NEXT_INSN;
+
+    insn_l2f:
+      {jfloat value = POPL(); PUSHF (value);}
+      NEXT_INSN;
+
+    insn_l2d:
+      {jdouble value = POPL(); PUSHD (value);}
+      NEXT_INSN;
+
+    insn_f2i:
+      {
+	using namespace java::lang;
+	jint value = convert (POPF (), Integer::MIN_VALUE, Integer::MAX_VALUE);
+	PUSHI(value);
+      }
+      NEXT_INSN;
+
+    insn_f2l:
+      {
+	using namespace java::lang;
+	jlong value = convert (POPF (), Long::MIN_VALUE, Long::MAX_VALUE);
+	PUSHL(value);
+      }
+      NEXT_INSN;
+
+    insn_f2d:
+      { jdouble value = POPF (); PUSHD(value); }
+      NEXT_INSN;
+
+    insn_d2i:
+      {
+	using namespace java::lang;
+	jint value = convert (POPD (), Integer::MIN_VALUE, Integer::MAX_VALUE);
+	PUSHI(value);
+      }
+      NEXT_INSN;
+
+    insn_d2l:
+      {
+	using namespace java::lang;
+	jlong value = convert (POPD (), Long::MIN_VALUE, Long::MAX_VALUE);
+	PUSHL(value);
+      }
+      NEXT_INSN;
+
+    insn_d2f:
+      { jfloat value = POPD (); PUSHF(value); }
+      NEXT_INSN;
+
+    insn_i2b:
+      { jbyte value = POPI (); PUSHI(value); }
+      NEXT_INSN;
+
+    insn_i2c:
+      { jchar value = POPI (); PUSHI(value); }
+      NEXT_INSN;
+
+    insn_i2s:
+      { jshort value = POPI (); PUSHI(value); }
+      NEXT_INSN;
+
+    insn_lcmp:
+      {
+	jlong value2 = POPL ();
+	jlong value1 = POPL ();
+	if (value1 > value2)
+	  { PUSHI (1); }
+	else if (value1 == value2)
+	  { PUSHI (0); }
+	else
+	  { PUSHI (-1); }
+      }
+      NEXT_INSN;
+
+    insn_fcmpl:
+      tmpval = -1;
+      goto fcmp;
+
+    insn_fcmpg:
+      tmpval = 1;
+
+    fcmp:
+      {
+	jfloat value2 = POPF ();
+	jfloat value1 = POPF ();
+	if (value1 > value2)
+	  PUSHI (1);
+	else if (value1 == value2)
+	  PUSHI (0);
+	else if (value1 < value2)
+	  PUSHI (-1);
+	else
+	  PUSHI (tmpval);
+      }
+      NEXT_INSN;
+
+    insn_dcmpl:
+      tmpval = -1;
+      goto dcmp;
+
+    insn_dcmpg:
+      tmpval = 1;
+
+    dcmp:
+      {
+	jdouble value2 = POPD ();
+	jdouble value1 = POPD ();
+	if (value1 > value2)
+	  PUSHI (1);
+	else if (value1 == value2)
+	  PUSHI (0);
+	else if (value1 < value2)
+	  PUSHI (-1);
+	else
+	  PUSHI (tmpval);
+      }
+      NEXT_INSN;
+
+    insn_ifeq:
+      {
+	if (POPI() == 0)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_ifne:
+      {
+	if (POPI() != 0)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_iflt:
+      {
+	if (POPI() < 0)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_ifge:
+      {
+	if (POPI() >= 0)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_ifgt:
+      {
+	if (POPI() > 0)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_ifle:
+      {
+	if (POPI() <= 0)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_if_icmpeq:
+      {
+	jint value2 = POPI();
+	jint value1 = POPI();
+	if (value1 == value2)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_if_icmpne:
+      {
+	jint value2 = POPI();
+	jint value1 = POPI();
+	if (value1 != value2)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_if_icmplt:
+      {
+	jint value2 = POPI();
+	jint value1 = POPI();
+	if (value1 < value2)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_if_icmpge:
+      {
+	jint value2 = POPI();
+	jint value1 = POPI();
+	if (value1 >= value2)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_if_icmpgt:
+      {
+	jint value2 = POPI();
+	jint value1 = POPI();
+	if (value1 > value2)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_if_icmple:
+      {
+	jint value2 = POPI();
+	jint value1 = POPI();
+	if (value1 <= value2)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_if_acmpeq:
+      {
+	jobject value2 = POPA();
+	jobject value1 = POPA();
+	if (value1 == value2)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_if_acmpne:
+      {
+	jobject value2 = POPA();
+	jobject value1 = POPA();
+	if (value1 != value2)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_goto_w:
+#ifndef DIRECT_THREADED
+      // For direct threaded, goto and goto_w are the same.
+      pc = pc - 1 + get4 (pc);
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+    insn_goto:
+      TAKE_GOTO;
+      NEXT_INSN;
+
+    insn_jsr_w:
+#ifndef DIRECT_THREADED
+      // For direct threaded, jsr and jsr_w are the same.
+      {
+	pc_t next = pc - 1 + get4 (pc);
+	pc += 4;
+	PUSHA ((jobject) pc);
+	pc = next;
+      }
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+    insn_jsr:
+      {
+	pc_t next = GOTO_VAL();
+	SKIP_GOTO;
+	PUSHA ((jobject) pc);
+	pc = next;
+      }
+      NEXT_INSN;
+
+    insn_ret:
+      {
+	jint index = GET1U ();
+	pc = (pc_t) PEEKA (index);
+      }
+      NEXT_INSN;
+
+    insn_tableswitch:
+      {
+#ifdef DIRECT_THREADED
+	void *def = (pc++)->datum;
+
+	int index = POPI();
+
+	jint low = INTVAL ();
+	jint high = INTVAL ();
+
+	if (index < low || index > high)
+	  pc = (insn_slot *) def;
+	else
+	  pc = (insn_slot *) ((pc + index - low)->datum);
+#else
+	pc_t base_pc = pc - 1;
+	int index = POPI ();
+
+	pc_t base = (pc_t) meth->bytecode ();
+	while ((pc - base) % 4 != 0)
+	  ++pc;
+
+	jint def = get4 (pc);
+	jint low = get4 (pc + 4);
+	jint high = get4 (pc + 8);
+	if (index < low || index > high)
+	  pc = base_pc + def;
+	else
+	  pc = base_pc + get4 (pc + 4 * (index - low + 3));
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+    insn_lookupswitch:
+      {
+#ifdef DIRECT_THREADED
+	void *def = (pc++)->insn;
+
+	int index = POPI();
+
+	jint npairs = INTVAL ();
+
+	int max = npairs - 1;
+	int min = 0;
+
+	// Simple binary search...
+	while (min < max)
+	  {
+	    int half = (min + max) / 2;
+	    int match = pc[2 * half].int_val;
+
+	    if (index == match)
+	      {
+		// Found it.
+		pc = (insn_slot *) pc[2 * half + 1].datum;
+		NEXT_INSN;
+	      }
+	    else if (index < match)
+	      // We can use HALF - 1 here because we check again on
+	      // loop exit.
+	      max = half - 1;
+	    else
+	      // We can use HALF + 1 here because we check again on
+	      // loop exit.
+	      min = half + 1;
+	  }
+	if (index == pc[2 * min].int_val)
+	  pc = (insn_slot *) pc[2 * min + 1].datum;
+	else
+	  pc = (insn_slot *) def;
+#else
+	unsigned char *base_pc = pc-1;
+	int index = POPI();
+
+	unsigned char* base = meth->bytecode ();
+	while ((pc-base) % 4 != 0)
+	  ++pc;
+
+	jint def     = get4 (pc);
+	jint npairs  = get4 (pc+4);
+
+	int max = npairs-1;
+	int min = 0;
+
+	// Simple binary search...
+	while (min < max)
+	  {
+	    int half = (min+max)/2;
+	    int match = get4 (pc+ 4*(2 + 2*half));
+
+	    if (index == match)
+	      min = max = half;
+	    else if (index < match)
+	      // We can use HALF - 1 here because we check again on
+	      // loop exit.
+	      max = half - 1;
+	    else
+	      // We can use HALF + 1 here because we check again on
+	      // loop exit.
+	      min = half + 1;
+	  }
+
+	if (index == get4 (pc+ 4*(2 + 2*min)))
+	  pc = base_pc + get4 (pc+ 4*(2 + 2*min + 1));
+	else
+	  pc = base_pc + def;    
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+    insn_areturn:
+      *(jobject *) retp = POPA ();
+      return;
+
+    insn_lreturn:
+      *(jlong *) retp = POPL ();
+      return;
+
+    insn_freturn:
+      *(jfloat *) retp = POPF ();
+      return;
+
+    insn_dreturn:
+      *(jdouble *) retp = POPD ();
+      return;
+
+    insn_ireturn:
+      *(jint *) retp = POPI ();
+      return;
+
+    insn_return:
+      return;
+
+    insn_getstatic:
+      {
+	jint fieldref_index = GET2U ();
+        SAVE_PC(); // Constant pool resolution could throw.
+	_Jv_Linker::resolve_pool_entry (meth->defining_class, fieldref_index);
+	_Jv_Field *field = pool_data[fieldref_index].field;
+
+	if ((field->flags & Modifier::STATIC) == 0)
+	  throw_incompatible_class_change_error 
+	    (JvNewStringLatin1 ("field no longer static"));
+
+	jclass type = field->type;
+
+	// We rewrite the instruction once we discover what it refers
+	// to.
+	void *newinsn = NULL;
+	if (type->isPrimitive ())
+	  {
+	    switch (type->size_in_bytes)
+	      {
+	      case 1:
+		PUSHI (*field->u.byte_addr);
+		newinsn = AMPAMP (getstatic_resolved_1);
+		break;
+
+	      case 2:
+		if (type == JvPrimClass (char))
+		  {
+		    PUSHI (*field->u.char_addr);
+		    newinsn = AMPAMP (getstatic_resolved_char);
+		  }
+		else
+		  {
+		    PUSHI (*field->u.short_addr);
+		    newinsn = AMPAMP (getstatic_resolved_short);
+		  }
+		break;
+
+	      case 4:
+	        PUSHI(*field->u.int_addr);
+		newinsn = AMPAMP (getstatic_resolved_4);
+		break;
+
+	      case 8:
+	        PUSHL(*field->u.long_addr);
+		newinsn = AMPAMP (getstatic_resolved_8);
+		break;
+	      }
+	  }
+	else
+	  {
+	    PUSHA(*field->u.object_addr);
+	    newinsn = AMPAMP (getstatic_resolved_obj);
+	  }
+
+#ifdef DIRECT_THREADED
+	pc[-2].insn = newinsn;
+	pc[-1].datum = field->u.addr;
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+    getstatic_resolved_1:
+      PUSHI (*(jbyte *) AVAL ());
+      NEXT_INSN;
+
+    getstatic_resolved_char:
+      PUSHI (*(jchar *) AVAL ());
+      NEXT_INSN;
+
+    getstatic_resolved_short:
+      PUSHI (*(jshort *) AVAL ());
+      NEXT_INSN;
+
+    getstatic_resolved_4:
+      PUSHI (*(jint *) AVAL ());
+      NEXT_INSN;
+
+    getstatic_resolved_8:
+      PUSHL (*(jlong *) AVAL ());
+      NEXT_INSN;
+
+    getstatic_resolved_obj:
+      PUSHA (*(jobject *) AVAL ());
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_getfield:
+      {
+	SAVE_PC();
+	jint fieldref_index = GET2U ();
+	_Jv_Linker::resolve_pool_entry (meth->defining_class, fieldref_index);
+	_Jv_Field *field = pool_data[fieldref_index].field;
+
+	if ((field->flags & Modifier::STATIC) != 0)
+	  throw_incompatible_class_change_error 
+	    (JvNewStringLatin1 ("field is static"));
+
+	jclass type = field->type;
+	jint field_offset = field->u.boffset;
+
+	jobject obj   = POPA();
+	NULLCHECK(obj);
+
+	void *newinsn = NULL;
+	_Jv_value *val = (_Jv_value *) ((char *)obj + field_offset);
+	if (type->isPrimitive ())
+	  {
+	    switch (type->size_in_bytes)
+	      {
+	      case 1:
+	        PUSHI (val->byte_value);
+		newinsn = AMPAMP (getfield_resolved_1);
+		break;
+
+	      case 2:
+		if (type == JvPrimClass (char))
+		  {
+		    PUSHI (val->char_value);
+		    newinsn = AMPAMP (getfield_resolved_char);
+		  }
+		else
+		  {
+		    PUSHI (val->short_value);
+		    newinsn = AMPAMP (getfield_resolved_short);
+		  }
+		break;
+
+	      case 4:
+		PUSHI (val->int_value);
+		newinsn = AMPAMP (getfield_resolved_4);
+		break;
+
+	      case 8:
+	        PUSHL (val->long_value);
+		newinsn = AMPAMP (getfield_resolved_8);
+		break;
+	      }
+	  }
+	else
+	  {
+	    PUSHA (val->object_value);
+	    newinsn = AMPAMP (getfield_resolved_obj);
+	  }
+
+#ifdef DIRECT_THREADED
+	pc[-2].insn = newinsn;
+	pc[-1].int_val = field_offset;
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+    getfield_resolved_1:
+      {
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	PUSHI (*(jbyte *) (obj + INTVAL ()));
+      }
+      NEXT_INSN;
+
+    getfield_resolved_char:
+      {
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	PUSHI (*(jchar *) (obj + INTVAL ()));
+      }
+      NEXT_INSN;
+
+    getfield_resolved_short:
+      {
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	PUSHI (*(jshort *) (obj + INTVAL ()));
+      }
+      NEXT_INSN;
+
+    getfield_resolved_4:
+      {
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	PUSHI (*(jint *) (obj + INTVAL ()));
+      }
+      NEXT_INSN;
+
+    getfield_resolved_8:
+      {
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	PUSHL (*(jlong *) (obj + INTVAL ()));
+      }
+      NEXT_INSN;
+
+    getfield_resolved_obj:
+      {
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	PUSHA (*(jobject *) (obj + INTVAL ()));
+      }
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_putstatic:
+      {
+	SAVE_PC();
+	jint fieldref_index = GET2U ();
+	_Jv_Linker::resolve_pool_entry (meth->defining_class, fieldref_index);
+	_Jv_Field *field = pool_data[fieldref_index].field;
+
+	jclass type = field->type;
+
+	// ResolvePoolEntry cannot check this
+	if ((field->flags & Modifier::STATIC) == 0)
+	  throw_incompatible_class_change_error 
+	    (JvNewStringLatin1 ("field no longer static"));
+
+	void *newinsn = NULL;
+	if (type->isPrimitive ())
+	  {
+	    switch (type->size_in_bytes) 
+	      {
+	      case 1:
+		{
+		  jint value = POPI();
+		  *field->u.byte_addr = value;
+		  newinsn = AMPAMP (putstatic_resolved_1);
+		  break;
+		}
+
+	      case 2:
+		{
+		  jint value = POPI();
+		  *field->u.char_addr = value;
+		  newinsn = AMPAMP (putstatic_resolved_2);
+		  break;
+		}
+
+	      case 4:
+		{
+		  jint value = POPI();
+		  *field->u.int_addr = value;
+		  newinsn = AMPAMP (putstatic_resolved_4);
+		  break;
+		}
+
+	      case 8:
+		{
+		  jlong value = POPL();
+		  *field->u.long_addr = value;
+		  newinsn = AMPAMP (putstatic_resolved_8);
+		  break;
+		}
+	      }
+	  }
+	else
+	  {
+	    jobject value = POPA();
+	    *field->u.object_addr = value;
+	    newinsn = AMPAMP (putstatic_resolved_obj);
+	  }
+
+#ifdef DIRECT_THREADED
+	pc[-2].insn = newinsn;
+	pc[-1].datum = field->u.addr;
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+    putstatic_resolved_1:
+      *(jbyte *) AVAL () = POPI ();
+      NEXT_INSN;
+
+    putstatic_resolved_2:
+      *(jchar *) AVAL () = POPI ();
+      NEXT_INSN;
+
+    putstatic_resolved_4:
+      *(jint *) AVAL () = POPI ();
+      NEXT_INSN;
+
+    putstatic_resolved_8:
+      *(jlong *) AVAL () = POPL ();
+      NEXT_INSN;
+
+    putstatic_resolved_obj:
+      *(jobject *) AVAL () = POPA ();
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_putfield:
+      {
+	SAVE_PC();
+	jint fieldref_index = GET2U ();
+	_Jv_Linker::resolve_pool_entry (meth->defining_class, fieldref_index);
+	_Jv_Field *field = pool_data[fieldref_index].field;
+
+	jclass type = field->type;
+
+	if ((field->flags & Modifier::STATIC) != 0)
+	  throw_incompatible_class_change_error 
+	    (JvNewStringLatin1 ("field is static"));
+
+	jint field_offset = field->u.boffset;
+
+	void *newinsn = NULL;
+	if (type->isPrimitive ())
+	  {
+	    switch (type->size_in_bytes) 
+	      {
+	      case 1:
+		{
+		  jint    value = POPI();
+		  jobject obj   = POPA();
+		  NULLCHECK(obj);
+		  *(jbyte*) ((char*)obj + field_offset) = value;
+		  newinsn = AMPAMP (putfield_resolved_1);
+		  break;
+		}
+
+	      case 2:
+		{
+		  jint    value = POPI();
+		  jobject obj   = POPA();
+		  NULLCHECK(obj);
+		  *(jchar*) ((char*)obj + field_offset) = value;
+		  newinsn = AMPAMP (putfield_resolved_2);
+		  break;
+		}
+
+	      case 4:
+		{
+		  jint    value = POPI();
+		  jobject obj   = POPA();
+		  NULLCHECK(obj);
+		  *(jint*) ((char*)obj + field_offset) = value;
+		  newinsn = AMPAMP (putfield_resolved_4);
+		  break;
+		}
+
+	      case 8:
+		{
+		  jlong   value = POPL();
+		  jobject obj   = POPA();
+		  NULLCHECK(obj);
+		  *(jlong*) ((char*)obj + field_offset) = value;
+		  newinsn = AMPAMP (putfield_resolved_8);
+		  break;
+		}
+	      }
+	  }
+	else
+	  {
+	    jobject value = POPA();
+	    jobject obj   = POPA();
+	    NULLCHECK(obj);
+	    *(jobject*) ((char*)obj + field_offset) = value;
+	    newinsn = AMPAMP (putfield_resolved_obj);
+	  }
+
+#ifdef DIRECT_THREADED
+	pc[-2].insn = newinsn;
+	pc[-1].int_val = field_offset;
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+    putfield_resolved_1:
+      {
+	jint val = POPI ();
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	*(jbyte *) (obj + INTVAL ()) = val;
+      }
+      NEXT_INSN;
+
+    putfield_resolved_2:
+      {
+	jint val = POPI ();
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	*(jchar *) (obj + INTVAL ()) = val;
+      }
+      NEXT_INSN;
+
+    putfield_resolved_4:
+      {
+	jint val = POPI ();
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	*(jint *) (obj + INTVAL ()) = val;
+      }
+      NEXT_INSN;
+
+    putfield_resolved_8:
+      {
+	jlong val = POPL ();
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	*(jlong *) (obj + INTVAL ()) = val;
+      }
+      NEXT_INSN;
+
+    putfield_resolved_obj:
+      {
+	jobject val = POPA ();
+	char *obj = (char *) POPA ();
+	NULLCHECK (obj);
+	*(jobject *) (obj + INTVAL ()) = val;
+      }
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_invokespecial:
+      {
+	SAVE_PC();
+	int index = GET2U ();
+
+	rmeth = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+						   index)).rmethod;
+
+	sp -= rmeth->stack_item_count;
+
+	// We don't use NULLCHECK here because we can't rely on that
+	// working for <init>.  So instead we do an explicit test.
+	if (! sp[0].o)
+	  {
+	    SAVE_PC();
+	    throw_null_pointer_exception ();
+	  }
+
+	fun = (void (*)()) rmeth->method->ncode;
+
+#ifdef DIRECT_THREADED
+	// Rewrite instruction so that we use a faster pre-resolved
+	// method.
+	pc[-2].insn = &&invokespecial_resolved;
+	pc[-1].datum = rmeth;
+#endif /* DIRECT_THREADED */
+      }
+      goto perform_invoke;
+
+#ifdef DIRECT_THREADED
+    invokespecial_resolved:
+      {
+	SAVE_PC();
+	rmeth = (_Jv_ResolvedMethod *) AVAL ();
+	sp -= rmeth->stack_item_count;
+	// We don't use NULLCHECK here because we can't rely on that
+	// working for <init>.  So instead we do an explicit test.
+	if (! sp[0].o)
+	  {
+	    throw_null_pointer_exception ();
+	  }
+	fun = (void (*)()) rmeth->method->ncode;
+      }
+      goto perform_invoke;
+#endif /* DIRECT_THREADED */
+
+    insn_invokestatic:
+      {
+	SAVE_PC();
+	int index = GET2U ();
+
+	rmeth = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+						   index)).rmethod;
+
+	sp -= rmeth->stack_item_count;
+
+	fun = (void (*)()) rmeth->method->ncode;
+
+#ifdef DIRECT_THREADED
+	// Rewrite instruction so that we use a faster pre-resolved
+	// method.
+	pc[-2].insn = &&invokestatic_resolved;
+	pc[-1].datum = rmeth;
+#endif /* DIRECT_THREADED */
+      }
+      goto perform_invoke;
+
+#ifdef DIRECT_THREADED
+    invokestatic_resolved:
+      {
+	SAVE_PC();
+	rmeth = (_Jv_ResolvedMethod *) AVAL ();
+	sp -= rmeth->stack_item_count;
+	fun = (void (*)()) rmeth->method->ncode;
+      }
+      goto perform_invoke;
+#endif /* DIRECT_THREADED */
+
+    insn_invokeinterface:
+      {
+	SAVE_PC();
+	int index = GET2U ();
+
+	rmeth = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+						   index)).rmethod;
+
+	sp -= rmeth->stack_item_count;
+
+	jobject rcv = sp[0].o;
+
+	NULLCHECK (rcv);
+
+	fun = (void (*)())
+	  _Jv_LookupInterfaceMethod (rcv->getClass (),
+				     rmeth->method->name,
+				     rmeth->method->signature);
+
+#ifdef DIRECT_THREADED
+	// Rewrite instruction so that we use a faster pre-resolved
+	// method.
+	pc[-2].insn = &&invokeinterface_resolved;
+	pc[-1].datum = rmeth;
+#else
+	// Skip dummy bytes.
+	pc += 2;
+#endif /* DIRECT_THREADED */
+      }
+      goto perform_invoke;
+
+#ifdef DIRECT_THREADED
+    invokeinterface_resolved:
+      {
+	SAVE_PC();
+	rmeth = (_Jv_ResolvedMethod *) AVAL ();
+	sp -= rmeth->stack_item_count;
+	jobject rcv = sp[0].o;
+	NULLCHECK (rcv);
+	fun = (void (*)())
+	  _Jv_LookupInterfaceMethod (rcv->getClass (),
+				     rmeth->method->name,
+				     rmeth->method->signature);
+      }
+      goto perform_invoke;
+#endif /* DIRECT_THREADED */
+
+    insn_new:
+      {
+	SAVE_PC();
+	int index = GET2U ();
+	jclass klass = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+							  index)).clazz;
+	/* VM spec, section 3.11.5 */
+	if ((klass->getModifiers() & Modifier::ABSTRACT)
+	    || klass->isInterface())
+	  throw new java::lang::InstantiationException;
+	jobject res = _Jv_AllocObject (klass);
+	PUSHA (res);
+
+#ifdef DIRECT_THREADED
+	pc[-2].insn = &&new_resolved;
+	pc[-1].datum = klass;
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+    new_resolved:
+      {
+	jclass klass = (jclass) AVAL ();
+	jobject res = _Jv_AllocObject (klass);
+	PUSHA (res);
+      }
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_newarray:
+      {
+	int atype = GET1U ();
+	int size  = POPI();
+	jobject result = _Jv_NewArray (atype, size);
+	PUSHA (result);
+      }
+      NEXT_INSN;
+
+    insn_anewarray:
+      {
+	SAVE_PC();
+	int index = GET2U ();
+	jclass klass = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+							  index)).clazz;
+	int size  = POPI();
+	jobject result = _Jv_NewObjectArray (size, klass, 0);
+	PUSHA (result);
+
+#ifdef DIRECT_THREADED
+	pc[-2].insn = &&anewarray_resolved;
+	pc[-1].datum = klass;
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+    anewarray_resolved:
+      {
+	jclass klass = (jclass) AVAL ();
+	int size = POPI ();
+	jobject result = _Jv_NewObjectArray (size, klass, 0);
+	PUSHA (result);
+      }
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_arraylength:
+      {
+	__JArray *arr = (__JArray*)POPA();
+	NULLARRAYCHECK (arr);
+	PUSHI (arr->length);
+      }
+      NEXT_INSN;
+
+    insn_athrow:
+      {
+	jobject value = POPA();
+	throw static_cast<jthrowable>(value);
+      }
+      NEXT_INSN;
+
+    insn_checkcast:
+      {
+        SAVE_PC();
+	jobject value = POPA();
+	jint index = GET2U ();
+	jclass to = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+						       index)).clazz;
+
+	value = (jobject) _Jv_CheckCast (to, value);
+
+	PUSHA (value);
+
+#ifdef DIRECT_THREADED
+	pc[-2].insn = &&checkcast_resolved;
+	pc[-1].datum = to;
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+    checkcast_resolved:
+      {
+        SAVE_PC();
+	jobject value = POPA ();
+	jclass to = (jclass) AVAL ();
+	value = (jobject) _Jv_CheckCast (to, value);
+	PUSHA (value);
+      }
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_instanceof:
+      {
+        SAVE_PC();
+	jobject value = POPA();
+	jint index = GET2U ();
+	jclass to = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+						       index)).clazz;
+	PUSHI (to->isInstance (value));
+
+#ifdef DIRECT_THREADED
+	pc[-2].insn = &&instanceof_resolved;
+	pc[-1].datum = to;
+#endif /* DIRECT_THREADED */
+      }
+      NEXT_INSN;
+
+#ifdef DIRECT_THREADED
+    instanceof_resolved:
+      {
+	jobject value = POPA ();
+	jclass to = (jclass) AVAL ();
+	PUSHI (to->isInstance (value));
+      }
+      NEXT_INSN;
+#endif /* DIRECT_THREADED */
+
+    insn_monitorenter:
+      {
+	jobject value = POPA();
+	NULLCHECK(value);
+	_Jv_MonitorEnter (value);
+      }
+      NEXT_INSN;
+
+    insn_monitorexit:
+      {
+	jobject value = POPA();
+	NULLCHECK(value);
+	_Jv_MonitorExit (value);
+      }
+      NEXT_INSN;
+
+    insn_ifnull:
+      {
+	jobject val = POPA();
+	if (val == NULL)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_ifnonnull:
+      {
+	jobject val = POPA();
+	if (val != NULL)
+	  TAKE_GOTO;
+	else
+	  SKIP_GOTO;
+      }
+      NEXT_INSN;
+
+    insn_multianewarray:
+      {
+	SAVE_PC();
+	int kind_index = GET2U ();
+	int dim        = GET1U ();
+
+	jclass type    
+	  = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+					       kind_index)).clazz;
+	jint *sizes    = (jint*) __builtin_alloca (sizeof (jint)*dim);
+
+	for (int i = dim - 1; i >= 0; i--)
+	  {
+	    sizes[i] = POPI ();
+	  }
+
+	jobject res    = _Jv_NewMultiArray (type,dim, sizes);
+
+	PUSHA (res);
+      }
+      NEXT_INSN;
+
+#ifndef DIRECT_THREADED
+    insn_wide:
+      {
+	jint the_mod_op = get1u (pc++);
+	jint wide       = get2u (pc); pc += 2;
+
+	switch (the_mod_op)
+	  {
+	  case op_istore:
+	    STOREI (wide);
+	    NEXT_INSN;
+
+	  case op_fstore:
+	    STOREF (wide);
+	    NEXT_INSN;
+
+	  case op_astore:
+	    STOREA (wide);
+	    NEXT_INSN;
+
+	  case op_lload:
+	    LOADL (wide);
+	    NEXT_INSN;
+
+	  case op_dload:
+	    LOADD (wide);
+	    NEXT_INSN;
+
+	  case op_iload:
+	    LOADI (wide);
+	    NEXT_INSN;
+
+	  case op_fload:
+	    LOADF (wide);
+	    NEXT_INSN;
+
+	  case op_aload:
+	    LOADA (wide);
+	    NEXT_INSN;
+
+	  case op_lstore:
+	    STOREL (wide);
+	    NEXT_INSN;
+
+	  case op_dstore:
+	    STORED (wide);
+	    NEXT_INSN;
+
+	  case op_ret:
+	    pc = (unsigned char*) PEEKA (wide);
+	    NEXT_INSN;
+
+	  case op_iinc:
+	    {
+	      jint amount = get2s (pc); pc += 2;
+	      jint value = PEEKI (wide);
+	      POKEI (wide, value+amount);
+	    }
+	    NEXT_INSN;
+
+	  default:
+	    throw_internal_error ("illegal bytecode modified by wide");
+	  }
+
+      }
+#endif /* DIRECT_THREADED */
+
+    insn_breakpoint:
+      {
+	// nothing just yet
+      }
+    }
+  catch (java::lang::Throwable *ex)
+    {
+#ifdef DIRECT_THREADED
+      void *logical_pc = (void *) ((insn_slot *) pc - 1);
+#else
+      int logical_pc = pc - 1 - meth->bytecode ();
+#endif
+      _Jv_InterpException *exc = meth->exceptions ();
+      jclass exc_class = ex->getClass ();
+
+      for (int i = 0; i < meth->exc_count; i++)
+	{
+	  if (PCVAL (exc[i].start_pc) <= logical_pc
+	      && logical_pc < PCVAL (exc[i].end_pc))
+	    {
+#ifdef DIRECT_THREADED
+	      jclass handler = (jclass) exc[i].handler_type.p;
+#else
+	      jclass handler = NULL;
+	      if (exc[i].handler_type.i != 0)
+		handler = (_Jv_Linker::resolve_pool_entry (meth->defining_class,
+							   exc[i].handler_type.i)).clazz;
+#endif /* DIRECT_THREADED */
+
+	      if (handler == NULL || handler->isAssignableFrom (exc_class))
+		{
+
+#ifdef DIRECT_THREADED
+		  pc = (insn_slot *) exc[i].handler_pc.p;
+#else
+		  pc = meth->bytecode () + exc[i].handler_pc.i;
+#endif /* DIRECT_THREADED */
+		  sp = stack;
+		  sp++->o = ex; // Push exception.
+		  NEXT_INSN;
+		}
+	    }
+	}
+
+      // No handler, so re-throw.
+      throw ex;
+    }

Added: llvm-gcc-4.2/trunk/libjava/interpret.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/interpret.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/interpret.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/interpret.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1676 @@
+// interpret.cc - Code for the interpreter
+
+/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+/* Author: Kresten Krab Thorup <krab at gnu.org>  */
+
+#include <config.h>
+#include <platform.h>
+
+#pragma implementation "java-interp.h"
+
+#include <jvm.h>
+#include <java-cpool.h>
+#include <java-interp.h>
+#include <java/lang/System.h>
+#include <java/lang/String.h>
+#include <java/lang/Integer.h>
+#include <java/lang/Long.h>
+#include <java/lang/StringBuffer.h>
+#include <java/lang/Class.h>
+#include <java/lang/reflect/Modifier.h>
+#include <java/lang/InternalError.h>
+#include <java/lang/NullPointerException.h>
+#include <java/lang/ArithmeticException.h>
+#include <java/lang/IncompatibleClassChangeError.h>
+#include <java/lang/InstantiationException.h>
+#include <java/lang/Thread.h>
+#include <java-insns.h>
+#include <java-signal.h>
+#include <java/lang/ClassFormatError.h>
+#include <execution.h>
+#include <java/lang/reflect/Modifier.h>
+
+#include <gnu/classpath/jdwp/Jdwp.h>
+
+#ifdef INTERPRETER
+
+// Execution engine for interpreted code.
+_Jv_InterpreterEngine _Jv_soleInterpreterEngine;
+
+#include <stdlib.h>
+
+using namespace gcj;
+
+static void throw_internal_error (const char *msg)
+  __attribute__ ((__noreturn__));
+static void throw_incompatible_class_change_error (jstring msg)
+  __attribute__ ((__noreturn__));
+static void throw_null_pointer_exception ()
+  __attribute__ ((__noreturn__));
+
+static void throw_class_format_error (jstring msg)
+	__attribute__ ((__noreturn__));
+static void throw_class_format_error (const char *msg)
+	__attribute__ ((__noreturn__));
+
+#ifdef DIRECT_THREADED
+// Lock to ensure that methods are not compiled concurrently.
+// We could use a finer-grained lock here, however it is not safe to use
+// the Class monitor as user code in another thread could hold it.
+static _Jv_Mutex_t compile_mutex;
+
+void
+_Jv_InitInterpreter()
+{
+  _Jv_MutexInit (&compile_mutex);
+}
+#else
+void _Jv_InitInterpreter() {}
+#endif
+
+// The breakpoint instruction. For the direct threaded case,
+// _Jv_InterpMethod::compile will initialize breakpoint_insn
+// the first time it is called.
+#ifdef DIRECT_THREADED
+insn_slot _Jv_InterpMethod::bp_insn_slot;
+pc_t _Jv_InterpMethod::breakpoint_insn = NULL;
+#else
+unsigned char _Jv_InterpMethod::bp_insn_opcode
+  = static_cast<unsigned char> (op_breakpoint);
+pc_t _Jv_InterpMethod::breakpoint_insn = &_Jv_InterpMethod::bp_insn_opcode;
+#endif
+
+extern "C" double __ieee754_fmod (double,double);
+
+static inline void dupx (_Jv_word *sp, int n, int x)
+{
+  // first "slide" n+x elements n to the right
+  int top = n-1;
+  for (int i = 0; i < n+x; i++)
+    {
+      sp[(top-i)] = sp[(top-i)-n];
+    }
+  
+  // next, copy the n top elements, n+x down
+  for (int i = 0; i < n; i++)
+    {
+      sp[top-(n+x)-i] = sp[top-i];
+    }
+}
+
+// Used to convert from floating types to integral types.
+template<typename TO, typename FROM>
+static inline TO
+convert (FROM val, TO min, TO max)
+{
+  TO ret;
+  if (val >= (FROM) max)
+    ret = max;
+  else if (val <= (FROM) min)
+    ret = min;
+  else if (val != val)
+    ret = 0;
+  else
+    ret = (TO) val;
+  return ret;
+}
+
+#define PUSHA(V)  (sp++)->o = (V)
+#define PUSHI(V)  (sp++)->i = (V)
+#define PUSHF(V)  (sp++)->f = (V)
+#if SIZEOF_VOID_P == 8
+# define PUSHL(V)   (sp->l = (V), sp += 2)
+# define PUSHD(V)   (sp->d = (V), sp += 2)
+#else
+# define PUSHL(V)  do { _Jv_word2 w2; w2.l=(V); \
+                        (sp++)->ia[0] = w2.ia[0]; \
+                        (sp++)->ia[0] = w2.ia[1]; } while (0)
+# define PUSHD(V)  do { _Jv_word2 w2; w2.d=(V); \
+                        (sp++)->ia[0] = w2.ia[0]; \
+                        (sp++)->ia[0] = w2.ia[1]; } while (0)
+#endif
+
+#define POPA()    ((--sp)->o)
+#define POPI()    ((jint) (--sp)->i) // cast since it may be promoted
+#define POPF()    ((jfloat) (--sp)->f)
+#if SIZEOF_VOID_P == 8
+# define POPL()	  (sp -= 2, (jlong) sp->l)
+# define POPD()	  (sp -= 2, (jdouble) sp->d)
+#else
+# define POPL()    ({ _Jv_word2 w2; \
+                     w2.ia[1] = (--sp)->ia[0]; \
+                     w2.ia[0] = (--sp)->ia[0]; w2.l; })
+# define POPD()    ({ _Jv_word2 w2; \
+                     w2.ia[1] = (--sp)->ia[0]; \
+                     w2.ia[0] = (--sp)->ia[0]; w2.d; })
+#endif
+
+#define LOADA(I)  (sp++)->o = locals[I].o
+#define LOADI(I)  (sp++)->i = locals[I].i
+#define LOADF(I)  (sp++)->f = locals[I].f
+#if SIZEOF_VOID_P == 8
+# define LOADL(I)  (sp->l = locals[I].l, sp += 2)
+# define LOADD(I)  (sp->d = locals[I].d, sp += 2)
+#else
+# define LOADL(I)  do { jint __idx = (I); \
+    			(sp++)->ia[0] = locals[__idx].ia[0]; \
+    			(sp++)->ia[0] = locals[__idx+1].ia[0]; \
+ 		   } while (0)
+# define LOADD(I)  LOADL(I)
+#endif
+
+#define STOREA(I) 		\
+do {					\
+DEBUG_LOCALS_INSN(I, 'o');		\
+locals[I].o = (--sp)->o;		\
+} while(0)
+#define STOREI(I) 		\
+do {					\
+DEBUG_LOCALS_INSN (I, 'i');		\
+locals[I].i = (--sp)->i;		\
+} while(0)
+#define STOREF(I)  		\
+do {					\
+DEBUG_LOCALS_INSN (I, 'f');		\
+locals[I].f = (--sp)->f;		\
+} while(0)
+#if SIZEOF_VOID_P == 8
+# define STOREL(I)  			\
+do {							\
+DEBUG_LOCALS_INSN (I, 'l');			\
+(sp -= 2, locals[I].l = sp->l);		\
+} while(0)
+# define STORED(I) 				\
+do {							\
+DEBUG_LOCALS_INSN (I, 'd');			\
+(sp -= 2, locals[I].d = sp->d);		\
+} while(0)
+
+#else
+# define STOREL(I)		\
+do { DEBUG_LOCALS_INSN(I, 'l');	\
+	 jint __idx = (I); 	\
+     locals[__idx+1].ia[0] = (--sp)->ia[0]; \
+     locals[__idx].ia[0] = (--sp)->ia[0]; 	\
+   } while (0)
+# define STORED(I)		\
+do { DEBUG_LOCALS_INSN(I, 'd');	\
+	 jint __idx = (I); 	\
+     locals[__idx+1].ia[0] = (--sp)->ia[0]; \
+     locals[__idx].ia[0] = (--sp)->ia[0]; 	\
+   } while (0)
+#endif
+
+#define PEEKI(I)  (locals+(I))->i
+#define PEEKA(I)  (locals+(I))->o
+
+#define POKEI(I,V)  	\
+DEBUG_LOCALS_INSN(I,'i'); \
+((locals+(I))->i = (V))
+
+
+#define BINOPI(OP) { \
+   jint value2 = POPI(); \
+   jint value1 = POPI(); \
+   PUSHI(value1 OP value2); \
+}
+
+#define BINOPF(OP) { \
+   jfloat value2 = POPF(); \
+   jfloat value1 = POPF(); \
+   PUSHF(value1 OP value2); \
+}
+
+#define BINOPL(OP) { \
+   jlong value2 = POPL(); \
+   jlong value1 = POPL(); \
+   PUSHL(value1 OP value2); \
+}
+
+#define BINOPD(OP) { \
+   jdouble value2 = POPD(); \
+   jdouble value1 = POPD(); \
+   PUSHD(value1 OP value2); \
+}
+
+static inline jint get1s(unsigned char* loc) {
+  return *(signed char*)loc;
+}
+
+static inline jint get1u(unsigned char* loc) {
+  return *loc;
+}
+
+static inline jint get2s(unsigned char* loc) {
+  return (((jint)*(signed char*)loc) << 8) | ((jint)*(loc+1));
+}
+
+static inline jint get2u(unsigned char* loc) {
+  return (((jint)(*loc)) << 8) | ((jint)*(loc+1));
+}
+
+static jint get4(unsigned char* loc) {
+  return (((jint)(loc[0])) << 24) 
+       | (((jint)(loc[1])) << 16) 
+       | (((jint)(loc[2])) << 8) 
+       | (((jint)(loc[3])) << 0);
+}
+
+#define SAVE_PC() frame_desc.pc = pc
+
+// We used to define this conditionally, depending on HANDLE_SEGV.
+// However, that runs into a problem if a chunk in low memory is
+// mapped and we try to look at a field near the end of a large
+// object.  See PR 26858 for details.  It is, most likely, relatively
+// inexpensive to simply do this check always.
+#define NULLCHECK(X) \
+  do { SAVE_PC(); if ((X)==NULL) throw_null_pointer_exception (); } while (0)
+
+// Note that we can still conditionally define NULLARRAYCHECK, since
+// we know that all uses of an array will first reference the length
+// field, which is first -- and thus will trigger a SEGV.
+#ifdef HANDLE_SEGV
+#define NULLARRAYCHECK(X) SAVE_PC()
+#else
+#define NULLARRAYCHECK(X) \
+  do { SAVE_PC(); if ((X)==NULL) { throw_null_pointer_exception (); } } while (0)
+#endif
+
+#define ARRAYBOUNDSCHECK(array, index)					      \
+  do									      \
+    {									      \
+      if (((unsigned) index) >= (unsigned) (array->length))		      \
+	_Jv_ThrowBadArrayIndex (index);					      \
+    }									      \
+  while (0)
+
+void
+_Jv_InterpMethod::run_normal (ffi_cif *,
+			      void* ret,
+			      ffi_raw * args,
+			      void* __this)
+{
+  _Jv_InterpMethod *_this = (_Jv_InterpMethod *) __this;
+  run (ret, args, _this);
+}
+
+void
+_Jv_InterpMethod::run_normal_debug (ffi_cif *,
+			      void* ret,
+			      ffi_raw * args,
+			      void* __this)
+{
+  _Jv_InterpMethod *_this = (_Jv_InterpMethod *) __this;
+  run_debug (ret, args, _this);
+}
+
+void
+_Jv_InterpMethod::run_synch_object (ffi_cif *,
+				    void* ret,
+				    ffi_raw * args,
+				    void* __this)
+{
+  _Jv_InterpMethod *_this = (_Jv_InterpMethod *) __this;
+
+  jobject rcv = (jobject) args[0].ptr;
+  JvSynchronize mutex (rcv);
+
+  run (ret, args, _this);
+}
+
+void
+_Jv_InterpMethod::run_synch_object_debug (ffi_cif *,
+				    void* ret,
+				    ffi_raw * args,
+				    void* __this)
+{
+  _Jv_InterpMethod *_this = (_Jv_InterpMethod *) __this;
+
+  jobject rcv = (jobject) args[0].ptr;
+  JvSynchronize mutex (rcv);
+
+  run_debug (ret, args, _this);
+}
+
+void
+_Jv_InterpMethod::run_class (ffi_cif *,
+			     void* ret,
+			     ffi_raw * args,
+			     void* __this)
+{
+  _Jv_InterpMethod *_this = (_Jv_InterpMethod *) __this;
+  _Jv_InitClass (_this->defining_class);
+  run (ret, args, _this);
+}
+
+void
+_Jv_InterpMethod::run_class_debug (ffi_cif *,
+			     void* ret,
+			     ffi_raw * args,
+			     void* __this)
+{
+  _Jv_InterpMethod *_this = (_Jv_InterpMethod *) __this;
+  _Jv_InitClass (_this->defining_class);
+  run_debug (ret, args, _this);
+}
+
+void
+_Jv_InterpMethod::run_synch_class (ffi_cif *,
+				   void* ret,
+				   ffi_raw * args,
+				   void* __this)
+{
+  _Jv_InterpMethod *_this = (_Jv_InterpMethod *) __this;
+
+  jclass sync = _this->defining_class;
+  _Jv_InitClass (sync);
+  JvSynchronize mutex (sync);
+
+  run (ret, args, _this);
+}
+
+void
+_Jv_InterpMethod::run_synch_class_debug (ffi_cif *,
+				   void* ret,
+				   ffi_raw * args,
+				   void* __this)
+{
+  _Jv_InterpMethod *_this = (_Jv_InterpMethod *) __this;
+
+  jclass sync = _this->defining_class;
+  _Jv_InitClass (sync);
+  JvSynchronize mutex (sync);
+
+  run_debug (ret, args, _this);
+}
+
+#ifdef DIRECT_THREADED
+// "Compile" a method by turning it from bytecode to direct-threaded
+// code.
+void
+_Jv_InterpMethod::compile (const void * const *insn_targets)
+{
+  insn_slot *insns = NULL;
+  int next = 0;
+  unsigned char *codestart = bytecode ();
+  unsigned char *end = codestart + code_length;
+  _Jv_word *pool_data = defining_class->constants.data;
+
+#define SET_ONE(Field, Value)						      \
+  do									      \
+    {									      \
+      if (first_pass)							      \
+	++next;								      \
+      else								      \
+	insns[next++].Field = Value;					      \
+    }									      \
+  while (0)
+
+#define SET_INSN(Value) SET_ONE (insn, (void *) Value)
+#define SET_INT(Value) SET_ONE (int_val, Value)
+#define SET_DATUM(Value) SET_ONE (datum, Value)
+
+  // Map from bytecode PC to slot in INSNS.
+  int *pc_mapping = (int *) __builtin_alloca (sizeof (int) * code_length);
+  for (int i = 0; i < code_length; ++i)
+    pc_mapping[i] = -1;
+
+  for (int i = 0; i < 2; ++i)
+    {
+      jboolean first_pass = i == 0;
+
+      if (! first_pass)
+	{
+	  insns = (insn_slot *) _Jv_AllocBytes (sizeof (insn_slot) * next);
+	  number_insn_slots = next;
+	  next = 0;
+	}
+
+      unsigned char *pc = codestart;
+      while (pc < end)
+	{
+	  int base_pc_val = pc - codestart;
+	  if (first_pass)
+	    pc_mapping[base_pc_val] = next;
+
+	  java_opcode opcode = (java_opcode) *pc++;
+	  // Just elide NOPs.
+	  if (opcode == op_nop)
+	    continue;
+	  SET_INSN (insn_targets[opcode]);
+
+	  switch (opcode)
+	    {
+	    case op_nop:
+	    case op_aconst_null:
+	    case op_iconst_m1:
+	    case op_iconst_0:
+	    case op_iconst_1:
+	    case op_iconst_2:
+	    case op_iconst_3:
+	    case op_iconst_4:
+	    case op_iconst_5:
+	    case op_lconst_0:
+	    case op_lconst_1:
+	    case op_fconst_0:
+	    case op_fconst_1:
+	    case op_fconst_2:
+	    case op_dconst_0:
+	    case op_dconst_1:
+	    case op_iload_0:
+	    case op_iload_1:
+	    case op_iload_2:
+	    case op_iload_3:
+	    case op_lload_0:
+	    case op_lload_1:
+	    case op_lload_2:
+	    case op_lload_3:
+	    case op_fload_0:
+	    case op_fload_1:
+	    case op_fload_2:
+	    case op_fload_3:
+	    case op_dload_0:
+	    case op_dload_1:
+	    case op_dload_2:
+	    case op_dload_3:
+	    case op_aload_0:
+	    case op_aload_1:
+	    case op_aload_2:
+	    case op_aload_3:
+	    case op_iaload:
+	    case op_laload:
+	    case op_faload:
+	    case op_daload:
+	    case op_aaload:
+	    case op_baload:
+	    case op_caload:
+	    case op_saload:
+	    case op_istore_0:
+	    case op_istore_1:
+	    case op_istore_2:
+	    case op_istore_3:
+	    case op_lstore_0:
+	    case op_lstore_1:
+	    case op_lstore_2:
+	    case op_lstore_3:
+	    case op_fstore_0:
+	    case op_fstore_1:
+	    case op_fstore_2:
+	    case op_fstore_3:
+	    case op_dstore_0:
+	    case op_dstore_1:
+	    case op_dstore_2:
+	    case op_dstore_3:
+	    case op_astore_0:
+	    case op_astore_1:
+	    case op_astore_2:
+	    case op_astore_3:
+	    case op_iastore:
+	    case op_lastore:
+	    case op_fastore:
+	    case op_dastore:
+	    case op_aastore:
+	    case op_bastore:
+	    case op_castore:
+	    case op_sastore:
+	    case op_pop:
+	    case op_pop2:
+	    case op_dup:
+	    case op_dup_x1:
+	    case op_dup_x2:
+	    case op_dup2:
+	    case op_dup2_x1:
+	    case op_dup2_x2:
+	    case op_swap:
+	    case op_iadd:
+	    case op_isub:
+	    case op_imul:
+	    case op_idiv:
+	    case op_irem:
+	    case op_ishl:
+	    case op_ishr:
+	    case op_iushr:
+	    case op_iand:
+	    case op_ior:
+	    case op_ixor:
+	    case op_ladd:
+	    case op_lsub:
+	    case op_lmul:
+	    case op_ldiv:
+	    case op_lrem:
+	    case op_lshl:
+	    case op_lshr:
+	    case op_lushr:
+	    case op_land:
+	    case op_lor:
+	    case op_lxor:
+	    case op_fadd:
+	    case op_fsub:
+	    case op_fmul:
+	    case op_fdiv:
+	    case op_frem:
+	    case op_dadd:
+	    case op_dsub:
+	    case op_dmul:
+	    case op_ddiv:
+	    case op_drem:
+	    case op_ineg:
+	    case op_i2b:
+	    case op_i2c:
+	    case op_i2s:
+	    case op_lneg:
+	    case op_fneg:
+	    case op_dneg:
+	    case op_i2l:
+	    case op_i2f:
+	    case op_i2d:
+	    case op_l2i:
+	    case op_l2f:
+	    case op_l2d:
+	    case op_f2i:
+	    case op_f2l:
+	    case op_f2d:
+	    case op_d2i:
+	    case op_d2l:
+	    case op_d2f:
+	    case op_lcmp:
+	    case op_fcmpl:
+	    case op_fcmpg:
+	    case op_dcmpl:
+	    case op_dcmpg:
+	    case op_monitorenter:
+	    case op_monitorexit:
+	    case op_ireturn:
+	    case op_lreturn:
+	    case op_freturn:
+	    case op_dreturn:
+	    case op_areturn:
+	    case op_return:
+	    case op_athrow:
+	    case op_arraylength:
+	      // No argument, nothing else to do.
+	      break;
+
+	    case op_bipush:
+	      SET_INT (get1s (pc));
+	      ++pc;
+	      break;
+
+	    case op_ldc:
+	      {
+		int index = get1u (pc);
+		++pc;
+		// For an unresolved class we want to delay resolution
+		// until execution.
+		if (defining_class->constants.tags[index] == JV_CONSTANT_Class)
+		  {
+		    --next;
+		    SET_INSN (insn_targets[int (op_jsr_w) + 1]);
+		    SET_INT (index);
+		  }
+		else
+		  SET_DATUM (pool_data[index].o);
+	      }
+	      break;
+
+	    case op_ret:
+	    case op_iload:
+	    case op_lload:
+	    case op_fload:
+	    case op_dload:
+	    case op_aload:
+	    case op_istore:
+	    case op_lstore:
+	    case op_fstore:
+	    case op_dstore:
+	    case op_astore:
+	    case op_newarray:
+	      SET_INT (get1u (pc));
+	      ++pc;
+	      break;
+
+	    case op_iinc:
+	      SET_INT (get1u (pc));
+	      SET_INT (get1s (pc + 1));
+	      pc += 2;
+	      break;
+
+	    case op_ldc_w:
+	      {
+		int index = get2u (pc);
+		pc += 2;
+		// For an unresolved class we want to delay resolution
+		// until execution.
+		if (defining_class->constants.tags[index] == JV_CONSTANT_Class)
+		  {
+		    --next;
+		    SET_INSN (insn_targets[int (op_jsr_w) + 1]);
+		    SET_INT (index);
+		  }
+		else
+		  SET_DATUM (pool_data[index].o);
+	      }
+	      break;
+
+	    case op_ldc2_w:
+	      {
+		int index = get2u (pc);
+		pc += 2;
+		SET_DATUM (&pool_data[index]);
+	      }
+	      break;
+
+	    case op_sipush:
+	      SET_INT (get2s (pc));
+	      pc += 2;
+	      break;
+
+	    case op_new:
+	    case op_getstatic:
+	    case op_getfield:
+	    case op_putfield:
+	    case op_putstatic:
+	    case op_anewarray:
+	    case op_instanceof:
+	    case op_checkcast:
+	    case op_invokespecial:
+	    case op_invokestatic:
+	    case op_invokevirtual:
+	      SET_INT (get2u (pc));
+	      pc += 2;
+	      break;
+
+	    case op_multianewarray:
+	      SET_INT (get2u (pc));
+	      SET_INT (get1u (pc + 2));
+	      pc += 3;
+	      break;
+
+	    case op_jsr:
+	    case op_ifeq:
+	    case op_ifne:
+	    case op_iflt:
+	    case op_ifge:
+	    case op_ifgt:
+	    case op_ifle:
+	    case op_if_icmpeq:
+	    case op_if_icmpne:
+	    case op_if_icmplt:
+	    case op_if_icmpge:
+	    case op_if_icmpgt:
+	    case op_if_icmple:
+	    case op_if_acmpeq:
+	    case op_if_acmpne:
+	    case op_ifnull:
+	    case op_ifnonnull:
+	    case op_goto:
+	      {
+		int offset = get2s (pc);
+		pc += 2;
+
+		int new_pc = base_pc_val + offset;
+
+		bool orig_was_goto = opcode == op_goto;
+
+		// Thread jumps.  We limit the loop count; this lets
+		// us avoid infinite loops if the bytecode contains
+		// such.  `10' is arbitrary.
+		int count = 10;
+		while (codestart[new_pc] == op_goto && count-- > 0)
+		  new_pc += get2s (&codestart[new_pc + 1]);
+
+		// If the jump takes us to a `return' instruction and
+		// the original branch was an unconditional goto, then
+		// we hoist the return.
+		opcode = (java_opcode) codestart[new_pc];
+		if (orig_was_goto
+		    && (opcode == op_ireturn || opcode == op_lreturn
+			|| opcode == op_freturn || opcode == op_dreturn
+			|| opcode == op_areturn || opcode == op_return))
+		  {
+		    --next;
+		    SET_INSN (insn_targets[opcode]);
+		  }
+		else
+		  SET_DATUM (&insns[pc_mapping[new_pc]]);
+	      }
+	      break;
+
+	    case op_tableswitch:
+	      {
+		while ((pc - codestart) % 4 != 0)
+		  ++pc;
+
+		jint def = get4 (pc);
+		SET_DATUM (&insns[pc_mapping[base_pc_val + def]]);
+		pc += 4;
+
+		int low = get4 (pc);
+		SET_INT (low);
+		pc += 4;
+		int high = get4 (pc);
+		SET_INT (high);
+		pc += 4;
+
+		for (int i = low; i <= high; ++i)
+		  {
+		    SET_DATUM (&insns[pc_mapping[base_pc_val + get4 (pc)]]);
+		    pc += 4;
+		  }
+	      }
+	      break;
+
+	    case op_lookupswitch:
+	      {
+		while ((pc - codestart) % 4 != 0)
+		  ++pc;
+
+		jint def = get4 (pc);
+		SET_DATUM (&insns[pc_mapping[base_pc_val + def]]);
+		pc += 4;
+
+		jint npairs = get4 (pc);
+		pc += 4;
+		SET_INT (npairs);
+
+		while (npairs-- > 0)
+		  {
+		    jint match = get4 (pc);
+		    jint offset = get4 (pc + 4);
+		    SET_INT (match);
+		    SET_DATUM (&insns[pc_mapping[base_pc_val + offset]]);
+		    pc += 8;
+		  }
+	      }
+	      break;
+
+	    case op_invokeinterface:
+	      {
+		jint index = get2u (pc);
+		pc += 2;
+		// We ignore the next two bytes.
+		pc += 2;
+		SET_INT (index);
+	      }
+	      break;
+
+	    case op_wide:
+	      {
+		opcode = (java_opcode) get1u (pc);
+		pc += 1;
+		jint val = get2u (pc);
+		pc += 2;
+
+		// We implement narrow and wide instructions using the
+		// same code in the interpreter.  So we rewrite the
+		// instruction slot here.
+		if (! first_pass)
+		  insns[next - 1].insn = (void *) insn_targets[opcode];
+		SET_INT (val);
+
+		if (opcode == op_iinc)
+		  {
+		    SET_INT (get2s (pc));
+		    pc += 2;
+		  }
+	      }
+	      break;
+
+	    case op_jsr_w:
+	    case op_goto_w:
+	      {
+		jint offset = get4 (pc);
+		pc += 4;
+		SET_DATUM (&insns[pc_mapping[base_pc_val + offset]]);
+	      }
+	      break;
+
+	    // Some "can't happen" cases that we include for
+	    // error-checking purposes.
+	    case op_putfield_1:
+	    case op_putfield_2:
+	    case op_putfield_4:
+	    case op_putfield_8:
+	    case op_putfield_a:
+	    case op_putstatic_1:
+	    case op_putstatic_2:
+	    case op_putstatic_4:
+	    case op_putstatic_8:
+	    case op_putstatic_a:
+	    case op_getfield_1:
+	    case op_getfield_2s:
+	    case op_getfield_2u:
+	    case op_getfield_4:
+	    case op_getfield_8:
+	    case op_getfield_a:
+	    case op_getstatic_1:
+	    case op_getstatic_2s:
+	    case op_getstatic_2u:
+	    case op_getstatic_4:
+	    case op_getstatic_8:
+	    case op_getstatic_a:
+	    case op_breakpoint:
+	    default:
+	      // Fail somehow.
+	      break;
+	    }
+	}
+    }
+
+  // Now update exceptions.
+  _Jv_InterpException *exc = exceptions ();
+  for (int i = 0; i < exc_count; ++i)
+    {
+      exc[i].start_pc.p = &insns[pc_mapping[exc[i].start_pc.i]];
+      exc[i].end_pc.p = &insns[pc_mapping[exc[i].end_pc.i]];
+      exc[i].handler_pc.p = &insns[pc_mapping[exc[i].handler_pc.i]];
+      // FIXME: resolve_pool_entry can throw - we shouldn't be doing this
+      // during compilation.
+      jclass handler
+	= (_Jv_Linker::resolve_pool_entry (defining_class,
+					     exc[i].handler_type.i)).clazz;
+      exc[i].handler_type.p = handler;
+    }
+
+  // Translate entries in the LineNumberTable from bytecode PC's to direct
+  // threaded interpreter instruction values.
+  for (int i = 0; i < line_table_len; i++)
+    {
+      int byte_pc = line_table[i].bytecode_pc;
+      // It isn't worth throwing an exception if this table is
+      // corrupted, but at the same time we don't want a crash.
+      if (byte_pc < 0 || byte_pc >= code_length)
+	byte_pc = 0;
+      line_table[i].pc = &insns[pc_mapping[byte_pc]];
+    }  
+
+  prepared = insns;
+
+  if (breakpoint_insn == NULL)
+    {
+      bp_insn_slot.insn = const_cast<void *> (insn_targets[op_breakpoint]);
+      breakpoint_insn = &bp_insn_slot;
+    }
+}
+#endif /* DIRECT_THREADED */
+
+/* Run the given method.
+   When args is NULL, don't run anything -- just compile it. */
+void
+_Jv_InterpMethod::run (void *retp, ffi_raw *args, _Jv_InterpMethod *meth)
+{
+#undef DEBUG
+#undef DEBUG_LOCALS_INSN
+#define DEBUG_LOCALS_INSN(s, t) do {} while(0)
+
+#include "interpret-run.cc"
+}
+
+void
+_Jv_InterpMethod::run_debug (void *retp, ffi_raw *args, _Jv_InterpMethod *meth)
+{
+/* Used to keep track of local variable type
+ * 
+ * Possible Types:
+ * o object
+ * i integer
+ * f float
+ * l long 
+ * d double 
+ */
+#define DEBUG
+#undef DEBUG_LOCALS_INSN
+#define DEBUG_LOCALS_INSN(s, t) do {} while(0)
+
+#include "interpret-run.cc"
+}
+
+static void
+throw_internal_error (const char *msg)
+{
+  throw new java::lang::InternalError (JvNewStringLatin1 (msg));
+}
+
+static void 
+throw_incompatible_class_change_error (jstring msg)
+{
+  throw new java::lang::IncompatibleClassChangeError (msg);
+}
+
+static void 
+throw_null_pointer_exception ()
+{
+  throw new java::lang::NullPointerException;
+}
+
+/* Look up source code line number for given bytecode (or direct threaded
+   interpreter) PC. */
+int
+_Jv_InterpMethod::get_source_line(pc_t mpc)
+{
+  int line = line_table_len > 0 ? line_table[0].line : -1;
+  for (int i = 1; i < line_table_len; i++)
+    if (line_table[i].pc > mpc)
+      break;
+    else
+      line = line_table[i].line;
+
+  return line;
+}
+
+/** Do static initialization for fields with a constant initializer */
+void
+_Jv_InitField (jobject obj, jclass klass, int index)
+{
+  using namespace java::lang::reflect;
+
+  if (obj != 0 && klass == 0)
+    klass = obj->getClass ();
+
+  if (!_Jv_IsInterpretedClass (klass))
+    return;
+
+  _Jv_InterpClass *iclass = (_Jv_InterpClass*)klass->aux_info;
+
+  _Jv_Field * field = (&klass->fields[0]) + index;
+
+  if (index > klass->field_count)
+    throw_internal_error ("field out of range");
+
+  int init = iclass->field_initializers[index];
+  if (init == 0)
+    return;
+
+  _Jv_Constants *pool = &klass->constants;
+  int tag = pool->tags[init];
+
+  if (! field->isResolved ())
+    throw_internal_error ("initializing unresolved field");
+
+  if (obj==0 && ((field->flags & Modifier::STATIC) == 0))
+    throw_internal_error ("initializing non-static field with no object");
+
+  void *addr = 0;
+
+  if ((field->flags & Modifier::STATIC) != 0)
+    addr = (void*) field->u.addr;
+  else
+    addr = (void*) (((char*)obj) + field->u.boffset);
+
+  switch (tag)
+    {
+    case JV_CONSTANT_String:
+      {
+	jstring str;
+	str = _Jv_NewStringUtf8Const (pool->data[init].utf8);
+	pool->data[init].string = str;
+	pool->tags[init] = JV_CONSTANT_ResolvedString;
+      }
+      /* fall through */
+
+    case JV_CONSTANT_ResolvedString:
+      if (! (field->type == &java::lang::String::class$
+ 	     || field->type == &java::lang::Class::class$))
+	throw_class_format_error ("string initialiser to non-string field");
+
+      *(jstring*)addr = pool->data[init].string;
+      break;
+
+    case JV_CONSTANT_Integer:
+      {
+	int value = pool->data[init].i;
+
+	if (field->type == JvPrimClass (boolean))
+	  *(jboolean*)addr = (jboolean)value;
+	
+	else if (field->type == JvPrimClass (byte))
+	  *(jbyte*)addr = (jbyte)value;
+	
+	else if (field->type == JvPrimClass (char))
+	  *(jchar*)addr = (jchar)value;
+
+	else if (field->type == JvPrimClass (short))
+	  *(jshort*)addr = (jshort)value;
+	
+	else if (field->type == JvPrimClass (int))
+	  *(jint*)addr = (jint)value;
+
+	else
+	  throw_class_format_error ("erroneous field initializer");
+      }  
+      break;
+
+    case JV_CONSTANT_Long:
+      if (field->type != JvPrimClass (long))
+	throw_class_format_error ("erroneous field initializer");
+
+      *(jlong*)addr = _Jv_loadLong (&pool->data[init]);
+      break;
+
+    case JV_CONSTANT_Float:
+      if (field->type != JvPrimClass (float))
+	throw_class_format_error ("erroneous field initializer");
+
+      *(jfloat*)addr = pool->data[init].f;
+      break;
+
+    case JV_CONSTANT_Double:
+      if (field->type != JvPrimClass (double))
+	throw_class_format_error ("erroneous field initializer");
+
+      *(jdouble*)addr = _Jv_loadDouble (&pool->data[init]);
+      break;
+
+    default:
+      throw_class_format_error ("erroneous field initializer");
+    }
+}
+
+inline static unsigned char*
+skip_one_type (unsigned char* ptr)
+{
+  int ch = *ptr++;
+
+  while (ch == '[')
+    { 
+      ch = *ptr++;
+    }
+  
+  if (ch == 'L')
+    {
+      do { ch = *ptr++; } while (ch != ';');
+    }
+
+  return ptr;
+}
+
+static ffi_type*
+get_ffi_type_from_signature (unsigned char* ptr)
+{
+  switch (*ptr) 
+    {
+    case 'L':
+    case '[':
+      return &ffi_type_pointer;
+      break;
+
+    case 'Z':
+      // On some platforms a bool is a byte, on others an int.
+      if (sizeof (jboolean) == sizeof (jbyte))
+	return &ffi_type_sint8;
+      else
+	{
+	  JvAssert (sizeof (jbyte) == sizeof (jint));
+	  return &ffi_type_sint32;
+	}
+      break;
+
+    case 'B':
+      return &ffi_type_sint8;
+      break;
+      
+    case 'C':
+      return &ffi_type_uint16;
+      break;
+	  
+    case 'S': 
+      return &ffi_type_sint16;
+      break;
+	  
+    case 'I':
+      return &ffi_type_sint32;
+      break;
+	  
+    case 'J':
+      return &ffi_type_sint64;
+      break;
+	  
+    case 'F':
+      return &ffi_type_float;
+      break;
+	  
+    case 'D':
+      return &ffi_type_double;
+      break;
+
+    case 'V':
+      return &ffi_type_void;
+      break;
+    }
+
+  throw_internal_error ("unknown type in signature");
+}
+
+/* this function yields the number of actual arguments, that is, if the
+ * function is non-static, then one is added to the number of elements
+ * found in the signature */
+
+int 
+_Jv_count_arguments (_Jv_Utf8Const *signature,
+		     jboolean staticp)
+{
+  unsigned char *ptr = (unsigned char*) signature->chars();
+  int arg_count = staticp ? 0 : 1;
+
+  /* first, count number of arguments */
+
+  // skip '('
+  ptr++;
+
+  // count args
+  while (*ptr != ')')
+    {
+      ptr = skip_one_type (ptr);
+      arg_count += 1;
+    }
+
+  return arg_count;
+}
+
+/* This beast will build a cif, given the signature.  Memory for
+ * the cif itself and for the argument types must be allocated by the
+ * caller.
+ */
+
+static int 
+init_cif (_Jv_Utf8Const* signature,
+	  int arg_count,
+	  jboolean staticp,
+	  ffi_cif *cif,
+	  ffi_type **arg_types,
+	  ffi_type **rtype_p)
+{
+  unsigned char *ptr = (unsigned char*) signature->chars();
+
+  int arg_index = 0;		// arg number
+  int item_count = 0;		// stack-item count
+
+  // setup receiver
+  if (!staticp)
+    {
+      arg_types[arg_index++] = &ffi_type_pointer;
+      item_count += 1;
+    }
+
+  // skip '('
+  ptr++;
+
+  // assign arg types
+  while (*ptr != ')')
+    {
+      arg_types[arg_index++] = get_ffi_type_from_signature (ptr);
+
+      if (*ptr == 'J' || *ptr == 'D')
+	item_count += 2;
+      else
+	item_count += 1;
+
+      ptr = skip_one_type (ptr);
+    }
+
+  // skip ')'
+  ptr++;
+  ffi_type *rtype = get_ffi_type_from_signature (ptr);
+
+  ptr = skip_one_type (ptr);
+  if (ptr != (unsigned char*)signature->chars() + signature->len())
+    throw_internal_error ("did not find end of signature");
+
+  if (ffi_prep_cif (cif, FFI_DEFAULT_ABI,
+		    arg_count, rtype, arg_types) != FFI_OK)
+    throw_internal_error ("ffi_prep_cif failed");
+
+  if (rtype_p != NULL)
+    *rtype_p = rtype;
+
+  return item_count;
+}
+
+#if FFI_NATIVE_RAW_API
+#   define FFI_PREP_RAW_CLOSURE ffi_prep_raw_closure
+#   define FFI_RAW_SIZE ffi_raw_size
+#else
+#   define FFI_PREP_RAW_CLOSURE ffi_prep_java_raw_closure
+#   define FFI_RAW_SIZE ffi_java_raw_size
+#endif
+
+/* we put this one here, and not in interpret.cc because it
+ * calls the utility routines _Jv_count_arguments 
+ * which are static to this module.  The following struct defines the
+ * layout we use for the stubs, it's only used in the ncode method. */
+
+typedef struct {
+  ffi_raw_closure  closure;
+  ffi_cif   cif;
+  ffi_type *arg_types[0];
+} ncode_closure;
+
+typedef void (*ffi_closure_fun) (ffi_cif*,void*,ffi_raw*,void*);
+
+void *
+_Jv_InterpMethod::ncode ()
+{
+  using namespace java::lang::reflect;
+
+  if (self->ncode != 0)
+    return self->ncode;
+
+  jboolean staticp = (self->accflags & Modifier::STATIC) != 0;
+  int arg_count = _Jv_count_arguments (self->signature, staticp);
+
+  ncode_closure *closure =
+    (ncode_closure*)_Jv_AllocBytes (sizeof (ncode_closure)
+					+ arg_count * sizeof (ffi_type*));
+
+  init_cif (self->signature,
+	    arg_count,
+	    staticp,
+	    &closure->cif,
+	    &closure->arg_types[0],
+	    NULL);
+
+  ffi_closure_fun fun;
+
+  args_raw_size = FFI_RAW_SIZE (&closure->cif);
+
+  JvAssert ((self->accflags & Modifier::NATIVE) == 0);
+
+  if ((self->accflags & Modifier::SYNCHRONIZED) != 0)
+    {
+      if (staticp)
+        {
+        if (::gnu::classpath::jdwp::Jdwp::isDebugging)
+		  fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_class_debug;
+		else
+		  fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_class;
+        }
+      else
+        {
+	      if (::gnu::classpath::jdwp::Jdwp::isDebugging)
+		    fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_object_debug;
+		  else
+		  	fun = (ffi_closure_fun)&_Jv_InterpMethod::run_synch_object;
+        } 
+    }
+  else
+    {
+      if (staticp)
+        {
+	      if (::gnu::classpath::jdwp::Jdwp::isDebugging)
+		    fun = (ffi_closure_fun)&_Jv_InterpMethod::run_class_debug;
+		  else
+		    fun = (ffi_closure_fun)&_Jv_InterpMethod::run_class;
+        }
+      else
+        {
+	      if (::gnu::classpath::jdwp::Jdwp::isDebugging)
+		    fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal_debug;
+		  else
+		    fun = (ffi_closure_fun)&_Jv_InterpMethod::run_normal;
+        }
+    }
+
+  FFI_PREP_RAW_CLOSURE (&closure->closure,
+		        &closure->cif, 
+		        fun,
+		        (void*)this);
+
+  self->ncode = (void*)closure;
+  return self->ncode;
+}
+
+/* Find the index of the given insn in the array of insn slots
+   for this method. Returns -1 if not found. */
+jlong
+_Jv_InterpMethod::insn_index (pc_t pc)
+{
+  jlong left = 0;
+#ifdef DIRECT_THREADED
+  jlong right = number_insn_slots;
+  pc_t insns = prepared;
+#else
+  jlong right = code_length;
+  pc_t insns = bytecode ();
+#endif
+
+  while (right >= 0)
+    {
+      jlong mid = (left + right) / 2;
+      if (&insns[mid] == pc)
+	return mid;
+
+      if (pc < &insns[mid])
+	right = mid - 1;
+      else
+        left = mid + 1;
+    }
+
+  return -1;
+}
+
+void
+_Jv_InterpMethod::get_line_table (jlong& start, jlong& end,
+				  jintArray& line_numbers,
+				  jlongArray& code_indices)
+{
+#ifdef DIRECT_THREADED
+  /* For the DIRECT_THREADED case, if the method has not yet been
+   * compiled, the linetable will change to insn slots instead of
+   * bytecode PCs. It is probably easiest, in this case, to simply
+   * compile the method and guarantee that we are using insn
+   * slots.
+   */
+  _Jv_CompileMethod (this);
+
+  if (line_table_len > 0)
+    {
+      start = 0;
+      end = number_insn_slots;
+      line_numbers = JvNewIntArray (line_table_len);
+      code_indices = JvNewLongArray (line_table_len);
+
+      jint* lines = elements (line_numbers);
+      jlong* indices = elements (code_indices);
+      for (int i = 0; i < line_table_len; ++i)
+	{
+	  lines[i] = line_table[i].line;
+	  indices[i] = insn_index (line_table[i].pc);
+	}
+    }
+#else // !DIRECT_THREADED
+  if (line_table_len > 0)
+    {
+      start = 0;
+      end = code_length;
+      line_numbers = JvNewIntArray (line_table_len);
+      code_indices = JvNewLongArray (line_table_len);
+
+      jint* lines = elements (line_numbers);
+      jlong* indices = elements (code_indices);
+      for (int i = 0; i < line_table_len; ++i)
+	{
+	  lines[i] = line_table[i].line;
+	  indices[i] = (jlong) line_table[i].bytecode_pc;
+	}
+    }
+#endif // !DIRECT_THREADED
+}
+
+pc_t
+_Jv_InterpMethod::install_break (jlong index)
+{
+  return set_insn (index, breakpoint_insn);
+}
+
+pc_t
+_Jv_InterpMethod::get_insn (jlong index)
+{
+  pc_t code;
+
+#ifdef DIRECT_THREADED
+  if (index >= number_insn_slots || index < 0)
+    return NULL;
+
+  code = prepared;
+#else // !DIRECT_THREADED
+  if (index >= code_length || index < 0)
+    return NULL;
+
+  code = reinterpret_cast<pc_t> (bytecode ());
+#endif // !DIRECT_THREADED
+
+  return &code[index];
+}
+
+pc_t
+_Jv_InterpMethod::set_insn (jlong index, pc_t insn)
+{
+#ifdef DIRECT_THREADED
+  if (index >= number_insn_slots || index < 0)
+    return NULL;
+
+  pc_t code = prepared;
+  code[index].insn = insn->insn;
+#else // !DIRECT_THREADED
+  if (index >= code_length || index < 0)
+    return NULL;
+
+  pc_t code = reinterpret_cast<pc_t> (bytecode ());
+  code[index] = *insn;
+#endif // !DIRECT_THREADED
+
+  return &code[index];
+}
+
+void *
+_Jv_JNIMethod::ncode ()
+{
+  using namespace java::lang::reflect;
+
+  if (self->ncode != 0)
+    return self->ncode;
+
+  jboolean staticp = (self->accflags & Modifier::STATIC) != 0;
+  int arg_count = _Jv_count_arguments (self->signature, staticp);
+
+  ncode_closure *closure =
+    (ncode_closure*)_Jv_AllocBytes (sizeof (ncode_closure)
+				    + arg_count * sizeof (ffi_type*));
+
+  ffi_type *rtype;
+  init_cif (self->signature,
+	    arg_count,
+	    staticp,
+	    &closure->cif,
+	    &closure->arg_types[0],
+	    &rtype);
+
+  ffi_closure_fun fun;
+
+  args_raw_size = FFI_RAW_SIZE (&closure->cif);
+
+  // Initialize the argument types and CIF that represent the actual
+  // underlying JNI function.
+  int extra_args = 1;
+  if ((self->accflags & Modifier::STATIC))
+    ++extra_args;
+  jni_arg_types = (ffi_type **) _Jv_AllocBytes ((extra_args + arg_count)
+						* sizeof (ffi_type *));
+  int offset = 0;
+  jni_arg_types[offset++] = &ffi_type_pointer;
+  if ((self->accflags & Modifier::STATIC))
+    jni_arg_types[offset++] = &ffi_type_pointer;
+  memcpy (&jni_arg_types[offset], &closure->arg_types[0],
+	  arg_count * sizeof (ffi_type *));
+
+  if (ffi_prep_cif (&jni_cif, _Jv_platform_ffi_abi,
+		    extra_args + arg_count, rtype,
+		    jni_arg_types) != FFI_OK)
+    throw_internal_error ("ffi_prep_cif failed for JNI function");
+
+  JvAssert ((self->accflags & Modifier::NATIVE) != 0);
+
+  // FIXME: for now we assume that all native methods for
+  // interpreted code use JNI.
+  fun = (ffi_closure_fun) &_Jv_JNIMethod::call;
+
+  FFI_PREP_RAW_CLOSURE (&closure->closure,
+			&closure->cif, 
+			fun,
+			(void*) this);
+
+  self->ncode = (void *) closure;
+  return self->ncode;
+}
+
+static void
+throw_class_format_error (jstring msg)
+{
+  throw (msg
+	 ? new java::lang::ClassFormatError (msg)
+	 : new java::lang::ClassFormatError);
+}
+
+static void
+throw_class_format_error (const char *msg)
+{
+  throw_class_format_error (JvNewStringLatin1 (msg));
+}
+
+
+
+void
+_Jv_InterpreterEngine::do_verify (jclass klass)
+{
+  _Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
+  for (int i = 0; i < klass->method_count; i++)
+    {
+      using namespace java::lang::reflect;
+      _Jv_MethodBase *imeth = iclass->interpreted_methods[i];
+      _Jv_ushort accflags = klass->methods[i].accflags;
+      if ((accflags & (Modifier::NATIVE | Modifier::ABSTRACT)) == 0)
+	{
+	  _Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (imeth);
+	  _Jv_VerifyMethod (im);
+	}
+    }
+}
+
+void
+_Jv_InterpreterEngine::do_create_ncode (jclass klass)
+{
+  _Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
+  for (int i = 0; i < klass->method_count; i++)
+    {
+      // Just skip abstract methods.  This is particularly important
+      // because we don't resize the interpreted_methods array when
+      // miranda methods are added to it.
+      if ((klass->methods[i].accflags
+	   & java::lang::reflect::Modifier::ABSTRACT)
+	  != 0)
+	continue;
+
+      _Jv_MethodBase *imeth = iclass->interpreted_methods[i];
+
+      if ((klass->methods[i].accflags & java::lang::reflect::Modifier::NATIVE)
+	  != 0)
+	{
+	  // You might think we could use a virtual `ncode' method in
+	  // the _Jv_MethodBase and unify the native and non-native
+	  // cases.  Well, we can't, because we don't allocate these
+	  // objects using `new', and thus they don't get a vtable.
+	  _Jv_JNIMethod *jnim = reinterpret_cast<_Jv_JNIMethod *> (imeth);
+	  klass->methods[i].ncode = jnim->ncode ();
+	}
+      else if (imeth != 0)		// it could be abstract
+	{
+	  _Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (imeth);
+	  klass->methods[i].ncode = im->ncode ();
+	}
+    }
+}
+
+void
+_Jv_InterpreterEngine::do_allocate_static_fields (jclass klass,
+						  int pointer_size,
+						  int other_size)
+{
+  _Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
+
+  // Splitting the allocations here lets us scan reference fields and
+  // avoid scanning non-reference fields.  How reference fields are
+  // scanned is a bit tricky: we allocate using _Jv_AllocRawObj, which
+  // means that this memory will be scanned conservatively (same
+  // difference, since we know all the contents here are pointers).
+  // Then we put pointers into this memory into the 'fields'
+  // structure.  Most of these are interior pointers, which is ok (but
+  // even so the pointer to the first reference field will be used and
+  // that is not an interior pointer).  The 'fields' array is also
+  // allocated with _Jv_AllocRawObj (see defineclass.cc), so it will
+  // be scanned.  A pointer to this array is held by Class and thus
+  // seen by the collector.
+  char *reference_fields = (char *) _Jv_AllocRawObj (pointer_size);
+  char *non_reference_fields = (char *) _Jv_AllocBytes (other_size);
+
+  for (int i = 0; i < klass->field_count; i++)
+    {
+      _Jv_Field *field = &klass->fields[i];
+
+      if ((field->flags & java::lang::reflect::Modifier::STATIC) == 0)
+	continue;
+
+      char *base = field->isRef() ? reference_fields : non_reference_fields;
+      field->u.addr  = base + field->u.boffset;
+
+      if (iclass->field_initializers[i] != 0)
+	{
+	  _Jv_Linker::resolve_field (field, klass->loader);
+	  _Jv_InitField (0, klass, i);
+	}
+    }
+
+  // Now we don't need the field_initializers anymore, so let the
+  // collector get rid of it.
+  iclass->field_initializers = 0;
+}
+
+_Jv_ResolvedMethod *
+_Jv_InterpreterEngine::do_resolve_method (_Jv_Method *method, jclass klass,
+					  jboolean staticp)
+{
+  int arg_count = _Jv_count_arguments (method->signature, staticp);
+
+  _Jv_ResolvedMethod* result = (_Jv_ResolvedMethod*)
+    _Jv_AllocBytes (sizeof (_Jv_ResolvedMethod)
+		    + arg_count*sizeof (ffi_type*));
+
+  result->stack_item_count
+    = init_cif (method->signature,
+		arg_count,
+		staticp,
+		&result->cif,
+		&result->arg_types[0],
+		NULL);
+
+  result->method              = method;
+  result->klass               = klass;
+
+  return result;
+}
+
+void
+_Jv_InterpreterEngine::do_post_miranda_hook (jclass klass)
+{
+  _Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
+  for (int i = 0; i < klass->method_count; i++)
+    {
+      // Just skip abstract methods.  This is particularly important
+      // because we don't resize the interpreted_methods array when
+      // miranda methods are added to it.
+      if ((klass->methods[i].accflags
+	   & java::lang::reflect::Modifier::ABSTRACT)
+	  != 0)
+	continue;
+      // Miranda method additions mean that the `methods' array moves.
+      // We cache a pointer into this array, so we have to update.
+      iclass->interpreted_methods[i]->self = &klass->methods[i];
+    }
+}
+
+#ifdef DIRECT_THREADED
+void
+_Jv_CompileMethod (_Jv_InterpMethod* method)
+{
+  if (method->prepared == NULL)
+    _Jv_InterpMethod::run (NULL, NULL, method);
+}
+#endif // DIRECT_THREADED
+
+#endif // INTERPRETER

Added: llvm-gcc-4.2/trunk/libjava/java/io/BufferedInputStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/BufferedInputStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/BufferedInputStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/BufferedInputStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,390 @@
+/* BufferedInputStream.java -- An input stream that implements buffering
+   Copyright (C) 1998, 1999, 2001, 2004, 2005  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+ 
+package java.io;
+
+/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
+ * "The Java Language Specification", ISBN 0-201-63451-1
+ * plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
+ * Status:  Believed complete and correct.
+ */
+ 
+/**
+ * This subclass of <code>FilterInputStream</code> buffers input from an 
+ * underlying implementation to provide a possibly more efficient read
+ * mechanism.  It maintains the buffer and buffer state in instance 
+ * variables that are available to subclasses.  The default buffer size
+ * of 2048 bytes can be overridden by the creator of the stream.
+ * <p>
+ * This class also implements mark/reset functionality.  It is capable
+ * of remembering any number of input bytes, to the limits of
+ * system memory or the size of <code>Integer.MAX_VALUE</code>
+ * <p>
+ * Please note that this class does not properly handle character
+ * encodings.  Consider using the <code>BufferedReader</code> class which
+ * does.
+ *
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ * @author Warren Levy (warrenl at cygnus.com)
+ * @author Jeroen Frijters (jeroen at frijters.net)
+ */
+public class BufferedInputStream extends FilterInputStream
+{
+
+  /**
+   * This is the default buffer size
+   */
+  private static final int DEFAULT_BUFFER_SIZE = 2048;
+
+  /**
+   * The buffer used for storing data from the underlying stream.
+   */
+  protected byte[] buf;
+
+  /**
+   * The number of valid bytes currently in the buffer.  It is also the index
+   * of the buffer position one byte past the end of the valid data.
+   */
+  protected int count;
+
+  /**
+   * The index of the next character that will by read from the buffer.
+   * When <code>pos == count</code>, the buffer is empty.
+   */
+  protected int pos;
+
+  /**
+   * The value of <code>pos</code> when the <code>mark()</code> method was
+   * called.  
+   * This is set to -1 if there is no mark set.
+   */
+  protected int markpos = -1;
+
+  /**
+   * This is the maximum number of bytes than can be read after a 
+   * call to <code>mark()</code> before the mark can be discarded.
+   * After this may bytes are read, the <code>reset()</code> method
+   * may not be called successfully.
+   */
+  protected int marklimit;
+
+  /**
+   * This is the initial buffer size. When the buffer is grown because
+   * of marking requirements, it will be grown by bufferSize increments.
+   * The underlying stream will be read in chunks of bufferSize.
+   */
+  private final int bufferSize;
+
+  /**
+   * This method initializes a new <code>BufferedInputStream</code> that will
+   * read from the specified subordinate stream with a default buffer size
+   * of 2048 bytes
+   *
+   * @param in The subordinate stream to read from
+   */
+  public BufferedInputStream(InputStream in)
+  {
+    this(in, DEFAULT_BUFFER_SIZE);
+  }
+
+  /**
+   * This method initializes a new <code>BufferedInputStream</code> that will
+   * read from the specified subordinate stream with a buffer size that
+   * is specified by the caller.
+   *
+   * @param in The subordinate stream to read from
+   * @param size The buffer size to use
+   *
+   * @exception IllegalArgumentException when size is smaller then 1
+   */
+  public BufferedInputStream(InputStream in, int size)
+  {
+    super(in);
+    if (size <= 0)
+      throw new IllegalArgumentException();
+    buf = new byte[size];
+    // initialize pos & count to bufferSize, to prevent refill from
+    // allocating a new buffer (if the caller starts out by calling mark()).
+    pos = count = bufferSize = size;
+  }
+
+  /**
+   * This method returns the number of bytes that can be read from this
+   * stream before a read can block.  A return of 0 indicates that blocking
+   * might (or might not) occur on the very next read attempt.
+   * <p>
+   * The number of available bytes will be the number of read ahead bytes 
+   * stored in the internal buffer plus the number of available bytes in
+   * the underlying stream.
+   *
+   * @return The number of bytes that can be read before blocking could occur
+   *
+   * @exception IOException If an error occurs
+   */
+  public synchronized int available() throws IOException
+  {
+    return count - pos + in.available();
+  }
+
+  /**
+   * This method closes the underlying input stream and frees any
+   * resources associated with it. Sets <code>buf</code> to <code>null</code>.
+   *
+   * @exception IOException If an error occurs.
+   */
+  public void close() throws IOException
+  {
+    // Free up the array memory.
+    buf = null;
+    pos = count = 0;
+    markpos = -1;
+    in.close();
+  }
+
+  /**
+   * This method marks a position in the input to which the stream can be
+   * "reset" by calling the <code>reset()</code> method.  The parameter
+   * <code>readlimit</code> is the number of bytes that can be read from the 
+   * stream after setting the mark before the mark becomes invalid.  For
+   * example, if <code>mark()</code> is called with a read limit of 10, then
+   * when 11 bytes of data are read from the stream before the
+   * <code>reset()</code> method is called, then the mark is invalid and the
+   * stream object instance is not required to remember the mark.
+   * <p>
+   * Note that the number of bytes that can be remembered by this method
+   * can be greater than the size of the internal read buffer.  It is also
+   * not dependent on the subordinate stream supporting mark/reset
+   * functionality.
+   *
+   * @param readlimit The number of bytes that can be read before the mark
+   * becomes invalid
+   */
+  public synchronized void mark(int readlimit)
+  {
+    marklimit = readlimit;
+    markpos = pos;
+  }
+
+  /**
+   * This method returns <code>true</code> to indicate that this class
+   * supports mark/reset functionality.
+   *
+   * @return <code>true</code> to indicate that mark/reset functionality is
+   * supported
+   *
+   */
+  public boolean markSupported()
+  {
+    return true;
+  }
+
+  /**
+   * This method reads an unsigned byte from the input stream and returns it
+   * as an int in the range of 0-255.  This method also will return -1 if
+   * the end of the stream has been reached.
+   * <p>
+   * This method will block until the byte can be read.
+   *
+   * @return The byte read or -1 if end of stream
+   *
+   * @exception IOException If an error occurs
+   */
+  public synchronized int read() throws IOException
+  {
+    if (pos >= count && !refill())
+      return -1;	// EOF
+
+    return buf[pos++] & 0xFF;
+  }
+
+  /**
+   * This method reads bytes from a stream and stores them into a caller
+   * supplied buffer.  It starts storing the data at index <code>off</code>
+   * into the buffer and attempts to read <code>len</code> bytes.  This method
+   * can return before reading the number of bytes requested, but it will try
+   * to read the requested number of bytes by repeatedly calling the underlying
+   * stream as long as available() for this stream continues to return a
+   * non-zero value (or until the requested number of bytes have been read).
+   * The actual number of bytes read is returned as an int.  A -1 is returned
+   * to indicate the end of the stream.
+   * <p>
+   * This method will block until some data can be read.
+   *
+   * @param b The array into which the bytes read should be stored
+   * @param off The offset into the array to start storing bytes
+   * @param len The requested number of bytes to read
+   *
+   * @return The actual number of bytes read, or -1 if end of stream.
+   *
+   * @exception IOException If an error occurs.
+   * @exception IndexOutOfBoundsException when <code>off</code> or
+   *            <code>len</code> are negative, or when <code>off + len</code>
+   *            is larger then the size of <code>b</code>,
+   */
+  public synchronized int read(byte[] b, int off, int len) throws IOException
+  {
+    if (off < 0 || len < 0 || b.length - off < len)
+      throw new IndexOutOfBoundsException();
+
+    if (len == 0)
+      return 0;
+
+    if (pos >= count && !refill())
+      return -1;		// No bytes were read before EOF.
+
+    int totalBytesRead = Math.min(count - pos, len);
+    System.arraycopy(buf, pos, b, off, totalBytesRead);
+    pos += totalBytesRead;
+    off += totalBytesRead;
+    len -= totalBytesRead;
+
+    while (len > 0 && in.available() > 0 && refill())
+      {
+	int remain = Math.min(count - pos, len);
+	System.arraycopy(buf, pos, b, off, remain);
+	pos += remain;
+	off += remain;
+	len -= remain;
+	totalBytesRead += remain;
+      }
+
+    return totalBytesRead;
+  }
+
+  /**
+   * This method resets a stream to the point where the <code>mark()</code>
+   * method was called.  Any bytes that were read after the mark point was
+   * set will be re-read during subsequent reads.
+   * <p>
+   * This method will throw an IOException if the number of bytes read from
+   * the stream since the call to <code>mark()</code> exceeds the mark limit
+   * passed when establishing the mark.
+   *
+   * @exception IOException If <code>mark()</code> was never called or more
+   *            then <code>marklimit</code> bytes were read since the last
+   *            call to <code>mark()</code>
+   */
+  public synchronized void reset() throws IOException
+  {
+    if (markpos == -1)
+      throw new IOException(buf == null ? "Stream closed." : "Invalid mark.");
+
+    pos = markpos;
+  }
+
+  /**
+   * This method skips the specified number of bytes in the stream.  It
+   * returns the actual number of bytes skipped, which may be less than the
+   * requested amount.
+   *
+   * @param n The requested number of bytes to skip
+   *
+   * @return The actual number of bytes skipped.
+   *
+   * @exception IOException If an error occurs
+   */
+  public synchronized long skip(long n) throws IOException
+  {
+    if (buf == null)
+      throw new IOException("Stream closed.");
+
+    final long origN = n;
+
+    while (n > 0L)
+      {
+	if (pos >= count)
+          {
+            if (markpos == -1)
+              {
+                // Buffer is empty and no mark is set, skip on the
+                // underlying stream.
+                n -= in.skip(n);
+                break;
+              }
+            else if (!refill())
+              break;
+          }
+
+	int numread = (int) Math.min((long) (count - pos), n);
+	pos += numread;
+	n -= numread;
+      }
+
+    return origN - n;
+  }
+
+  // GCJ LOCAL: package-private for use by InputStreamReader
+  /**
+   * Called to refill the buffer (when count is equal to pos).
+   *
+   * @return <code>true</code> when at least one additional byte was read
+   *         into <code>buf</code>, <code>false</code> otherwise (at EOF).
+   */
+  boolean refill() throws IOException
+  {
+    if (buf == null)
+      throw new IOException("Stream closed.");
+
+    if (markpos == -1 || count - markpos >= marklimit)
+      {
+	markpos = -1;
+	pos = count = 0;
+      }
+    else
+      {
+	byte[] newbuf = buf;
+	if (markpos < bufferSize)
+	  {
+	    newbuf = new byte[count - markpos + bufferSize];
+	  }
+	System.arraycopy(buf, markpos, newbuf, 0, count - markpos);
+	buf = newbuf;
+	count -= markpos;
+	pos -= markpos;
+	markpos = 0;
+      }
+
+    int numread = in.read(buf, count, bufferSize);
+
+    if (numread <= 0)	// EOF
+      return false;
+
+    count += numread;
+    return true;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/java/io/File.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/File.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/File.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/File.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1416 @@
+/* File.java -- Class representing a file on disk
+   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import gnu.classpath.Configuration;
+
+/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
+ * "The Java Language Specification", ISBN 0-201-63451-1
+ * Status:  Complete to version 1.3.
+ */
+
+/**
+ * This class represents a file or directory on a local disk.  It provides
+ * facilities for dealing with a variety of systems that use various
+ * types of path separators ("/" versus "\", for example).  It also
+ * contains method useful for creating and deleting files and directories.
+ *
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ * @author Tom Tromey (tromey at cygnus.com)
+ */
+public class File implements Serializable, Comparable
+{
+  private static final long serialVersionUID = 301077366599181567L;
+	
+  // QUERY arguments to access function.
+  private final static int READ = 0;
+  private final static int WRITE = 1;
+  private final static int EXISTS = 2;
+
+  // QUERY arguments to stat function.
+  private final static int DIRECTORY = 0;
+  private final static int ISFILE = 1;
+  private final static int ISHIDDEN = 2;
+
+  // QUERY arguments to attr function.
+  private final static int MODIFIED = 0;
+  private final static int LENGTH = 1;
+  
+  private final native long attr (int query);
+  // On OSF1 V5.0, `stat' is a macro.  It is easiest to use the name
+  // `_stat' instead.  We do the same thing for `_access' just in
+  // case.
+  private final native boolean _access (int query);
+  private final native boolean _stat (int query);
+
+  /**
+   * This is the path separator string for the current host. This field
+   * contains the value of the <code>file.separator</code> system property.
+   * An example separator string would be "/" on the GNU system.
+   */
+  public static final String separator = System.getProperty("file.separator");
+  private static final String dupSeparator = separator + separator;
+
+  /**
+   * This is the first character of the file separator string.  On many
+   * hosts (for example, on the GNU system), this represents the entire 
+   * separator string.  The complete separator string is obtained from the
+   * <code>file.separator</code>system property.
+   */
+  public static final char separatorChar = separator.charAt(0);
+  
+  /**
+   * This is the string that is used to separate the host name from the
+   * path name in paths than include the host name.  It is the value of
+   * the <code>path.separator</code> system property.
+   */
+  public static final String pathSeparator
+    = System.getProperty("path.separator");
+  
+  /**
+   * This is the first character of the string used to separate the host name
+   * from the path name in paths that include a host.  The separator string
+   * is taken from the <code>path.separator</code> system property.
+   */
+  public static final char pathSeparatorChar = pathSeparator.charAt(0);
+
+  static final String tmpdir = System.getProperty("java.io.tmpdir");
+  static int maxPathLen;
+  static boolean caseSensitive;
+  
+  static
+  {
+    if (Configuration.INIT_LOAD_LIBRARY)
+      {
+        System.loadLibrary("javaio");
+      }
+    
+    init_native();
+  }
+  
+  // Native function called at class initialization. This should should
+  // set the maxPathLen and caseSensitive variables.
+  private static native void init_native();
+
+  /**
+   * This is the path to the file set when the object is created.  It
+   * may be an absolute or relative path name.
+   */
+  private String path;
+
+  // We keep a counter for use by createTempFile.  We choose the first
+  // value randomly to try to avoid clashes with other VMs.
+  private static long counter = Double.doubleToLongBits (Math.random());
+
+  /**
+   * This method tests whether or not the current thread is allowed to
+   * to read the file pointed to by this object.  This will be true if and
+   * and only if 1) the file exists and 2) the <code>SecurityManager</code>
+   * (if any) allows access to the file via it's <code>checkRead</code>
+   * method 3) the file is readable.
+   *
+   * @return <code>true</code> if reading is allowed, 
+   * <code>false</code> otherwise
+   *
+   * @exception SecurityException If the <code>SecurityManager</code> 
+   * does not allow access to the file
+   */
+  public boolean canRead()
+  {
+    checkRead();
+    return _access (READ);
+  }
+
+  /**
+   * This method test whether or not the current thread is allowed to
+   * write to this object.  This will be true if and only if 1) The
+   * <code>SecurityManager</code> (if any) allows write access to the
+   * file and 2) The file exists and 3) The file is writable.  To determine
+   * whether or not a non-existent file can be created, check the parent
+   * directory for write access.
+   *
+   * @return <code>true</code> if writing is allowed, <code>false</code> 
+   * otherwise
+   *
+   * @exception SecurityException If the <code>SecurityManager</code> 
+   * does not allow access to the file
+   */
+  public boolean canWrite()
+  {
+    checkWrite();
+    return _access (WRITE);
+  }
+  
+  private native boolean performCreate() throws IOException;
+
+  /**
+   * This method creates a new file of zero length with the same name as
+   * the path of this <code>File</code> object if an only if that file
+   * does not already exist.
+   * <p>
+   * A <code>SecurityManager.checkWrite</code> check is done prior
+   * to performing this action.
+   *
+   * @return <code>true</code> if the file was created, <code>false</code> if
+   * the file alread existed.
+   *
+   * @exception IOException If an I/O error occurs
+   * @exception SecurityException If the <code>SecurityManager</code> will
+   * not allow this operation to be performed.
+   *
+   * @since 1.2
+   */
+  public boolean createNewFile() throws IOException
+  {
+    checkWrite();
+    return performCreate();
+  }
+ 
+  /*
+   * This native method handles the actual deleting of the file
+   */
+  private native boolean performDelete();
+
+  /**
+   * This method deletes the file represented by this object.  If this file
+   * is a directory, it must be empty in order for the delete to succeed.
+   *
+   * @return <code>true</code> if the file was deleted, <code>false</code> 
+   * otherwise
+   *
+   * @exception SecurityException If deleting of the file is not allowed
+   */
+  public synchronized boolean delete()
+  {
+    SecurityManager s = System.getSecurityManager();
+    
+    if (s != null)
+      s.checkDelete(path);
+    
+    return performDelete();
+  }
+
+  /**
+   * This method tests two <code>File</code> objects for equality by 
+   * comparing the path of the specified <code>File</code> against the path
+   * of this object.  The two objects are equal if an only if 1) The
+   * argument is not null 2) The argument is a <code>File</code> object and
+   * 3) The path of the <code>File</code>argument is equal to the path
+   * of this object.
+   * <p>
+   * The paths of the files are determined by calling the 
+   * <code>getPath()</code>
+   * method on each object.
+   *
+   * @return <code>true</code> if the two objects are equal, 
+   * <code>false</code> otherwise.
+   */
+  public boolean equals(Object obj)
+  {
+    if (! (obj instanceof File))
+      return false;
+    
+    File other = (File) obj;
+
+    if (caseSensitive)
+      return path.equals(other.path);
+    else
+      return path.equalsIgnoreCase(other.path);
+  }
+
+  /*
+   * This method tests whether or not the file represented by the
+   * object actually exists on the filesystem.
+   */
+  private boolean internalExists()
+  {
+    return _access (EXISTS);
+  }
+  
+  /**
+   * This method tests whether or not the file represented by the object
+   * actually exists on the filesystem.
+   *
+   * @return <code>true</code> if the file exists, <code>false</code>otherwise.
+   *
+   * @exception SecurityException If reading of the file is not permitted
+   */
+  public boolean exists()
+  {
+    checkRead();
+    return internalExists();
+  }
+
+  /**
+   * This method initializes a new <code>File</code> object to represent
+   * a file with the specified path.
+   *
+   * @param name The path name of the file
+   */
+  public File(String name)
+  {
+    path = normalizePath (name);
+  }
+
+  // Remove duplicate and redundant separator characters.
+  private String normalizePath(String p)
+  {
+    // On Windows, convert any '/' to '\'.  This appears to be the same logic
+    // that Sun's Win32 Java performs.
+    if (separatorChar == '\\')
+      {
+        p = p.replace ('/', '\\');
+	// We have to special case the "\c:" prefix.
+	if (p.length() > 2 && p.charAt(0) == '\\' &&
+	    ((p.charAt(1) >= 'a' && p.charAt(1) <= 'z') ||
+	    (p.charAt(1) >= 'A' && p.charAt(1) <= 'Z')) &&
+	    p.charAt(2) == ':')
+	  p = p.substring(1);
+      }
+
+    int dupIndex = p.indexOf(dupSeparator);
+    int plen = p.length();
+
+    // Special case: permit Windows UNC path prefix.
+    if (dupSeparator.equals("\\\\") && dupIndex == 0)
+      dupIndex = p.indexOf(dupSeparator, 1);
+
+    if (dupIndex == -1)
+      {
+        // Ignore trailing separator (though on Windows "a:\", for
+        // example, is a valid and minimal path).
+        if (plen > 1 && p.charAt (plen - 1) == separatorChar)
+	  {
+	    if (! (separatorChar == '\\' && plen == 3 && p.charAt (1) == ':'))
+	      return p.substring (0, plen - 1);
+	  }
+	else
+	  return p;
+      }
+    
+    StringBuffer newpath = new StringBuffer(plen);
+    int last = 0;
+    while (dupIndex != -1)
+      {
+        newpath.append(p.substring(last, dupIndex));
+	// Ignore the duplicate path characters.
+	while (p.charAt(dupIndex) == separatorChar)
+	  {
+	    dupIndex++;
+	    if (dupIndex == plen)
+	      return newpath.toString();
+	  }
+	newpath.append(separatorChar);
+	last = dupIndex;
+	dupIndex = p.indexOf(dupSeparator, last);
+      }
+    
+    // Again, ignore possible trailing separator (except special cases
+    // like "a:\" on Windows).
+    int end;
+    if (plen > 1 && p.charAt (plen - 1) == separatorChar)
+    {
+      if (separatorChar == '\\' && plen == 3 && p.charAt (1) == ':')
+        end = plen;
+      else
+        end = plen - 1;
+    }
+    else
+      end = plen;
+    newpath.append(p.substring(last, end));
+    
+    return newpath.toString();
+  }
+ 
+  /**
+   * This method initializes a new <code>File</code> object to represent
+   * a file in the specified named directory.  The path name to the file
+   * will be the directory name plus the separator string plus the file
+   * name.  If the directory path name ends in the separator string, another
+   * separator string will still be appended.
+   *
+   * @param dirPath The path to the directory the file resides in
+   * @param name The name of the file
+   */
+  public File(String dirPath, String name)
+  {
+    if (name == null)
+      throw new NullPointerException();
+    if (dirPath != null)
+      {
+	if (dirPath.length() > 0)
+	  {
+	    // Try to be smart about the number of separator characters.
+	    if (dirPath.charAt(dirPath.length() - 1) == separatorChar
+		|| name.length() == 0)
+	      path = normalizePath(dirPath + name);
+	    else
+	      path = normalizePath(dirPath + separatorChar + name);
+	  }
+	else
+	  {
+	    // If dirPath is empty, use a system dependant
+	    // default prefix.
+	    // Note that the leading separators in name have
+	    // to be chopped off, to prevent them forming
+	    // a UNC prefix on Windows.
+	    if (separatorChar == '\\' /* TODO use ON_WINDOWS */)
+	      {
+		int skip = 0;
+		while(name.length() > skip
+		    && (name.charAt(skip) == separatorChar
+		    || name.charAt(skip) == '/'))
+		  {
+		    skip++;
+		  }
+		name = name.substring(skip);
+	      }
+	    path = normalizePath(separatorChar + name);
+	  }
+      }
+    else
+      path = normalizePath(name);
+  }
+
+  /**
+   * This method initializes a new <code>File</code> object to represent
+   * a file in the specified directory.  If the <code>directory</code>
+   * argument is <code>null</code>, the file is assumed to be in the
+   * current directory as specified by the <code>user.dir</code> system
+   * property
+   *
+   * @param directory The directory this file resides in
+   * @param name The name of the file
+   */
+  public File(File directory, String name)
+  {
+    this (directory == null ? null : directory.path, name);
+  }
+
+  /**
+   * This method initializes a new <code>File</code> object to represent
+   * a file corresponding to the specified <code>file:</code> protocol URI.
+   *
+   * @param uri The uri.
+   */
+  public File(URI uri)
+  {
+    if (uri == null)
+	throw new NullPointerException("uri is null");
+
+    if (!uri.getScheme().equals("file"))
+	throw new IllegalArgumentException("invalid uri protocol");
+
+    String name = uri.getPath();
+    if (name == null)
+      throw new IllegalArgumentException("URI \"" + uri
+                     + "\" is not hierarchical");
+    path = normalizePath(name);
+  }
+
+  /**
+   * This method returns the path of this file as an absolute path name.
+   * If the path name is already absolute, then it is returned.  Otherwise
+   * the value returned is the current directory plus the separatory
+   * string plus the path of the file.  The current directory is determined
+   * from the <code>user.dir</code> system property.
+   *
+   * @return The absolute path of this file
+   */
+  public String getAbsolutePath()
+  {
+    if (isAbsolute())
+      return path;
+    else if (separatorChar == '\\' 
+             && path.length() > 0 && path.charAt (0) == '\\')
+      {
+        // On Windows, even if the path starts with a '\\' it is not
+        // really absolute until we prefix the drive specifier from
+        // the current working directory to it.
+        return System.getProperty ("user.dir").substring (0, 2) + path;
+      }
+    else if (separatorChar == '\\' 
+             && path.length() > 1 && path.charAt (1) == ':'
+             && ((path.charAt (0) >= 'a' && path.charAt (0) <= 'z')
+                 || (path.charAt (0) >= 'A' && path.charAt (0) <= 'Z')))
+      {
+        // On Windows, a process has a current working directory for
+        // each drive and a path like "G:foo\bar" would mean the 
+        // absolute path "G:\wombat\foo\bar" if "\wombat" is the 
+        // working directory on the G drive.
+        String drvDir = null;
+        try
+          {
+            drvDir = new File (path.substring (0, 2)).getCanonicalPath();
+          }
+        catch (IOException e)
+          {
+            drvDir = path.substring (0, 2) + "\\";
+          }
+        
+        // Note: this would return "C:\\." for the path "C:.", if "\"
+        // is the working folder on the C drive, but this is 
+        // consistent with what Sun's JRE 1.4.1.01 actually returns!
+        if (path.length() > 2)
+          return drvDir + '\\' + path.substring (2, path.length());
+        else
+          return drvDir;
+      }
+    else
+      return System.getProperty ("user.dir") + separatorChar + path;
+  }
+
+  /**
+   * This method returns a <code>File</code> object representing the
+   * absolute path of this object.
+   *
+   * @return A <code>File</code> with the absolute path of the object.
+   *
+   * @since 1.2
+   */
+  public File getAbsoluteFile()
+  {
+    return new File(getAbsolutePath());
+  }
+
+  /**
+   * This method returns a canonical representation of the pathname of
+   * this file.  The actual form of the canonical representation is
+   * system-dependent.  On the GNU system, conversion to canonical
+   * form involves the removal of redundant separators, references to
+   * "." and "..", and symbolic links.
+   * <p>
+   * Note that this method, unlike the other methods which return path
+   * names, can throw an IOException.  This is because native method 
+   * might be required in order to resolve the canonical path
+   *
+   * @exception IOException If an error occurs
+   */
+  public native String getCanonicalPath() throws IOException;
+
+  /**
+   * This method returns a <code>File</code> object representing the
+   * canonical path of this object.
+   *
+   * @return A <code>File</code> instance representing the canonical path of
+   * this object.
+   *
+   * @exception IOException If an error occurs.
+   *
+   * @since 1.2
+   */
+  public File getCanonicalFile() throws IOException
+  {
+    return new File(getCanonicalPath());
+  }
+
+  /**
+   * This method returns the name of the file.  This is everything in the
+   * complete path of the file after the last instance of the separator
+   * string.
+   *
+   * @return The file name
+   */
+  public String getName()
+  {
+    int nameSeqIndex = 0;
+
+    if (separatorChar == '\\' && path.length() > 1)
+      {
+        // On Windows, ignore the drive specifier or the leading '\\'
+        // of a UNC network path, if any (a.k.a. the "prefix").
+        if ((path.charAt (0) == '\\' && path.charAt (1) == '\\')
+            || (((path.charAt (0) >= 'a' && path.charAt (0) <= 'z')
+		 || (path.charAt (0) >= 'A' && path.charAt (0) <= 'Z'))
+		&& path.charAt (1) == ':'))
+	  {
+	    if (path.length() > 2)
+	      nameSeqIndex = 2;
+	    else
+	      return "";
+	  }
+      }
+
+    String nameSeq 
+      = (nameSeqIndex > 0 ? path.substring (nameSeqIndex) : path);
+
+    int last = nameSeq.lastIndexOf (separatorChar);
+
+    return nameSeq.substring (last + 1);
+  }
+
+  /**
+   * This method returns a <code>String</code> the represents this file's
+   * parent.  <code>null</code> is returned if the file has no parent.  The
+   * parent is determined via a simple operation which removes the
+   *
+   * @return The parent directory of this file
+   */
+  public String getParent()
+  {
+    String prefix = null;
+    int nameSeqIndex = 0;
+
+    // The "prefix", if present, is the leading "/" on UNIX and 
+    // either the drive specifier (e.g. "C:") or the leading "\\"
+    // of a UNC network path on Windows.
+    if (separatorChar == '/' && path.charAt (0) == '/')
+      {
+        prefix = "/";
+        nameSeqIndex = 1;
+      }
+    else if (separatorChar == '\\' && path.length() > 1)
+      {
+        if ((path.charAt (0) == '\\' && path.charAt (1) == '\\')
+            || (((path.charAt (0) >= 'a' && path.charAt (0) <= 'z')
+                 || (path.charAt (0) >= 'A' && path.charAt (0) <= 'Z'))
+                && path.charAt (1) == ':'))
+          {
+            prefix = path.substring (0, 2);
+            nameSeqIndex = 2;
+          }
+      }
+
+    // According to the JDK docs, the returned parent path is the 
+    // portion of the name sequence before the last separator
+    // character, if found, prefixed by the prefix, otherwise null.
+    if (nameSeqIndex < path.length())
+      {
+        String nameSeq = path.substring (nameSeqIndex, path.length());
+        int last = nameSeq.lastIndexOf (separatorChar);
+        if (last == -1)
+          return prefix;
+        else if (last == (nameSeq.length() - 1))
+          // Note: The path would not have a trailing separator
+          // except for cases like "C:\" on Windows (see 
+          // normalizePath( )), where Sun's JRE 1.4 returns null.
+          return null;
+        else if (last == 0)
+          last++;
+
+        if (prefix != null)
+          return prefix + nameSeq.substring (0, last);
+        else
+          return nameSeq.substring (0, last);
+      }
+    else
+      // Sun's JRE 1.4 returns null if the prefix is the only 
+      // component of the path - so "/" gives null on UNIX and 
+      // "C:", "\\", etc. return null on Windows.
+      return null;
+  }
+
+  /**
+   * This method returns a <code>File</code> object representing the parent
+   * file of this one.
+   *
+   * @return a <code>File</code> for the parent of this object.  
+   * <code>null</code>
+   * will be returned if this object does not have a parent.
+   *
+   * @since 1.2
+   */
+  public File getParentFile()
+  {
+    String parent = getParent();
+    return parent != null ? new File(parent) : null;
+  }
+
+  /**
+   * Returns the path name that represents this file.  May be a relative
+   * or an absolute path name
+   *
+   * @return The pathname of this file
+   */
+  public String getPath()
+  {
+    return path;
+  }
+
+  /**
+   * This method returns a hash code representing this file.  It is the
+   * hash code of the path of this file (as returned by <code>getPath()</code>)
+   * exclusived or-ed with the value 1234321.
+   *
+   * @return The hash code for this object
+   */
+  public int hashCode()
+  {
+    if (caseSensitive)
+      return path.hashCode() ^ 1234321;
+    else
+      return path.toLowerCase().hashCode() ^ 1234321;
+  }
+
+  /**
+   * This method returns true if this object represents an absolute file
+   * path and false if it does not.  The definition of an absolute path varies
+   * by system.  As an example, on GNU systems, a path is absolute if it starts
+   * with a "/".
+   *
+   * @return <code>true</code> if this object represents an absolute 
+   * file name, <code>false</code> otherwise.
+   */
+  public native boolean isAbsolute();
+
+  /*
+   * This method tests whether or not the file represented by this
+   * object is a directory.
+   */
+  private boolean internalIsDirectory()
+  {
+    return _stat (DIRECTORY);
+  }
+  
+  /**
+   * This method tests whether or not the file represented by this object
+   * is a directory.  In order for this method to return <code>true</code>,
+   * the file represented by this object must exist and be a directory.
+   * 
+   * @return <code>true</code> if this file is a directory, <code>false</code>
+   * otherwise
+   *
+   * @exception SecurityException If reading of the file is not permitted
+   */
+  public boolean isDirectory()
+  {
+    checkRead();
+    return internalIsDirectory();
+  }
+
+  /**
+   * This method tests whether or not the file represented by this object
+   * is a "plain" file.  A file is a plain file if and only if it 1) Exists,
+   * 2) Is not a directory or other type of special file.
+   *
+   * @return <code>true</code> if this is a plain file, <code>false</code> 
+   * otherwise
+   *
+   * @exception SecurityException If reading of the file is not permitted
+   */
+  public boolean isFile()
+  {
+    checkRead();
+    return _stat (ISFILE);
+  }
+
+  /**
+   * This method tests whether or not this file represents a "hidden" file.
+   * On GNU systems, a file is hidden if its name begins with a "."
+   * character.  Files with these names are traditionally not shown with
+   * directory listing tools.
+   *
+   * @return <code>true</code> if the file is hidden, <code>false</code>
+   * otherwise.
+   *
+   * @since 1.2
+   */
+  public boolean isHidden()
+  {
+    checkRead();
+    return _stat (ISHIDDEN);
+  }
+
+  /**
+   * This method returns the last modification time of this file.  The
+   * time value returned is an abstract value that should not be interpreted
+   * as a specified time value.  It is only useful for comparing to other
+   * such time values returned on the same system.  In that case, the larger
+   * value indicates a more recent modification time. 
+   * <p>
+   * If the file does not exist, then a value of 0 is returned.
+   *
+   * @return The last modification time of the file
+   *
+   * @exception SecurityException If reading of the file is not permitted
+   */
+  public long lastModified()
+  {
+    checkRead();
+    return attr (MODIFIED);
+  }
+
+  /**
+   * This method returns the length of the file represented by this object,
+   * or 0 if the specified file does not exist.
+   *
+   * @return The length of the file
+   *
+   * @exception SecurityException If reading of the file is not permitted
+   */
+  public long length()
+  {
+    checkRead();
+    return attr (LENGTH);
+  }
+
+  /*
+   * This native function actually produces the list of file in this
+   * directory
+   */
+  private final native Object[] performList (FilenameFilter filter,
+					     FileFilter fileFilter,
+					     Class result_type);
+
+  /**
+   * This method returns a array of <code>String</code>'s representing the
+   * list of files is then directory represented by this object.  If this
+   * object represents a non-directory file or a non-existent file, then
+   * <code>null</code> is returned.  The list of files will not contain
+   * any names such as "." or ".." which indicate the current or parent
+   * directory.  Also, the names are not guaranteed to be sorted.
+   * <p>
+   * In this form of the <code>list()</code> method, a filter is specified
+   * that allows the caller to control which files are returned in the
+   * list.  The <code>FilenameFilter</code> specified is called for each
+   * file returned to determine whether or not that file should be included
+   * in the list.
+   * <p>
+   * A <code>SecurityManager</code> check is made prior to reading the
+   * directory.  If read access to the directory is denied, an exception
+   * will be thrown.
+   *
+   * @param filter An object which will identify files to exclude from 
+   * the directory listing.
+   *
+   * @return An array of files in the directory, or <code>null</code> 
+   * if this object does not represent a valid directory.
+   * 
+   * @exception SecurityException If read access is not allowed to the 
+   * directory by the <code>SecurityManager</code>
+   */
+  public String[] list(FilenameFilter filter)
+  {
+    checkRead();
+    return (String[]) performList (filter, null, String.class);
+  }
+
+  /**
+   * This method returns a array of <code>String</code>'s representing the
+   * list of files is then directory represented by this object.  If this
+   * object represents a non-directory file or a non-existent file, then
+   * <code>null</code> is returned.  The list of files will not contain
+   * any names such as "." or ".." which indicate the current or parent
+   * directory.  Also, the names are not guaranteed to be sorted.
+   * <p>
+   * A <code>SecurityManager</code> check is made prior to reading the
+   * directory.  If read access to the directory is denied, an exception
+   * will be thrown.
+   *
+   * @return An array of files in the directory, or <code>null</code> if 
+   * this object does not represent a valid directory.
+   * 
+   * @exception SecurityException If read access is not allowed to the 
+   * directory by the <code>SecurityManager</code>
+   */
+  public String[] list()
+  {
+    checkRead();
+    return (String[]) performList (null, null, String.class);
+  }
+
+  /**
+   * This method returns an array of <code>File</code> objects representing
+   * all the files in the directory represented by this object. If this
+   * object does not represent a directory, <code>null</code> is returned.
+   * Each of the returned <code>File</code> object is constructed with this
+   * object as its parent.
+   * <p>
+   * A <code>SecurityManager</code> check is made prior to reading the
+   * directory.  If read access to the directory is denied, an exception
+   * will be thrown.
+   *
+   * @return An array of <code>File</code> objects for this directory.
+   *
+   * @exception SecurityException If the <code>SecurityManager</code> denies
+   * access to this directory.
+   *
+   * @since 1.2
+   */
+  public File[] listFiles()
+  {
+    checkRead();
+    return (File[]) performList (null, null, File.class);
+  }
+  
+  /**
+   * This method returns an array of <code>File</code> objects representing
+   * all the files in the directory represented by this object. If this
+   * object does not represent a directory, <code>null</code> is returned.
+   * Each of the returned <code>File</code> object is constructed with this
+   * object as its parent.
+   * <p> 
+   * In this form of the <code>listFiles()</code> method, a filter is specified
+   * that allows the caller to control which files are returned in the
+   * list.  The <code>FilenameFilter</code> specified is called for each
+   * file returned to determine whether or not that file should be included
+   * in the list.
+   * <p>
+   * A <code>SecurityManager</code> check is made prior to reading the
+   * directory.  If read access to the directory is denied, an exception
+   * will be thrown.
+   *
+   * @return An array of <code>File</code> objects for this directory.
+   *
+   * @exception SecurityException If the <code>SecurityManager</code> denies
+   * access to this directory.
+   *
+   * @since 1.2
+   */
+  public File[] listFiles(FilenameFilter filter)
+  {
+    checkRead();
+    return (File[]) performList (filter, null, File.class);
+  }
+
+  /**
+   * This method returns an array of <code>File</code> objects representing
+   * all the files in the directory represented by this object. If this
+   * object does not represent a directory, <code>null</code> is returned.
+   * Each of the returned <code>File</code> object is constructed with this
+   * object as its parent.
+   * <p> 
+   * In this form of the <code>listFiles()</code> method, a filter is specified
+   * that allows the caller to control which files are returned in the
+   * list.  The <code>FileFilter</code> specified is called for each
+   * file returned to determine whether or not that file should be included
+   * in the list.
+   * <p>
+   * A <code>SecurityManager</code> check is made prior to reading the
+   * directory.  If read access to the directory is denied, an exception
+   * will be thrown.
+   *
+   * @return An array of <code>File</code> objects for this directory.
+   *
+   * @exception SecurityException If the <code>SecurityManager</code> denies
+   * access to this directory.
+   *
+   * @since 1.2
+   */
+  public File[] listFiles(FileFilter filter)
+  {
+    checkRead();
+    return (File[]) performList (null, filter, File.class);
+  }
+
+  /**
+   * This method returns a <code>String</code> that is the path name of the
+   * file as returned by <code>getPath</code>.
+   *
+   * @return A <code>String</code> representation of this file
+   */
+  public String toString()
+  {
+    return path;
+  }
+
+  /**
+   * @return A <code>URI</code> for this object.
+   */
+  public URI toURI()
+  {
+    String abspath = getAbsolutePath();
+
+    if (isDirectory())
+      abspath = abspath + separator;
+        
+    try
+      {
+	return new URI("file", abspath.replace(separatorChar, '/'), null);
+      }
+    catch (URISyntaxException use)
+      {
+        // Can't happen.
+	throw new RuntimeException(use);
+      }
+  }
+
+  /**
+   * This method returns a <code>URL</code> with the <code>file:</code>
+   * protocol that represents this file.  The exact form of this URL is
+   * system dependent.
+   *
+   * @return A <code>URL</code> for this object.
+   *
+   * @exception MalformedURLException If the URL cannot be created 
+   * successfully.
+   */
+  public URL toURL() throws MalformedURLException
+  {
+    // On Win32, Sun's JDK returns URLs of the form "file:/c:/foo/bar.txt",
+    // while on UNIX, it returns URLs of the form "file:/foo/bar.txt". 
+    if (separatorChar == '\\')
+      return new URL ("file:/" + getAbsolutePath().replace ('\\', '/')
+		      + (isDirectory() ? "/" : ""));
+    else
+      return new URL ("file:" + getAbsolutePath()
+		      + (isDirectory() ? "/" : ""));
+  }
+
+  /*
+   * This native method actually creates the directory
+   */
+  private final native boolean performMkdir();
+
+  /**
+   * This method creates a directory for the path represented by this object.
+   *
+   * @return <code>true</code> if the directory was created, 
+   * <code>false</code> otherwise
+   *
+   * @exception SecurityException If write access is not allowed to this file
+   */
+  public boolean mkdir()
+  {
+    checkWrite();
+    return performMkdir();
+  }
+
+  private static boolean mkdirs (File x)
+  {
+    if (x.isDirectory())
+      return true;
+    String p = x.getPath();
+    String parent = x.getParent();
+    if (parent != null)
+      {
+	x.path = parent;
+	if (! mkdirs (x))
+	  return false;
+	x.path = p;
+      }
+    return x.mkdir();
+  }
+
+  /**
+   * This method creates a directory for the path represented by this file.
+   * It will also create any intervening parent directories if necessary.
+   *
+   * @return <code>true</code> if the directory was created, 
+   * <code>false</code> otherwise
+   *
+   * @exception SecurityException If write access is not allowed to this file
+   */
+  public boolean mkdirs()
+  {
+    checkWrite();
+    if (isDirectory())
+      return false;
+    return mkdirs (new File (path));
+  }
+
+  private static synchronized String nextValue()
+  {
+    return Long.toString(counter++, Character.MAX_RADIX);
+  }
+
+  /**
+   * This method creates a temporary file in the specified directory.  If 
+   * the directory name is null, then this method uses the system temporary 
+   * directory. The files created are guaranteed not to currently exist and 
+   * the same file name will never be used twice in the same virtual 
+   * machine instance.  
+   * The system temporary directory is determined by examinging the 
+   * <code>java.io.tmpdir</code> system property.
+   * <p>
+   * The <code>prefix</code> parameter is a sequence of at least three
+   * characters that are used as the start of the generated filename.  The
+   * <code>suffix</code> parameter is a sequence of characters that is used
+   * to terminate the file name.  This parameter may be <code>null</code>
+   * and if it is, the suffix defaults to ".tmp".
+   * <p>
+   * If a <code>SecurityManager</code> exists, then its <code>checkWrite</code>
+   * method is used to verify that this operation is permitted.
+   *
+   * @param prefix The character prefix to use in generating the path name.
+   * @param suffix The character suffix to use in generating the path name.
+   * @param directory The directory to create the file in, or 
+   * <code>null</code> for the default temporary directory
+   *
+   * @exception IllegalArgumentException If the patterns is not valid
+   * @exception SecurityException If there is no permission to perform 
+   * this operation
+   * @exception IOException If an error occurs
+   *
+   * @since 1.2
+   */
+  public static File createTempFile(String prefix, String suffix,
+				    File directory)
+    throws IOException
+  {
+    // Grab the system temp directory if necessary
+    if (directory == null)
+      {
+        String dirname = tmpdir;
+        if (dirname == null)
+          throw new IOException("Cannot determine system temporary directory"); 
+	
+        directory = new File(dirname);
+        if (!directory.internalExists())
+          throw new IOException("System temporary directory "
+                                + directory.getName() + " does not exist.");
+        if (!directory.internalIsDirectory())
+          throw new IOException("System temporary directory "
+                                + directory.getName()
+                                + " is not really a directory.");
+      }
+
+    // Check if prefix is at least 3 characters long
+    if (prefix.length() < 3)
+      throw new IllegalArgumentException("Prefix too short: " + prefix);
+
+    // Set default value of suffix
+    if (suffix == null)
+      suffix = ".tmp";
+
+    // Truncation rules.
+    // `6' is the number of characters we generate.
+    if (prefix.length() + 6 + suffix.length() > maxPathLen)
+      {
+	int suf_len = 0;
+	if (suffix.charAt(0) == '.')
+	  suf_len = 4;
+	suffix = suffix.substring(0, suf_len);
+	if (prefix.length() + 6 + suf_len > maxPathLen)
+	  prefix = prefix.substring(0, maxPathLen - 6 - suf_len);
+      }
+
+    File f;
+
+    // How many times should we try?  We choose 100.
+    for (int i = 0; i < 100; ++i)
+      {
+	// This is ugly.
+	String t = "ZZZZZZ" + nextValue();
+	String l = prefix + t.substring(t.length() - 6) + suffix;
+	try
+	  {
+	    f = new File(directory, l);
+	    if (f.createNewFile())
+	      return f;
+	  }
+	catch (IOException ignored)
+	  {
+	  }
+      }
+
+    throw new IOException ("cannot create temporary file");
+  }
+
+  /*
+   * This native method sets the permissions to make the file read only.
+   */
+  private native boolean performSetReadOnly();
+
+  /**
+   * This method sets the file represented by this object to be read only.
+   * A read only file or directory cannot be modified.  Please note that 
+   * GNU systems allow read only files to be deleted if the directory it
+   * is contained in is writable.
+   *
+   * @return <code>true</code> if the operation succeeded, <code>false</code>
+   * otherwise.
+   *
+   * @exception SecurityException If the <code>SecurityManager</code> does
+   * not allow this operation.
+   *
+   * @since 1.2
+   */
+  public boolean setReadOnly()
+  {
+    // Do a security check before trying to do anything else.
+    checkWrite();
+    return performSetReadOnly();
+  }
+
+  private static native File[] performListRoots();
+
+  /**
+   * This method returns an array of filesystem roots.  Some operating systems
+   * have volume oriented filesystem.  This method provides a mechanism for
+   * determining which volumes exist.  GNU systems use a single hierarchical
+   * filesystem, so will have only one "/" filesystem root.
+   *
+   * @return An array of <code>File</code> objects for each filesystem root
+   * available.
+   *
+   * @since 1.2
+   */
+  public static File[] listRoots()
+  {
+    File[] roots = performListRoots();
+    
+    SecurityManager s = System.getSecurityManager();
+    if (s != null)
+      {
+	// Only return roots to which the security manager permits read access.
+	int count = roots.length;
+	for (int i = 0; i < roots.length; i++)
+	  {
+	    try
+	      {
+        	s.checkRead (roots[i].path);		
+	      }
+	    catch (SecurityException sx)
+	      {
+	        roots[i] = null;
+		count--;
+	      }
+	  }
+	if (count != roots.length)
+	  {
+	    File[] newRoots = new File[count];
+	    int k = 0;
+	    for (int i=0; i < roots.length; i++)
+	      {
+	        if (roots[i] != null)
+		  newRoots[k++] = roots[i];
+	      }
+	    roots = newRoots;
+	  }
+      }
+    return roots;
+  }
+
+  /**
+   * This method creates a temporary file in the system temporary directory. 
+   * The files created are guaranteed not to currently exist and the same file
+   * name will never be used twice in the same virtual machine instance.  The
+   * system temporary directory is determined by examinging the 
+   * <code>java.io.tmpdir</code> system property.
+   * <p>
+   * The <code>prefix</code> parameter is a sequence of at least three
+   * characters that are used as the start of the generated filename.  The
+   * <code>suffix</code> parameter is a sequence of characters that is used
+   * to terminate the file name.  This parameter may be <code>null</code>
+   * and if it is, the suffix defaults to ".tmp".
+   * <p>
+   * If a <code>SecurityManager</code> exists, then its <code>checkWrite</code>
+   * method is used to verify that this operation is permitted.
+   * <p>
+   * This method is identical to calling 
+   * <code>createTempFile(prefix, suffix, null)</code>.
+   *
+   * @param prefix The character prefix to use in generating the path name.
+   * @param suffix The character suffix to use in generating the path name.
+   *
+   * @exception IllegalArgumentException If the prefix or suffix are not valid.
+   * @exception SecurityException If there is no permission to perform 
+   * this operation
+   * @exception IOException If an error occurs
+   */
+  public static File createTempFile(String prefix, String suffix)
+    throws IOException
+  {
+    return createTempFile(prefix, suffix, null);
+  }
+
+  /**
+   * This method compares the specified <code>File</code> to this one
+   * to test for equality.  It does this by comparing the canonical path names
+   * of the files. 
+   * <p>
+   * The canonical paths of the files are determined by calling the
+   * <code>getCanonicalPath</code> method on each object.
+   * <p>
+   * This method returns a 0 if the specified <code>Object</code> is equal
+   * to this one, a negative value if it is less than this one 
+   * a positive value if it is greater than this one.
+   *
+   * @return An integer as described above
+   *
+   * @since 1.2
+   */
+  public int compareTo(File other)
+  {
+    if (caseSensitive)
+      return path.compareTo (other.path);
+    else
+      return path.compareToIgnoreCase (other.path);
+  }
+
+  /**
+   * This method compares the specified <code>Object</code> to this one
+   * to test for equality.  It does this by comparing the canonical path names
+   * of the files.  This method is identical to <code>compareTo(File)</code>
+   * except that if the <code>Object</code> passed to it is not a 
+   * <code>File</code>, it throws a <code>ClassCastException</code>
+   * <p>
+   * The canonical paths of the files are determined by calling the
+   * <code>getCanonicalPath</code> method on each object.
+   * <p>
+   * This method returns a 0 if the specified <code>Object</code> is equal
+   * to this one, a negative value if it is less than this one 
+   * a positive value if it is greater than this one.
+   *
+   * @return An integer as described above
+   *
+   * @exception ClassCastException If the passed <code>Object</code> is 
+   * not a <code>File</code>
+   *
+   * @since 1.2
+   */
+  public int compareTo(Object obj)
+  {
+    return compareTo((File) obj);
+  }
+
+  /*
+   * This native method actually performs the rename.
+   */
+  private native boolean performRenameTo (File dest);
+
+  /**
+   * This method renames the file represented by this object to the path
+   * of the file represented by the argument <code>File</code>.
+   *
+   * @param dest The <code>File</code> object representing the target name
+   *
+   * @return <code>true</code> if the rename succeeds, <code>false</code> 
+   * otherwise.
+   *
+   * @exception SecurityException If write access is not allowed to the 
+   * file by the <code>SecurityMananger</code>.
+   */
+  public synchronized boolean renameTo(File dest)
+  {
+    SecurityManager s = System.getSecurityManager();
+    if (s != null)
+      {
+	s.checkWrite (getPath());
+	s.checkWrite (dest.getPath());
+      }
+    return performRenameTo (dest);
+  }
+
+  /*
+   * This method does the actual setting of the modification time.
+   */
+  private native boolean performSetLastModified(long time);
+ 
+  /**
+   * This method sets the modification time on the file to the specified
+   * value.  This is specified as the number of seconds since midnight
+   * on January 1, 1970 GMT.
+   *
+   * @param time The desired modification time.
+   *
+   * @return <code>true</code> if the operation succeeded, <code>false</code>
+   * otherwise.
+   *
+   * @exception IllegalArgumentException If the specified time is negative.
+   * @exception SecurityException If the <code>SecurityManager</code> will
+   * not allow this operation.
+   *
+   * @since 1.2
+   */
+  public boolean setLastModified(long time) 
+  {
+    if (time < 0)
+      throw new IllegalArgumentException("Negative modification time: " + time);
+
+    checkWrite();
+    return performSetLastModified(time);
+  }
+
+  private void checkWrite()
+  {
+    // Check the SecurityManager
+    SecurityManager s = System.getSecurityManager();
+    
+    if (s != null)
+      s.checkWrite(path);
+  }
+
+  private void checkRead()
+  {
+    // Check the SecurityManager
+    SecurityManager s = System.getSecurityManager();
+    
+    if (s != null)
+      s.checkRead(path);
+  }
+
+  /** 
+   * Calling this method requests that the file represented by this object
+   * be deleted when the virtual machine exits.  Note that this request cannot
+   * be cancelled.  Also, it will only be carried out if the virtual machine
+   * exits normally.
+   *
+   * @exception SecurityException If deleting of the file is not allowed
+   *
+   * @since 1.2 
+   */
+  // FIXME: This should use the ShutdownHook API once we implement that.
+  public void deleteOnExit()
+  {
+    // Check the SecurityManager
+    SecurityManager sm = System.getSecurityManager();
+    if (sm != null)
+      sm.checkDelete (getPath());
+
+    DeleteFileHelper.add(this);
+  }
+
+  private void writeObject(ObjectOutputStream oos) throws IOException
+  {
+    oos.defaultWriteObject();
+    oos.writeChar(separatorChar);
+  }
+
+  private void readObject(ObjectInputStream ois)
+    throws ClassNotFoundException, IOException
+  {
+    ois.defaultReadObject();
+
+    // If the file was from an OS with a different dir separator,
+    // fixup the path to use the separator on this OS.
+    char oldSeparatorChar = ois.readChar();
+    
+    if (oldSeparatorChar != separatorChar)
+      path = path.replace(oldSeparatorChar, separatorChar);
+  }
+  
+} // class File
+

Added: llvm-gcc-4.2/trunk/libjava/java/io/InputStreamReader.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/InputStreamReader.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/InputStreamReader.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/InputStreamReader.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,332 @@
+/* InputStreamReader.java -- Reader than transforms bytes to chars
+   Copyright (C) 1998, 1999, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+import gnu.gcj.convert.*;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+
+/**
+ * This class reads characters from a byte input stream.   The characters
+ * read are converted from bytes in the underlying stream by a 
+ * decoding layer.  The decoding layer transforms bytes to chars according
+ * to an encoding standard.  There are many available encodings to choose 
+ * from.  The desired encoding can either be specified by name, or if no
+ * encoding is selected, the system default encoding will be used.  The
+ * system default encoding name is determined from the system property
+ * <code>file.encoding</code>.  The only encodings that are guaranteed to 
+ * be availalbe are "8859_1" (the Latin-1 character set) and "UTF8".
+ * Unforunately, Java does not provide a mechanism for listing the
+ * ecodings that are supported in a given implementation.
+ * <p>
+ * Here is a list of standard encoding names that may be available:
+ * <p>
+ * <ul>
+ * <li>8859_1 (ISO-8859-1/Latin-1)</li>
+ * <li>8859_2 (ISO-8859-2/Latin-2)</li>
+ * <li>8859_3 (ISO-8859-3/Latin-3)</li>
+ * <li>8859_4 (ISO-8859-4/Latin-4)</li>
+ * <li>8859_5 (ISO-8859-5/Latin-5)</li>
+ * <li>8859_6 (ISO-8859-6/Latin-6)</li>
+ * <li>8859_7 (ISO-8859-7/Latin-7)</li>
+ * <li>8859_8 (ISO-8859-8/Latin-8)</li>
+ * <li>8859_9 (ISO-8859-9/Latin-9)</li>
+ * <li>ASCII (7-bit ASCII)</li>
+ * <li>UTF8 (UCS Transformation Format-8)</li>
+ * <li>More later</li>
+ * </ul>
+ * <p>
+ * It is recommended that applications do not use 
+ * <code>InputStreamReader</code>'s
+ * directly.  Rather, for efficiency purposes, an object of this class
+ * should be wrapped by a <code>BufferedReader</code>.
+ * <p>
+ * Due to a deficiency the Java class library design, there is no standard
+ * way for an application to install its own byte-character encoding.
+ *
+ * @see BufferedReader
+ * @see InputStream
+ *
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ * @author Per Bothner (bothner at cygnus.com)
+ * @date April 22, 1998.  
+ */
+public class InputStreamReader extends Reader
+{
+  BufferedInputStream in;
+
+  // Buffer of chars read from in and converted but not consumed.
+  char[] work;
+  // Next available character (in work buffer) to read.
+  int wpos;
+  // Last available character (in work buffer) to read.
+  int wcount;
+
+  /*
+   * This is the byte-character decoder class that does the reading and
+   * translation of bytes from the underlying stream.
+   */
+  BytesToUnicode converter;
+
+  /**
+   * This method initializes a new instance of <code>InputStreamReader</code>
+   * to read from the specified stream using the default encoding.
+   *
+   * @param in The <code>InputStream</code> to read from 
+   */
+  public InputStreamReader(InputStream in)
+  {
+    this(in, BytesToUnicode.getDefaultDecoder());
+  }
+
+  /**
+   * This method initializes a new instance of <code>InputStreamReader</code>
+   * to read from the specified stream using a caller supplied character
+   * encoding scheme.  Note that due to a deficiency in the Java language
+   * design, there is no way to determine which encodings are supported.
+   * 
+   * @param in The <code>InputStream</code> to read from
+   * @param encoding_name The name of the encoding scheme to use
+   *
+   * @exception UnsupportedEncodingException If the encoding scheme 
+   * requested is not available.
+   */
+  public InputStreamReader(InputStream in, String encoding_name)
+    throws UnsupportedEncodingException
+  {
+    this(in, BytesToUnicode.getDecoder(encoding_name));
+  }
+
+  /**
+   * Creates an InputStreamReader that uses a decoder of the given
+   * charset to decode the bytes in the InputStream into
+   * characters.
+   */
+  public InputStreamReader(InputStream in, Charset charset)
+  {
+    this(in, new BytesToCharsetAdaptor(charset));
+  }
+
+  /**
+   * Creates an InputStreamReader that uses the given charset decoder
+   * to decode the bytes in the InputStream into characters.
+   */
+  public InputStreamReader(InputStream in, CharsetDecoder decoder)
+  {
+    this(in, new BytesToCharsetAdaptor(decoder));
+  }
+
+  private InputStreamReader(InputStream in, BytesToUnicode decoder)
+  {
+    // FIXME: someone could pass in a BufferedInputStream whose buffer
+    // is smaller than the longest encoded character for this
+    // encoding.  We will probably go into an infinite loop in this
+    // case.  We probably ought to just have our own byte buffering
+    // here.
+    this.in = in instanceof BufferedInputStream
+              ? (BufferedInputStream) in
+              : new BufferedInputStream(in);
+    /* Don't need to call super(in) here as long as the lock gets set. */
+    this.lock = in;
+    converter = decoder;
+    converter.setInput(this.in.buf, 0, 0);
+  }
+
+  /**
+   * This method closes this stream, as well as the underlying 
+   * <code>InputStream</code>.
+   *
+   * @exception IOException If an error occurs
+   */
+  public void close() throws IOException
+  {
+    synchronized (lock)
+      {
+	if (in != null)
+	  in.close();
+	in = null;
+	work = null;
+	wpos = wcount = 0;
+      }
+  }
+
+  /**
+   * This method returns the name of the encoding that is currently in use
+   * by this object.  If the stream has been closed, this method is allowed
+   * to return <code>null</code>.
+   *
+   * @return The current encoding name
+   */
+  public String getEncoding()
+  {
+    return in != null ? converter.getName() : null;
+  }
+
+  /**
+   * This method checks to see if the stream is read to be read.  It
+   * will return <code>true</code> if is, or <code>false</code> if it is not.
+   * If the stream is not ready to be read, it could (although is not required
+   * to) block on the next read attempt.
+   *
+   * @return <code>true</code> if the stream is ready to be read, 
+   * <code>false</code> otherwise
+   *
+   * @exception IOException If an error occurs
+   */
+  public boolean ready() throws IOException
+  {
+    synchronized (lock)
+      {
+	if (in == null)
+	  throw new IOException("Stream closed");
+
+	if (wpos < wcount)
+	  return true;
+
+	// According to the spec, an InputStreamReader is ready if its
+	// input buffer is not empty (above), or if bytes are
+	// available on the underlying byte stream.
+	return in.available () > 0;
+      }
+  }
+
+  /**
+   * This method reads up to <code>length</code> characters from the stream into
+   * the specified array starting at index <code>offset</code> into the
+   * array.
+   *
+   * @param buf The character array to recieve the data read
+   * @param offset The offset into the array to start storing characters
+   * @param length The requested number of characters to read.
+   *
+   * @return The actual number of characters read, or -1 if end of stream.
+   *
+   * @exception IOException If an error occurs
+   */
+  public int read (char[] buf, int offset, int length) throws IOException
+  {
+    synchronized (lock)
+      {
+	if (in == null)
+	  throw new IOException("Stream closed");
+
+	if (length == 0)
+	  return 0;
+
+	int wavail = wcount - wpos;
+	if (wavail <= 0)
+	  {
+	    // Nothing waiting, so refill their buffer.
+	    return refill(buf, offset, length);
+	  }
+
+	if (length > wavail)
+	  length = wavail;
+	System.arraycopy(work, wpos, buf, offset, length);
+	wpos += length;
+	return length;
+      }
+  }
+
+  /**
+   * This method reads a single character of data from the stream.
+   *
+   * @return The char read, as an int, or -1 if end of stream.
+   *
+   * @exception IOException If an error occurs
+   */
+  public int read() throws IOException
+  {
+    synchronized (lock)
+      {
+	if (in == null)
+	  throw new IOException("Stream closed");
+
+	int wavail = wcount - wpos;
+	if (wavail <= 0)
+	  {
+	    // Nothing waiting, so refill our internal buffer.
+	    wpos = wcount = 0;
+	    if (work == null)
+	       work = new char[100];
+	    int count = refill(work, 0, work.length);
+	    if (count == -1)
+	      return -1;
+	    wcount += count;
+	  }
+
+	return work[wpos++];
+      }
+  }
+
+  // Read more bytes and convert them into the specified buffer.
+  // Returns the number of converted characters or -1 on EOF.
+  private int refill(char[] buf, int offset, int length) throws IOException
+  {
+    for (;;)
+      {
+	// We have knowledge of the internals of BufferedInputStream
+	// here.  Eww.
+	// BufferedInputStream.refill() can only be called when
+	// `pos>=count'.
+	boolean r = in.pos < in.count || in.refill ();
+	if (! r)
+	  return -1;
+	converter.setInput(in.buf, in.pos, in.count);
+	int count = converter.read(buf, offset, length);
+
+	// We might have bytes but not have made any progress.  In
+	// this case we try to refill.  If refilling fails, we assume
+	// we have a malformed character at the end of the stream.
+	if (count == 0 && converter.inpos == in.pos)
+	  {
+	    in.mark(in.count);
+	    if (! in.refill ())
+	      throw new CharConversionException ();
+	    in.reset();
+	  }
+	else
+	  {
+	    in.skip(converter.inpos - in.pos);
+	    if (count > 0)
+	      return count;
+	  }
+      }
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/java/io/ObjectInputStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/ObjectInputStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/ObjectInputStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/ObjectInputStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1979 @@
+/* ObjectInputStream.java -- Class used to read serialized objects
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
+   Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+import gnu.classpath.Configuration;
+import gnu.java.io.ObjectIdentityWrapper;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.Vector;
+
+public class ObjectInputStream extends InputStream
+  implements ObjectInput, ObjectStreamConstants
+{
+  /**
+   * Creates a new <code>ObjectInputStream</code> that will do all of
+   * its reading from <code>in</code>.  This method also checks
+   * the stream by reading the header information (stream magic number
+   * and stream version).
+   *
+   * @exception IOException Reading stream header from underlying
+   * stream cannot be completed.
+   *
+   * @exception StreamCorruptedException An invalid stream magic
+   * number or stream version was read from the stream.
+   *
+   * @see #readStreamHeader()
+   */
+  public ObjectInputStream(InputStream in)
+    throws IOException, StreamCorruptedException
+  {
+    if (Configuration.DEBUG)
+      {
+	String val = System.getProperty("gcj.dumpobjects");
+	if (dump == false && val != null && !val.equals(""))
+	  {
+	    dump = true;
+	    System.out.println ("Serialization debugging enabled");
+	  }
+	else if (dump == true && (val == null || val.equals("")))
+	  {
+	    dump = false;
+	    System.out.println ("Serialization debugging disabled");
+	  }
+      }
+
+    this.resolveEnabled = false;
+    this.isDeserializing = false;
+    this.blockDataPosition = 0;
+    this.blockDataBytes = 0;
+    this.blockData = new byte[BUFFER_SIZE];
+    this.blockDataInput = new DataInputStream(this);
+    this.realInputStream = new DataInputStream(in);
+    this.nextOID = baseWireHandle;
+    this.objectLookupTable = new Hashtable();
+    this.validators = new Vector();
+    this.classLookupTable = new Hashtable();
+    setBlockDataMode(true);
+    readStreamHeader();
+  }
+
+
+  /**
+   * Returns the next deserialized object read from the underlying stream.
+   *
+   * This method can be overriden by a class by implementing
+   * <code>private void readObject (ObjectInputStream)</code>.
+   *
+   * If an exception is thrown from this method, the stream is left in
+   * an undefined state. This method can also throw Errors and 
+   * RuntimeExceptions if caused by existing readResolve() user code.
+   * 
+   * @return The object read from the underlying stream.
+   *
+   * @exception ClassNotFoundException The class that an object being
+   * read in belongs to cannot be found.
+   *
+   * @exception IOException Exception from underlying
+   * <code>InputStream</code>.
+   */
+  public final Object readObject() throws ClassNotFoundException, IOException
+  {
+    if (this.useSubclassMethod)
+      return readObjectOverride();
+
+    boolean was_deserializing;
+
+    Object ret_val;
+    was_deserializing = this.isDeserializing;
+
+    boolean is_consumed = false;
+    boolean old_mode = setBlockDataMode(false);
+
+    this.isDeserializing = true;
+
+    byte marker = this.realInputStream.readByte();
+
+    depth += 2;
+
+    if(dump) dumpElement("MARKER: 0x" + Integer.toHexString(marker) + " ");
+
+    try
+      {
+	switch (marker)
+	  {
+	  case TC_ENDBLOCKDATA:
+	    {
+	      ret_val = null;
+	      is_consumed = true;
+	      break;
+	    }
+
+	  case TC_BLOCKDATA:
+	  case TC_BLOCKDATALONG:
+	    {
+	      if (marker == TC_BLOCKDATALONG)
+		{ if(dump) dumpElementln("BLOCKDATALONG"); }
+	      else
+		{ if(dump) dumpElementln("BLOCKDATA"); }
+	      readNextBlock(marker);
+	      throw new StreamCorruptedException("Unexpected blockData");
+	    }
+
+	  case TC_NULL:
+	    {
+	      if(dump) dumpElementln("NULL");
+	      ret_val = null;
+	      break;
+	    }
+
+	  case TC_REFERENCE:
+	    {
+	      if(dump) dumpElement("REFERENCE ");
+	      Integer oid = new Integer(this.realInputStream.readInt());
+	      if(dump) dumpElementln(Integer.toHexString(oid.intValue()));
+	      ret_val = ((ObjectIdentityWrapper)
+			 this.objectLookupTable.get(oid)).object;
+	      break;
+	    }
+
+	  case TC_CLASS:
+	    {
+	      if(dump) dumpElementln("CLASS");
+	      ObjectStreamClass osc = (ObjectStreamClass)readObject();
+	      Class clazz = osc.forClass();
+	      assignNewHandle(clazz);
+	      ret_val = clazz;
+	      break;
+	    }
+
+	  case TC_PROXYCLASSDESC:
+	    {
+	      if(dump) dumpElementln("PROXYCLASS");
+	      int n_intf = this.realInputStream.readInt();
+	      String[] intfs = new String[n_intf];
+	      for (int i = 0; i < n_intf; i++)
+		{
+		  intfs[i] = this.realInputStream.readUTF();
+		}
+	      
+	      boolean oldmode = setBlockDataMode(true);
+	      Class cl = resolveProxyClass(intfs);
+	      setBlockDataMode(oldmode);
+	      
+	      ObjectStreamClass osc = lookupClass(cl);
+	      if (osc.firstNonSerializableParentConstructor == null)
+		{
+		  osc.realClassIsSerializable = true;
+		  osc.fields = osc.fieldMapping = new ObjectStreamField[0];
+		  try
+		    {
+		      osc.firstNonSerializableParentConstructor =
+		        Object.class.getConstructor(new Class[0]);
+		    }
+		  catch (NoSuchMethodException x)
+		    {
+		      throw (InternalError)
+			new InternalError("Object ctor missing").initCause(x);
+		    }
+		}
+	      assignNewHandle(osc);
+	      
+	      if (!is_consumed)
+		{
+		  byte b = this.realInputStream.readByte();
+		  if (b != TC_ENDBLOCKDATA)
+		    throw new IOException("Data annotated to class was not consumed." + b);
+		}
+	      else
+		is_consumed = false;
+	      ObjectStreamClass superosc = (ObjectStreamClass)readObject();
+	      osc.setSuperclass(superosc);
+	      ret_val = osc;
+	      break;
+	    }
+
+	  case TC_CLASSDESC:
+	    {
+	      ObjectStreamClass osc = readClassDescriptor();
+	      
+	      if (!is_consumed)
+		{
+		  byte b = this.realInputStream.readByte();
+		  if (b != TC_ENDBLOCKDATA)
+		    throw new IOException("Data annotated to class was not consumed." + b);
+		}
+	      else
+		is_consumed = false;
+	      
+	      osc.setSuperclass ((ObjectStreamClass)readObject());
+	      ret_val = osc;
+	      break;
+	    }
+
+	  case TC_STRING:
+	  case TC_LONGSTRING:
+	    {
+	      if(dump) dumpElement("STRING=");
+	      String s = this.realInputStream.readUTF();
+	      if(dump) dumpElementln(s);
+	      ret_val = processResolution(null, s, assignNewHandle(s));
+	      break;
+	    }
+
+	  case TC_ARRAY:
+	    {
+	      if(dump) dumpElementln("ARRAY");
+	      ObjectStreamClass osc = (ObjectStreamClass)readObject();
+	      Class componentType = osc.forClass().getComponentType();
+	      if(dump) dumpElement("ARRAY LENGTH=");
+	      int length = this.realInputStream.readInt();
+	      if(dump) dumpElementln (length + "; COMPONENT TYPE=" + componentType);
+	      Object array = Array.newInstance(componentType, length);
+	      int handle = assignNewHandle(array);
+	      readArrayElements(array, componentType);
+	      if(dump)
+	        for (int i = 0, len = Array.getLength(array); i < len; i++)
+		  dumpElementln("  ELEMENT[" + i + "]=" + Array.get(array, i));
+	      ret_val = processResolution(null, array, handle);
+	      break;
+	    }
+
+	  case TC_OBJECT:
+	    {
+	      if(dump) dumpElementln("OBJECT");
+	      ObjectStreamClass osc = (ObjectStreamClass)readObject();
+	      Class clazz = osc.forClass();
+	      
+	      if (!osc.realClassIsSerializable)
+		throw new NotSerializableException
+		  (clazz + " is not Serializable, and thus cannot be deserialized.");
+	      
+	      if (osc.realClassIsExternalizable)
+		{
+		  Externalizable obj = osc.newInstance();
+		  
+		  int handle = assignNewHandle(obj);
+		  
+		  boolean read_from_blocks = ((osc.getFlags() & SC_BLOCK_DATA) != 0);
+		  
+		  boolean oldmode = this.readDataFromBlock;
+		  if (read_from_blocks)
+		    setBlockDataMode(true);
+		  
+		  obj.readExternal(this);
+		  
+		  if (read_from_blocks)
+                    {
+		      setBlockDataMode(oldmode);
+                      if (!oldmode)
+			if (this.realInputStream.readByte() != TC_ENDBLOCKDATA)
+			    throw new IOException("No end of block data seen for class with readExternal (ObjectInputStream) method.");
+                    }
+		  
+		  ret_val = processResolution(osc, obj, handle);
+		  break;
+		} // end if (osc.realClassIsExternalizable)
+
+	      Object obj = newObject(clazz, osc.firstNonSerializableParentConstructor);
+	      
+	      int handle = assignNewHandle(obj);
+	      Object prevObject = this.currentObject;
+	      ObjectStreamClass prevObjectStreamClass = this.currentObjectStreamClass;
+	      
+	      this.currentObject = obj;
+	      ObjectStreamClass[] hierarchy =
+		inputGetObjectStreamClasses(clazz);
+	      
+	      for (int i = 0; i < hierarchy.length; i++)
+		{
+		  this.currentObjectStreamClass = hierarchy[i];
+		  
+		  if(dump) dumpElementln("Reading fields of " + this.currentObjectStreamClass.getName ());
+
+		  // XXX: should initialize fields in classes in the hierarchy
+		  // that aren't in the stream
+		  // should skip over classes in the stream that aren't in the
+		  // real classes hierarchy
+		  
+		  Method readObjectMethod = this.currentObjectStreamClass.readObjectMethod;
+		  if (readObjectMethod != null)
+		    {
+		      fieldsAlreadyRead = false;
+		      boolean oldmode = setBlockDataMode(true);
+		      callReadMethod(readObjectMethod, this.currentObjectStreamClass.forClass(), obj);
+		      setBlockDataMode(oldmode);
+		    }
+		  else
+		    {
+		      readFields(obj, currentObjectStreamClass);
+		    }
+
+		  if (this.currentObjectStreamClass.hasWriteMethod())
+		    {
+		      if(dump) dumpElement("ENDBLOCKDATA? ");
+		      try
+			{
+			  // FIXME: XXX: This try block is to
+			  // catch EOF which is thrown for some
+			  // objects.  That indicates a bug in
+			  // the logic.
+
+			  if (this.realInputStream.readByte() != TC_ENDBLOCKDATA)
+			    throw new IOException
+			      ("No end of block data seen for class with readObject (ObjectInputStream) method.");
+			  if(dump) dumpElementln("yes");
+			}
+// 		      catch (EOFException e)
+// 			{
+// 			  if(dump) dumpElementln("no, got EOFException");
+// 			}
+		      catch (IOException e)
+			{
+			  if(dump) dumpElementln("no, got IOException");
+			}
+		    }
+		}
+
+	      this.currentObject = prevObject;
+	      this.currentObjectStreamClass = prevObjectStreamClass;
+	      ret_val = processResolution(osc, obj, handle);
+		  
+	      break;
+	    }
+
+	  case TC_RESET:
+	    if(dump) dumpElementln("RESET");
+	    clearHandles();
+	    ret_val = readObject();
+	    break;
+
+	  case TC_EXCEPTION:
+	    {
+	      if(dump) dumpElement("EXCEPTION=");
+	      Exception e = (Exception)readObject();
+	      if(dump) dumpElementln(e.toString());
+	      clearHandles();
+	      throw new WriteAbortedException("Exception thrown during writing of stream", e);
+	    }
+
+	  default:
+	    throw new IOException("Unknown marker on stream: " + marker);
+	  }
+      }
+    finally
+      {
+	setBlockDataMode(old_mode);
+	
+	this.isDeserializing = was_deserializing;
+	
+	depth -= 2;
+	
+	if (! was_deserializing)
+	  {
+	    if (validators.size() > 0)
+	      invokeValidators();
+	  }
+      }
+    
+    return ret_val;
+  }
+
+  /**
+   * This method makes a partial check of types for the fields
+   * contained given in arguments. It checks primitive types of
+   * fields1 against non primitive types of fields2. This method 
+   * assumes the two lists has already been sorted according to 
+   * the Java specification.
+   *
+   * @param name Name of the class owning the given fields.
+   * @param fields1 First list to check.
+   * @param fields2 Second list to check.
+   * @throws InvalidClassException if a field in fields1, which has a primitive type, is a present
+   * in the non primitive part in fields2.
+   */
+  private void checkTypeConsistency(String name, ObjectStreamField[] fields1, ObjectStreamField[] fields2)
+    throws InvalidClassException
+  {
+    int nonPrimitive = 0;
+    
+    for (nonPrimitive = 0; 
+	 nonPrimitive < fields1.length
+	   && fields1[nonPrimitive].isPrimitive(); nonPrimitive++)
+      {
+      }
+
+    if (nonPrimitive == fields1.length)
+      return;
+    
+    int i = 0;
+    ObjectStreamField f1;
+    ObjectStreamField f2;
+    
+    while (i < fields2.length
+	   && nonPrimitive < fields1.length)
+      {
+	f1 = fields1[nonPrimitive];
+	f2 = fields2[i];
+	
+	if (!f2.isPrimitive())
+	  break;
+
+	int compVal = f1.getName().compareTo (f2.getName());
+
+	if (compVal < 0)
+	  {
+	    nonPrimitive++;
+	  }
+	else if (compVal > 0)
+	  {
+	    i++;
+	  }
+	else
+	  {
+	    throw new InvalidClassException
+	      ("invalid field type for " + f2.getName() +
+	       " in class " + name);
+	  }
+      }
+  }
+
+  /**
+   * This method reads a class descriptor from the real input stream
+   * and use these data to create a new instance of ObjectStreamClass.
+   * Fields are sorted and ordered for the real read which occurs for
+   * each instance of the described class. Be aware that if you call that
+   * method you must ensure that the stream is synchronized, in the other
+   * case it may be completely desynchronized.
+   *
+   * @return A new instance of ObjectStreamClass containing the freshly
+   * created descriptor.
+   * @throws ClassNotFoundException if the required class to build the
+   * descriptor has not been found in the system.
+   * @throws IOException An input/output error occured.
+   * @throws InvalidClassException If there was a compatibility problem
+   * between the class present in the system and the serialized class.
+   */
+  protected ObjectStreamClass readClassDescriptor()
+    throws ClassNotFoundException, IOException
+  {
+    if(dump) dumpElement("CLASSDESC NAME=");
+    String name = this.realInputStream.readUTF();
+    if(dump) dumpElement(name + "; UID=");
+    long uid = this.realInputStream.readLong ();
+    if(dump) dumpElement(Long.toHexString(uid) + "; FLAGS=");
+    byte flags = this.realInputStream.readByte ();
+    if(dump) dumpElement(Integer.toHexString(flags) + "; FIELD COUNT=");
+    short field_count = this.realInputStream.readShort();
+    if(dump) dumpElementln(Short.toString(field_count));
+    ObjectStreamField[] fields = new ObjectStreamField[field_count];
+    ObjectStreamClass osc = new ObjectStreamClass(name, uid,
+						  flags, fields);
+    assignNewHandle(osc);
+
+    if (callersClassLoader == null)
+      callersClassLoader = currentLoader();
+	      
+    for (int i = 0; i < field_count; i++)
+      {
+	if(dump) dumpElement("  TYPE CODE=");
+	char type_code = (char)this.realInputStream.readByte();
+	if(dump) dumpElement(type_code + "; FIELD NAME=");
+	String field_name = this.realInputStream.readUTF();
+	if(dump) dumpElementln(field_name);
+	String class_name;
+		  
+	// If the type code is an array or an object we must
+	// decode a String here. In the other case we convert
+	// the type code and pass it to ObjectStreamField.
+	// Type codes are decoded by gnu.java.lang.reflect.TypeSignature.
+	if (type_code == 'L' || type_code == '[')
+	  class_name = (String)readObject();
+	else
+	  class_name = String.valueOf(type_code);
+		  
+	fields[i] =
+	  new ObjectStreamField(field_name, class_name, callersClassLoader);
+      }
+	      
+    /* Now that fields have been read we may resolve the class
+     * (and read annotation if needed). */
+    Class clazz;
+    try
+      {
+	clazz = resolveClass(osc);
+      }
+    catch (ClassNotFoundException cnfe)
+      {
+	// Maybe it was an primitive class?
+	if (name.equals("void"))
+	  clazz = Void.TYPE;
+	else if (name.equals("boolean"))
+	  clazz = Boolean.TYPE;
+	else if (name.equals("byte"))
+	  clazz = Byte.TYPE;
+	else if (name.equals("short"))
+	  clazz = Short.TYPE;
+	else if (name.equals("char"))
+	  clazz = Character.TYPE;
+	else if (name.equals("int"))
+	  clazz = Integer.TYPE;
+	else if (name.equals("long"))
+	  clazz = Long.TYPE;
+	else if (name.equals("float"))
+	  clazz = Float.TYPE;
+	else if (name.equals("double"))
+	  clazz = Double.TYPE;
+	else
+	  throw cnfe;
+      }
+
+    boolean oldmode = setBlockDataMode(true);
+    osc.setClass(clazz, lookupClass(clazz.getSuperclass()));
+    classLookupTable.put(clazz, osc);
+    setBlockDataMode(oldmode);
+
+    // find the first non-serializable, non-abstract
+    // class in clazz's inheritance hierarchy
+    Class first_nonserial = clazz.getSuperclass();
+    // Maybe it is a primitive class, those don't have a super class,
+    // or Object itself.  Otherwise we can keep getting the superclass
+    // till we hit the Object class, or some other non-serializable class.
+
+    if (first_nonserial == null)
+      first_nonserial = clazz;
+    else
+      while (Serializable.class.isAssignableFrom(first_nonserial)
+	     || Modifier.isAbstract(first_nonserial.getModifiers()))
+	first_nonserial = first_nonserial.getSuperclass();
+
+    final Class local_constructor_class = first_nonserial;
+
+    osc.firstNonSerializableParentConstructor =
+        (Constructor)AccessController.doPrivileged(new PrivilegedAction()
+          {
+            public Object run()
+            {
+              try
+                {
+                  Constructor c = local_constructor_class.
+                                    getDeclaredConstructor(new Class[0]);
+                  if (Modifier.isPrivate(c.getModifiers()))
+                    return null;
+                  return c;
+                }
+              catch (NoSuchMethodException e)
+                {
+                  // error will be reported later, in newObject()
+                  return null;
+                }
+            }
+          });
+
+    osc.realClassIsSerializable = Serializable.class.isAssignableFrom(clazz);
+    osc.realClassIsExternalizable = Externalizable.class.isAssignableFrom(clazz);
+
+    ObjectStreamField[] stream_fields = osc.fields;
+    ObjectStreamField[] real_fields = ObjectStreamClass.lookupForClassObject(clazz).fields;
+    ObjectStreamField[] fieldmapping = new ObjectStreamField[2 * Math.max(stream_fields.length, real_fields.length)];
+
+    int stream_idx = 0;
+    int real_idx = 0;
+    int map_idx = 0;
+
+    /*
+     * Check that there is no type inconsistencies between the lists.
+     * A special checking must be done for the two groups: primitive types and
+     * not primitive types. 
+     */
+    checkTypeConsistency(name, real_fields, stream_fields);
+    checkTypeConsistency(name, stream_fields, real_fields);
+
+    
+    while (stream_idx < stream_fields.length
+	   || real_idx < real_fields.length)
+      {
+	ObjectStreamField stream_field = null;
+	ObjectStreamField real_field = null;
+
+	if (stream_idx == stream_fields.length)
+	  {
+	    real_field = real_fields[real_idx++];
+	  }
+	else if (real_idx == real_fields.length)
+	  {
+	    stream_field = stream_fields[stream_idx++];
+	  }
+	else
+	  {
+	    int comp_val =
+	      real_fields[real_idx].compareTo (stream_fields[stream_idx]);
+
+	    if (comp_val < 0)
+	      {
+		real_field = real_fields[real_idx++];
+	      }
+	    else if (comp_val > 0)
+	      {
+		stream_field = stream_fields[stream_idx++];
+	      }
+	    else
+	      {
+		stream_field = stream_fields[stream_idx++];
+		real_field = real_fields[real_idx++];
+		if (stream_field.getType() != real_field.getType())
+		  throw new InvalidClassException
+		    ("invalid field type for " + real_field.getName() +
+		     " in class " + name);
+	      }
+	  }
+
+	/* If some of stream_fields does not correspond to any of real_fields,
+	 * or the opposite, then fieldmapping will go short.
+	 */
+	if (map_idx == fieldmapping.length)
+	  {
+	    ObjectStreamField[] newfieldmapping =
+	      new ObjectStreamField[fieldmapping.length + 2];
+	    System.arraycopy(fieldmapping, 0,
+			     newfieldmapping, 0, fieldmapping.length);
+	    fieldmapping = newfieldmapping;
+	  }
+	fieldmapping[map_idx++] = stream_field;
+	fieldmapping[map_idx++] = real_field;
+      }
+    osc.fieldMapping = fieldmapping;
+
+    return osc;
+  }
+
+  /**
+   * Reads the current objects non-transient, non-static fields from
+   * the current class from the underlying output stream.
+   *
+   * This method is intended to be called from within a object's
+   * <code>private void readObject (ObjectInputStream)</code>
+   * method.
+   *
+   * @exception ClassNotFoundException The class that an object being
+   * read in belongs to cannot be found.
+   *
+   * @exception NotActiveException This method was called from a
+   * context other than from the current object's and current class's
+   * <code>private void readObject (ObjectInputStream)</code>
+   * method.
+   *
+   * @exception IOException Exception from underlying
+   * <code>OutputStream</code>.
+   */
+  public void defaultReadObject()
+    throws ClassNotFoundException, IOException, NotActiveException
+  {
+    if (this.currentObject == null || this.currentObjectStreamClass == null)
+      throw new NotActiveException("defaultReadObject called by non-active"
+				   + " class and/or object");
+
+    if (fieldsAlreadyRead)
+      throw new NotActiveException("defaultReadObject called but fields "
+				   + "already read from stream (by "
+				   + "defaultReadObject or readFields)");
+
+    boolean oldmode = setBlockDataMode(false);
+    readFields(this.currentObject, this.currentObjectStreamClass);
+    setBlockDataMode(oldmode);
+
+    fieldsAlreadyRead = true;
+  }
+
+
+  /**
+   * Registers a <code>ObjectInputValidation</code> to be carried out
+   * on the object graph currently being deserialized before it is
+   * returned to the original caller of <code>readObject ()</code>.
+   * The order of validation for multiple
+   * <code>ObjectInputValidation</code>s can be controled using
+   * <code>priority</code>.  Validators with higher priorities are
+   * called first.
+   *
+   * @see java.io.ObjectInputValidation
+   *
+   * @exception InvalidObjectException <code>validator</code> is
+   * <code>null</code>
+   *
+   * @exception NotActiveException an attempt was made to add a
+   * validator outside of the <code>readObject</code> method of the
+   * object currently being deserialized
+   */
+  public void registerValidation(ObjectInputValidation validator,
+				 int priority)
+    throws InvalidObjectException, NotActiveException
+  {
+    if (this.currentObject == null || this.currentObjectStreamClass == null)
+      throw new NotActiveException("registerValidation called by non-active "
+				   + "class and/or object");
+
+    if (validator == null)
+      throw new InvalidObjectException("attempt to add a null "
+				       + "ObjectInputValidation object");
+
+    this.validators.addElement(new ValidatorAndPriority (validator,
+							 priority));
+  }
+
+
+  /**
+   * Called when a class is being deserialized.  This is a hook to
+   * allow subclasses to read in information written by the
+   * <code>annotateClass (Class)</code> method of an
+   * <code>ObjectOutputStream</code>.
+   *
+   * This implementation looks up the active call stack for a
+   * <code>ClassLoader</code>; if a <code>ClassLoader</code> is found,
+   * it is used to load the class associated with <code>osc</code>,
+   * otherwise, the default system <code>ClassLoader</code> is used.
+   *
+   * @exception IOException Exception from underlying
+   * <code>OutputStream</code>.
+   *
+   * @see java.io.ObjectOutputStream#annotateClass (java.lang.Class)
+   */
+  protected Class resolveClass(ObjectStreamClass osc)
+    throws ClassNotFoundException, IOException
+  {
+    if (callersClassLoader == null)
+      {
+	callersClassLoader = currentLoader ();
+	if (Configuration.DEBUG && dump)
+	  {
+	    dumpElementln ("CallersClassLoader = " + callersClassLoader);
+	  }
+      }
+
+    return Class.forName(osc.getName(), true, callersClassLoader);
+  }
+
+  /**
+   * Returns the most recent user defined ClassLoader on the execution stack
+   * or null if none is found.
+   */
+  // GCJ LOCAL: native method.
+  private native ClassLoader currentLoader();
+
+  /**
+   * Lookup a class stored in the local hashtable. If it is not
+   * use the global lookup function in ObjectStreamClass to build
+   * the ObjectStreamClass. This method is requested according to
+   * the behaviour detected in the JDK by Kaffe's team.
+   *
+   * @param clazz Class to lookup in the hash table or for which
+   * we must build a descriptor.
+   * @return A valid instance of ObjectStreamClass corresponding
+   * to the specified class.
+   */
+  private ObjectStreamClass lookupClass(Class clazz)
+  {
+    if (clazz == null)
+      return null;
+
+    ObjectStreamClass oclazz;
+    oclazz = (ObjectStreamClass)classLookupTable.get(clazz);
+    if (oclazz == null)
+      return ObjectStreamClass.lookup(clazz);
+    else
+      return oclazz;
+  }
+
+  /**
+   * Reconstruct class hierarchy the same way
+   * {@link java.io.ObjectStreamClass.getObjectStreamClasses(java.lang.Class)} does
+   * but using lookupClass instead of ObjectStreamClass.lookup. This
+   * dup is necessary localize the lookup table. Hopefully some future
+   * rewritings will be able to prevent this.
+   *
+   * @param clazz This is the class for which we want the hierarchy.
+   *
+   * @return An array of valid {@link java.io.ObjectStreamClass} instances which
+   * represent the class hierarchy for clazz.
+   */
+  private ObjectStreamClass[] inputGetObjectStreamClasses(Class clazz)
+  {
+    ObjectStreamClass osc = lookupClass(clazz);
+
+    if (osc == null)
+      return new ObjectStreamClass[0];
+    else
+      {
+        Vector oscs = new Vector();
+
+        while (osc != null)
+          {
+            oscs.addElement(osc);
+            osc = osc.getSuper();
+	  }
+
+        int count = oscs.size();
+	ObjectStreamClass[] sorted_oscs = new ObjectStreamClass[count];
+
+        for (int i = count - 1; i >= 0; i--)
+          sorted_oscs[count - i - 1] = (ObjectStreamClass) oscs.elementAt(i);
+
+        return sorted_oscs;
+      }
+  }
+
+  /**
+   * Allows subclasses to resolve objects that are read from the
+   * stream with other objects to be returned in their place.  This
+   * method is called the first time each object is encountered.
+   *
+   * This method must be enabled before it will be called in the
+   * serialization process.
+   *
+   * @exception IOException Exception from underlying
+   * <code>OutputStream</code>.
+   *
+   * @see #enableResolveObject(boolean)
+   */
+  protected Object resolveObject(Object obj) throws IOException
+  {
+    return obj;
+  }
+
+
+  protected Class resolveProxyClass(String[] intfs)
+    throws IOException, ClassNotFoundException
+  {
+    ClassLoader cl = currentLoader();
+    
+    Class[] clss = new Class[intfs.length];
+    if(cl == null)
+      {
+	for (int i = 0; i < intfs.length; i++)
+	  clss[i] = Class.forName(intfs[i]);
+	cl = ClassLoader.getSystemClassLoader();
+      }
+    else
+      for (int i = 0; i < intfs.length; i++)
+	clss[i] = cl.loadClass(intfs[i]);
+    try 
+      {
+	return Proxy.getProxyClass(cl, clss);
+      } 
+    catch (IllegalArgumentException e) 
+      {
+	throw new ClassNotFoundException(null, e);
+      }
+  }
+  
+  /**
+   * If <code>enable</code> is <code>true</code> and this object is
+   * trusted, then <code>resolveObject (Object)</code> will be called
+   * in subsequent calls to <code>readObject (Object)</code>.
+   * Otherwise, <code>resolveObject (Object)</code> will not be called.
+   *
+   * @exception SecurityException This class is not trusted.
+   */
+  protected boolean enableResolveObject (boolean enable)
+    throws SecurityException
+  {
+    if (enable)
+      {
+	SecurityManager sm = System.getSecurityManager();
+	if (sm != null)
+	  sm.checkPermission(new SerializablePermission("enableSubstitution"));
+      }
+
+    boolean old_val = this.resolveEnabled;
+    this.resolveEnabled = enable;
+    return old_val;
+  }
+
+  /**
+   * Reads stream magic and stream version information from the
+   * underlying stream.
+   *
+   * @exception IOException Exception from underlying stream.
+   *
+   * @exception StreamCorruptedException An invalid stream magic
+   * number or stream version was read from the stream.
+   */
+  protected void readStreamHeader()
+    throws IOException, StreamCorruptedException
+  {
+    if(dump) dumpElement("STREAM MAGIC ");
+    if (this.realInputStream.readShort() != STREAM_MAGIC)
+      throw new StreamCorruptedException("Invalid stream magic number");
+
+    if(dump) dumpElementln("STREAM VERSION ");
+    if (this.realInputStream.readShort() != STREAM_VERSION)
+      throw new StreamCorruptedException("Invalid stream version number");
+  }
+
+  public int read() throws IOException
+  {
+    if (this.readDataFromBlock)
+      {
+	if (this.blockDataPosition >= this.blockDataBytes)
+	  readNextBlock();
+	return (this.blockData[this.blockDataPosition++] & 0xff);
+      }
+    else
+      return this.realInputStream.read();
+  }
+
+  public int read(byte[] data, int offset, int length) throws IOException
+  {
+    if (this.readDataFromBlock)
+      {
+	if (this.blockDataPosition + length > this.blockDataBytes)
+	  {
+	    int remain = this.blockDataBytes - this.blockDataPosition;
+	    if (remain != 0)
+	      {
+		System.arraycopy(this.blockData, this.blockDataPosition,
+				 data, offset, remain);
+		offset += remain;
+		length -= remain;
+	      }
+	    readNextBlock ();
+	  }
+
+	System.arraycopy(this.blockData, this.blockDataPosition,
+			 data, offset, length);
+	this.blockDataPosition += length;
+
+	return length;
+      }
+    else
+      return this.realInputStream.read(data, offset, length);
+  }
+
+  public int available() throws IOException
+  {
+    if (this.readDataFromBlock)
+      {
+	if (this.blockDataPosition >= this.blockDataBytes)
+	  readNextBlock ();
+
+	return this.blockDataBytes - this.blockDataPosition;
+      }
+    else
+      return this.realInputStream.available();
+  }
+
+  public void close() throws IOException
+  {
+    this.realInputStream.close();
+  }
+
+  public boolean readBoolean() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode (true);
+    boolean value = this.dataInputStream.readBoolean ();
+    if (switchmode)
+      setBlockDataMode (oldmode);
+    return value;
+  }
+
+  public byte readByte() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    byte value = this.dataInputStream.readByte();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public int readUnsignedByte() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 1)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    int value = this.dataInputStream.readUnsignedByte();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public short readShort() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    short value = this.dataInputStream.readShort();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public int readUnsignedShort() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    int value = this.dataInputStream.readUnsignedShort();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public char readChar() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 2)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    char value = this.dataInputStream.readChar();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public int readInt() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 4)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    int value = this.dataInputStream.readInt();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public long readLong() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 8)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    long value = this.dataInputStream.readLong();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public float readFloat() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 4)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    float value = this.dataInputStream.readFloat();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public double readDouble() throws IOException
+  {
+    boolean switchmode = true;
+    boolean oldmode = this.readDataFromBlock;
+    if (!oldmode || this.blockDataBytes - this.blockDataPosition >= 8)
+      switchmode = false;
+    if (switchmode)
+      oldmode = setBlockDataMode(true);
+    double value = this.dataInputStream.readDouble();
+    if (switchmode)
+      setBlockDataMode(oldmode);
+    return value;
+  }
+
+  public void readFully(byte data[]) throws IOException
+  {
+    this.dataInputStream.readFully(data);
+  }
+
+  public void readFully(byte data[], int offset, int size)
+    throws IOException
+  {
+    this.dataInputStream.readFully(data, offset, size);
+  }
+
+  public int skipBytes(int len) throws IOException
+  {
+    return this.dataInputStream.skipBytes(len);
+  }
+
+  /**
+   * @deprecated
+   * @see java.io.DataInputStream#readLine ()
+   */
+  public String readLine() throws IOException
+  {
+    return this.dataInputStream.readLine();
+  }
+
+  public String readUTF() throws IOException
+  {
+    return this.dataInputStream.readUTF();
+  }
+
+  /**
+   * This class allows a class to specify exactly which fields should
+   * be read, and what values should be read for these fields.
+   *
+   * XXX: finish up comments
+   */
+  public abstract static class GetField
+  {
+    public abstract ObjectStreamClass getObjectStreamClass();
+
+    public abstract boolean defaulted(String name)
+      throws IOException, IllegalArgumentException;
+
+    public abstract boolean get(String name, boolean defvalue)
+      throws IOException, IllegalArgumentException;
+
+    public abstract char get(String name, char defvalue)
+      throws IOException, IllegalArgumentException;
+
+    public abstract byte get(String name, byte defvalue)
+      throws IOException, IllegalArgumentException;
+
+    public abstract short get(String name, short defvalue)
+      throws IOException, IllegalArgumentException;
+
+    public abstract int get(String name, int defvalue)
+      throws IOException, IllegalArgumentException;
+
+    public abstract long get(String name, long defvalue)
+      throws IOException, IllegalArgumentException;
+
+    public abstract float get(String name, float defvalue)
+      throws IOException, IllegalArgumentException;
+
+    public abstract double get(String name, double defvalue)
+      throws IOException, IllegalArgumentException;
+
+    public abstract Object get(String name, Object defvalue)
+      throws IOException, IllegalArgumentException;
+  }
+
+  /**
+   * This method should be called by a method called 'readObject' in the
+   * deserializing class (if present). It cannot (and should not)be called
+   * outside of it. Its goal is to read all fields in the real input stream
+   * and keep them accessible through the {@link #GetField} class. Calling
+   * this method will not alter the deserializing object.
+   *
+   * @return A valid freshly created 'GetField' instance to get access to
+   * the deserialized stream.
+   * @throws IOException An input/output exception occured. 
+   * @throws ClassNotFoundException 
+   * @throws NotActiveException
+   */
+  public GetField readFields()
+    throws IOException, ClassNotFoundException, NotActiveException
+  {
+    if (this.currentObject == null || this.currentObjectStreamClass == null)
+      throw new NotActiveException("readFields called by non-active class and/or object");
+
+    if (prereadFields != null)
+      return prereadFields;
+
+    if (fieldsAlreadyRead)
+      throw new NotActiveException("readFields called but fields already read from"
+				   + " stream (by defaultReadObject or readFields)");
+
+    final ObjectStreamClass clazz = this.currentObjectStreamClass;
+    final byte[] prim_field_data = new byte[clazz.primFieldSize];
+    final Object[] objs = new Object[clazz.objectFieldCount];
+
+    // Apparently Block data is not used with GetField as per
+    // empirical evidence against JDK 1.2.  Also see Mauve test
+    // java.io.ObjectInputOutput.Test.GetPutField.
+    boolean oldmode = setBlockDataMode(false);
+    readFully(prim_field_data);
+    for (int i = 0; i < objs.length; ++ i)
+      objs[i] = readObject();
+    setBlockDataMode(oldmode);
+
+    prereadFields = new GetField()
+      {
+	public ObjectStreamClass getObjectStreamClass()
+	{
+	  return clazz;
+	}
+
+	public boolean defaulted(String name)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField f = clazz.getField(name);
+	  
+	  /* First if we have a serialized field use the descriptor */
+	  if (f != null)
+	    {
+	      /* It is in serialPersistentFields but setClass tells us
+	       * it should not be set. This value is defaulted.
+	       */
+	      if (f.isPersistent() && !f.isToSet())
+		return true;
+	      
+	      return false;
+	    }
+
+	  /* This is not a serialized field. There should be
+	   * a default value only if the field really exists.
+	   */
+	  try
+	    {
+	      return (clazz.forClass().getDeclaredField (name) != null);
+	    }
+	  catch (NoSuchFieldException e)
+	    {
+	      throw new IllegalArgumentException(e.getMessage());
+	    }
+	}
+
+	public boolean get(String name, boolean defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field = getField(name, Boolean.TYPE);
+
+	  if (field == null)
+	    return defvalue;
+
+	  return prim_field_data[field.getOffset()] == 0 ? false : true;
+	}
+
+	public char get(String name, char defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field = getField(name, Character.TYPE);
+
+	  if (field == null)
+	    return defvalue;
+
+	  int off = field.getOffset();
+
+	  return (char)(((prim_field_data[off++] & 0xFF) << 8)
+			| (prim_field_data[off] & 0xFF));
+	}
+
+	public byte get(String name, byte defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field = getField(name, Byte.TYPE);
+
+	  if (field == null)
+	    return defvalue;
+
+	  return prim_field_data[field.getOffset()];
+	}
+
+	public short get(String name, short defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field = getField(name, Short.TYPE);
+
+	  if (field == null)
+	    return defvalue;
+
+	  int off = field.getOffset();
+
+	  return (short)(((prim_field_data[off++] & 0xFF) << 8)
+			 | (prim_field_data[off] & 0xFF));
+	}
+
+	public int get(String name, int defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field = getField(name, Integer.TYPE);
+
+	  if (field == null)
+	    return defvalue;
+
+	  int off = field.getOffset();
+
+	  return ((prim_field_data[off++] & 0xFF) << 24)
+	    | ((prim_field_data[off++] & 0xFF) << 16)
+	    | ((prim_field_data[off++] & 0xFF) << 8)
+	    | (prim_field_data[off] & 0xFF);
+	}
+
+	public long get(String name, long defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field = getField(name, Long.TYPE);
+
+	  if (field == null)
+	    return defvalue;
+
+	  int off = field.getOffset();
+
+	  return (long)(((prim_field_data[off++] & 0xFFL) << 56)
+			| ((prim_field_data[off++] & 0xFFL) << 48)
+			| ((prim_field_data[off++] & 0xFFL) << 40)
+			| ((prim_field_data[off++] & 0xFFL) << 32)
+			| ((prim_field_data[off++] & 0xFF) << 24)
+			| ((prim_field_data[off++] & 0xFF) << 16)
+			| ((prim_field_data[off++] & 0xFF) << 8)
+			| (prim_field_data[off] & 0xFF));
+	}
+
+	public float get(String name, float defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field = getField(name, Float.TYPE);
+
+	  if (field == null)
+	    return defvalue;
+
+	  int off = field.getOffset();
+
+	  return Float.intBitsToFloat(((prim_field_data[off++] & 0xFF) << 24)
+				      | ((prim_field_data[off++] & 0xFF) << 16)
+				      | ((prim_field_data[off++] & 0xFF) << 8)
+				      | (prim_field_data[off] & 0xFF));
+	}
+
+	public double get(String name, double defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field = getField(name, Double.TYPE);
+
+	  if (field == null)
+	    return defvalue;
+
+	  int off = field.getOffset();
+
+	  return Double.longBitsToDouble
+	    ( (long) (((prim_field_data[off++] & 0xFFL) << 56)
+		      | ((prim_field_data[off++] & 0xFFL) << 48)
+		      | ((prim_field_data[off++] & 0xFFL) << 40)
+		      | ((prim_field_data[off++] & 0xFFL) << 32)
+		      | ((prim_field_data[off++] & 0xFF) << 24)
+		      | ((prim_field_data[off++] & 0xFF) << 16)
+		      | ((prim_field_data[off++] & 0xFF) << 8)
+		      | (prim_field_data[off] & 0xFF)));
+	}
+
+	public Object get(String name, Object defvalue)
+	  throws IOException, IllegalArgumentException
+	{
+	  ObjectStreamField field =
+	    getField(name, defvalue == null ? null : defvalue.getClass ());
+
+	  if (field == null)
+	    return defvalue;
+
+	  return objs[field.getOffset()];
+	}
+
+	private ObjectStreamField getField(String name, Class type)
+	  throws IllegalArgumentException
+	{
+	  ObjectStreamField field = clazz.getField(name);
+	  boolean illegal = false;
+
+	  try
+	    {
+	      try
+		{
+		  Class field_type = field.getType();
+		  
+		  if (type == field_type ||
+		      (type == null && !field_type.isPrimitive()))
+		    {
+		      /* See defaulted */
+		      return field;
+		    }
+	 
+		  illegal = true;
+		  throw new IllegalArgumentException
+		    ("Field requested is of type "
+		     + field_type.getName()
+		     + ", but requested type was "
+		     + (type == null ?  "Object" : type.getName()));
+		}
+	      catch (NullPointerException _)
+		{
+		  /* Here we catch NullPointerException, because it may
+		     only come from the call 'field.getType()'. If field
+		     is null, we have to return null and classpath ethic
+		     say we must try to avoid 'if (xxx == null)'.
+		  */
+		}
+	      catch (IllegalArgumentException e)
+		{
+		  throw e;
+		}
+	      
+	      return null;
+	    }
+	  finally
+	    {
+	      /* If this is an unassigned field we should return
+	       * the default value.
+	       */
+	      if (!illegal && field != null && !field.isToSet() && field.isPersistent())
+		return null;
+
+	      /* We do not want to modify transient fields. They should
+	       * be left to 0.
+	       */
+	      try
+		{
+		  Field f = clazz.forClass().getDeclaredField(name);
+		  if (Modifier.isTransient(f.getModifiers()))
+		    throw new IllegalArgumentException
+		      ("no such field (non transient) " + name);
+		  if (field == null && f.getType() != type)
+		    throw new IllegalArgumentException
+		      ("Invalid requested type for field " + name);
+		}
+	      catch (NoSuchFieldException e)
+		{
+		  if (field == null)
+		    throw new IllegalArgumentException(e.getMessage());
+		}
+	       
+	    }
+	}
+      };
+
+    fieldsAlreadyRead = true;
+    return prereadFields;
+  }
+
+  /**
+   * Protected constructor that allows subclasses to override
+   * deserialization.  This constructor should be called by subclasses
+   * that wish to override <code>readObject (Object)</code>.  This
+   * method does a security check <i>NOTE: currently not
+   * implemented</i>, then sets a flag that informs
+   * <code>readObject (Object)</code> to call the subclasses
+   * <code>readObjectOverride (Object)</code> method.
+   *
+   * @see #readObjectOverride()
+   */
+  protected ObjectInputStream()
+    throws IOException, SecurityException
+  {
+    SecurityManager sec_man = System.getSecurityManager();
+    if (sec_man != null)
+      sec_man.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
+    this.useSubclassMethod = true;
+  }
+
+  /**
+   * This method allows subclasses to override the default
+   * de serialization mechanism provided by
+   * <code>ObjectInputStream</code>.  To make this method be used for
+   * writing objects, subclasses must invoke the 0-argument
+   * constructor on this class from their constructor.
+   *
+   * @see #ObjectInputStream()
+   */
+  protected Object readObjectOverride()
+    throws ClassNotFoundException, IOException, OptionalDataException
+  {
+    throw new IOException("Subclass of ObjectInputStream must implement readObjectOverride");
+  }
+
+  /**
+   * Assigns the next available handle to <code>obj</code>.
+   *
+   * @param obj The object for which we want a new handle.
+   * @return A valid handle for the specified object.
+   */
+  private int assignNewHandle(Object obj)
+  {
+    this.objectLookupTable.put(new Integer(this.nextOID),
+			       new ObjectIdentityWrapper(obj));
+    return this.nextOID++;
+  }
+
+  private Object processResolution(ObjectStreamClass osc, Object obj, int handle)
+    throws IOException
+  {
+    if (osc != null && obj instanceof Serializable)
+      {
+	try
+	  {
+	    Method m = osc.readResolveMethod; 
+	    if(m != null)
+	    {
+		obj = m.invoke(obj, new Object[] {});
+	    }
+	  }
+	catch (IllegalAccessException ignore)
+	  {
+	  }
+	catch (InvocationTargetException exception)
+	  {
+	    Throwable cause = exception.getCause();
+	    if (cause instanceof ObjectStreamException)
+	      throw (ObjectStreamException) cause;
+	    else if (cause instanceof RuntimeException)
+	      throw (RuntimeException) cause;
+	    else if (cause instanceof Error)
+	      throw (Error) cause;
+	  }
+      }
+
+    if (this.resolveEnabled)
+      obj = resolveObject(obj);
+
+    this.objectLookupTable.put(new Integer(handle),
+			       new ObjectIdentityWrapper(obj));
+
+    return obj;
+  }
+
+  private void clearHandles()
+  {
+    this.objectLookupTable.clear();
+    this.nextOID = baseWireHandle;
+  }
+
+  private void readNextBlock() throws IOException
+  {
+    readNextBlock(this.realInputStream.readByte());
+  }
+
+  private void readNextBlock(byte marker) throws IOException
+  {
+    if (marker == TC_BLOCKDATA)
+      {
+	if(dump) dumpElement("BLOCK DATA SIZE=");
+	this.blockDataBytes = this.realInputStream.readUnsignedByte();
+	if(dump) dumpElementln (Integer.toString(this.blockDataBytes));
+      }
+    else if (marker == TC_BLOCKDATALONG)
+      {
+	if(dump) dumpElement("BLOCK DATA LONG SIZE=");
+	this.blockDataBytes = this.realInputStream.readInt();
+	if(dump) dumpElementln (Integer.toString(this.blockDataBytes));
+      }
+    else
+      {
+	throw new EOFException("Attempt to read primitive data, but no data block is active.");
+      }
+
+    if (this.blockData.length < this.blockDataBytes)
+      this.blockData = new byte[this.blockDataBytes];
+
+    this.realInputStream.readFully (this.blockData, 0, this.blockDataBytes);
+    this.blockDataPosition = 0;
+  }
+
+  private void readArrayElements (Object array, Class clazz)
+    throws ClassNotFoundException, IOException
+  {
+    if (clazz.isPrimitive())
+      {
+	if (clazz == Boolean.TYPE)
+	  {
+	    boolean[] cast_array = (boolean[])array;
+	    for (int i=0; i < cast_array.length; i++)
+	      cast_array[i] = this.realInputStream.readBoolean();
+	    return;
+	  }
+	if (clazz == Byte.TYPE)
+	  {
+	    byte[] cast_array = (byte[])array;
+	    for (int i=0; i < cast_array.length; i++)
+	      cast_array[i] = this.realInputStream.readByte();
+	    return;
+	  }
+	if (clazz == Character.TYPE)
+	  {
+	    char[] cast_array = (char[])array;
+	    for (int i=0; i < cast_array.length; i++)
+	      cast_array[i] = this.realInputStream.readChar();
+	    return;
+	  }
+	if (clazz == Double.TYPE)
+	  {
+	    double[] cast_array = (double[])array;
+	    for (int i=0; i < cast_array.length; i++)
+	      cast_array[i] = this.realInputStream.readDouble();
+	    return;
+	  }
+	if (clazz == Float.TYPE)
+	  {
+	    float[] cast_array = (float[])array;
+	    for (int i=0; i < cast_array.length; i++)
+	      cast_array[i] = this.realInputStream.readFloat();
+	    return;
+	  }
+	if (clazz == Integer.TYPE)
+	  {
+	    int[] cast_array = (int[])array;
+	    for (int i=0; i < cast_array.length; i++)
+	      cast_array[i] = this.realInputStream.readInt();
+	    return;
+	  }
+	if (clazz == Long.TYPE)
+	  {
+	    long[] cast_array = (long[])array;
+	    for (int i=0; i < cast_array.length; i++)
+	      cast_array[i] = this.realInputStream.readLong();
+	    return;
+	  }
+	if (clazz == Short.TYPE)
+	  {
+	    short[] cast_array = (short[])array;
+	    for (int i=0; i < cast_array.length; i++)
+	      cast_array[i] = this.realInputStream.readShort();
+	    return;
+	  }
+      }
+    else
+      {
+	Object[] cast_array = (Object[])array;
+	for (int i=0; i < cast_array.length; i++)
+ 	  cast_array[i] = readObject();
+      }
+  }
+
+  private void readFields (Object obj, ObjectStreamClass stream_osc)
+    throws ClassNotFoundException, IOException
+  {
+    ObjectStreamField[] fields = stream_osc.fieldMapping;
+
+    for (int i = 0; i < fields.length; i += 2)
+      {
+	ObjectStreamField stream_field = fields[i];
+	ObjectStreamField real_field = fields[i + 1];
+	boolean read_value = (stream_field != null && stream_field.getOffset() >= 0 && stream_field.isToSet());
+	boolean set_value = (real_field != null && real_field.isToSet());
+	String field_name;
+	char type;
+
+	if (stream_field != null)
+	  {
+	    field_name = stream_field.getName();
+	    type = stream_field.getTypeCode();
+	  }
+	else
+	  {
+	    field_name = real_field.getName();
+	    type = real_field.getTypeCode();
+	  }
+	
+	switch(type)
+	  {
+	  case 'Z':
+	    {
+	      boolean value =
+		read_value ? this.realInputStream.readBoolean() : false;
+	      if (dump && read_value && set_value)
+		dumpElementln("  " + field_name + ": " + value);
+	      if (set_value)
+		real_field.setBooleanField(obj, value);
+	      break;
+	    }
+	  case 'B':
+	    {
+	      byte value =
+		read_value ? this.realInputStream.readByte() : 0;
+	      if (dump && read_value && set_value)
+		dumpElementln("  " + field_name + ": " + value);
+	      if (set_value)
+		real_field.setByteField(obj, value);
+	      break;
+	    }
+	  case 'C':
+	    {
+	      char value =
+		read_value ? this.realInputStream.readChar(): 0;
+	      if (dump && read_value && set_value)
+		dumpElementln("  " + field_name + ": " + value);
+	      if (set_value)
+		real_field.setCharField(obj, value);
+	      break;
+	    }
+	  case 'D':
+	    {
+	      double value =
+		read_value ? this.realInputStream.readDouble() : 0;
+	      if (dump && read_value && set_value)
+		dumpElementln("  " + field_name + ": " + value);
+	      if (set_value)
+		real_field.setDoubleField(obj, value);
+	      break;
+	    }
+	  case 'F':
+	    {
+	      float value =
+		read_value ? this.realInputStream.readFloat() : 0;
+	      if (dump && read_value && set_value)
+		dumpElementln("  " + field_name + ": " + value);
+	      if (set_value)
+		real_field.setFloatField(obj, value);
+	      break;
+	    }
+	  case 'I':
+	    {
+	      int value =
+		read_value ? this.realInputStream.readInt() : 0;
+	      if (dump && read_value && set_value)
+		dumpElementln("  " + field_name + ": " + value);
+	      if (set_value)
+		real_field.setIntField(obj, value);
+	      break;
+	    }
+	  case 'J':
+	    {
+	      long value =
+		read_value ? this.realInputStream.readLong() : 0;
+	      if (dump && read_value && set_value)
+		dumpElementln("  " + field_name + ": " + value);
+	      if (set_value)
+		real_field.setLongField(obj, value);
+	      break;
+	    }
+	  case 'S':
+	    {
+	      short value =
+		read_value ? this.realInputStream.readShort() : 0;
+	      if (dump && read_value && set_value)
+		dumpElementln("  " + field_name + ": " + value);
+	      if (set_value)
+		real_field.setShortField(obj, value);
+	      break;
+	    }
+	  case 'L':
+	  case '[':
+	    {
+	      Object value =
+		read_value ? readObject() : null;
+	      if (set_value)
+		real_field.setObjectField(obj, value);
+	      break;
+	    }
+	  default:
+	    throw new InternalError("Invalid type code: " + type);
+	  }
+      }
+  }
+  
+  // Toggles writing primitive data to block-data buffer.
+  private boolean setBlockDataMode (boolean on)
+  {
+    boolean oldmode = this.readDataFromBlock;
+    this.readDataFromBlock = on;
+
+    if (on)
+      this.dataInputStream = this.blockDataInput;
+    else
+      this.dataInputStream = this.realInputStream;
+    return oldmode;
+  }
+
+  // returns a new instance of REAL_CLASS that has been constructed
+  // only to the level of CONSTRUCTOR_CLASS (a super class of REAL_CLASS)
+  private Object newObject (Class real_class, Constructor constructor)
+    throws ClassNotFoundException, IOException
+  {
+    if (constructor == null)
+        throw new InvalidClassException("Missing accessible no-arg base class constructor for " + real_class.getName()); 
+    try
+      {
+	return allocateObject(real_class, constructor.getDeclaringClass(), constructor);
+      }
+    catch (InstantiationException e)
+      {
+        throw new ClassNotFoundException
+		("Instance of " + real_class + " could not be created");
+      }
+  }
+
+  // runs all registered ObjectInputValidations in prioritized order
+  // on OBJ
+  private void invokeValidators() throws InvalidObjectException
+  {
+    Object[] validators = new Object[this.validators.size()];
+    this.validators.copyInto (validators);
+    Arrays.sort (validators);
+
+    try
+      {
+	for (int i=0; i < validators.length; i++)
+	  ((ObjectInputValidation)validators[i]).validateObject();
+      }
+    finally
+      {
+	this.validators.removeAllElements();
+      }
+  }
+
+  private void callReadMethod (Method readObject, Class klass, Object obj)
+    throws ClassNotFoundException, IOException
+  {
+    try
+      {
+	readObject.invoke(obj, new Object[] { this });
+      }
+    catch (InvocationTargetException x)
+      {
+        /* Rethrow if possible. */
+	Throwable exception = x.getTargetException();
+	if (exception instanceof RuntimeException)
+	  throw (RuntimeException) exception;
+	if (exception instanceof IOException)
+	  throw (IOException) exception;
+        if (exception instanceof ClassNotFoundException)
+          throw (ClassNotFoundException) exception;
+
+	throw new IOException("Exception thrown from readObject() on " +
+			       klass + ": " + exception.getClass().getName());
+      }
+    catch (Exception x)
+      {
+	throw new IOException("Failure invoking readObject() on " +
+			       klass + ": " + x.getClass().getName());
+      }
+
+    // Invalidate fields which has been read through readFields.
+    prereadFields = null;
+  }
+    
+  private native Object allocateObject(Class clazz, Class constr_clazz, Constructor constructor)
+    throws InstantiationException;
+
+  private static final int BUFFER_SIZE = 1024;
+
+  private DataInputStream realInputStream;
+  private DataInputStream dataInputStream;
+  private DataInputStream blockDataInput;
+  private int blockDataPosition;
+  private int blockDataBytes;
+  private byte[] blockData;
+  private boolean useSubclassMethod;
+  private int nextOID;
+  private boolean resolveEnabled;
+  private Hashtable objectLookupTable;
+  private Object currentObject;
+  private ObjectStreamClass currentObjectStreamClass;
+  private boolean readDataFromBlock;
+  private boolean isDeserializing;
+  private boolean fieldsAlreadyRead;
+  private Vector validators;
+  private Hashtable classLookupTable;
+  private GetField prereadFields;
+
+  private ClassLoader callersClassLoader;
+  private static boolean dump;
+
+  // The nesting depth for debugging output
+  private int depth = 0;
+
+  private void dumpElement (String msg)
+  {
+    System.out.print(msg);
+  }
+  
+  private void dumpElementln (String msg)
+  {
+    System.out.println(msg);
+    for (int i = 0; i < depth; i++)
+      System.out.print (" ");
+    System.out.print (Thread.currentThread() + ": ");
+  }
+
+  static
+  {
+    if (Configuration.INIT_LOAD_LIBRARY)
+      {
+	System.loadLibrary ("javaio");
+      }
+  }
+
+  // used to keep a prioritized list of object validators
+  private static final class ValidatorAndPriority implements Comparable
+  {
+    int priority;
+    ObjectInputValidation validator;
+
+    ValidatorAndPriority (ObjectInputValidation validator, int priority)
+    {
+      this.priority = priority;
+      this.validator = validator;
+    }
+
+    public int compareTo (Object o)
+    {
+      ValidatorAndPriority vap = (ValidatorAndPriority)o;
+      return this.priority - vap.priority;
+    }
+  }
+}
+

Added: llvm-gcc-4.2/trunk/libjava/java/io/OutputStreamWriter.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/OutputStreamWriter.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/OutputStreamWriter.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/OutputStreamWriter.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,347 @@
+/* OutputStreamWriter.java -- Writer that converts chars to bytes
+   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005, 2006  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+import gnu.gcj.convert.UnicodeToBytes;
+import gnu.gcj.convert.CharsetToBytesAdaptor;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetEncoder;
+
+/**
+ * This class writes characters to an output stream that is byte oriented
+ * It converts the chars that are written to bytes using an encoding layer,
+ * which is specific to a particular encoding standard.  The desired
+ * encoding can either be specified by name, or if no encoding is specified,
+ * the system default encoding will be used.  The system default encoding
+ * name is determined from the system property <code>file.encoding</code>.
+ * The only encodings that are guaranteed to be available are "8859_1"
+ * (the Latin-1 character set) and "UTF8".  Unfortunately, Java does not
+ * provide a mechanism for listing the encodings that are supported in
+ * a given implementation.
+ * <p>
+ * Here is a list of standard encoding names that may be available:
+ * <p>
+ * <ul>
+ * <li>8859_1 (ISO-8859-1/Latin-1)
+ * <li>8859_2 (ISO-8859-2/Latin-2)
+ * <li>8859_3 (ISO-8859-3/Latin-3)
+ * <li>8859_4 (ISO-8859-4/Latin-4)
+ * <li>8859_5 (ISO-8859-5/Latin-5)
+ * <li>8859_6 (ISO-8859-6/Latin-6)
+ * <li>8859_7 (ISO-8859-7/Latin-7)
+ * <li>8859_8 (ISO-8859-8/Latin-8)
+ * <li>8859_9 (ISO-8859-9/Latin-9)
+ * <li>ASCII (7-bit ASCII)
+ * <li>UTF8 (UCS Transformation Format-8)
+ * <li>More Later
+ * </ul>
+ *
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ * @author Per Bothner (bothner at cygnus.com)
+ * @date April 17, 1998.  
+ */
+public class OutputStreamWriter extends Writer
+{
+  BufferedOutputStream out;
+
+  /**
+   * This is the byte-character encoder class that does the writing and
+   * translation of characters to bytes before writing to the underlying
+   * class.
+   */
+  UnicodeToBytes converter;
+
+  /* Temporary buffer. */
+  private char[] work;
+  private int wcount;
+
+  private OutputStreamWriter(OutputStream out, UnicodeToBytes encoder)
+  {
+    this.out = out instanceof BufferedOutputStream 
+	       ? (BufferedOutputStream) out
+	       : new BufferedOutputStream(out, 250);
+    /* Don't need to call super(out) here as long as the lock gets set. */
+    this.lock = out;
+    this.converter = encoder;
+  }
+
+  /**
+   * This method initializes a new instance of <code>OutputStreamWriter</code>
+   * to write to the specified stream using a caller supplied character
+   * encoding scheme.  Note that due to a deficiency in the Java language
+   * design, there is no way to determine which encodings are supported.
+   *
+   * @param out The <code>OutputStream</code> to write to
+   * @param encoding_scheme The name of the encoding scheme to use for 
+   * character to byte translation
+   *
+   * @exception UnsupportedEncodingException If the named encoding is 
+   * not available.
+   */
+  public OutputStreamWriter (OutputStream out, String encoding_scheme) 
+    throws UnsupportedEncodingException
+  {
+    this(out, UnicodeToBytes.getEncoder(encoding_scheme));
+  }
+
+  /**
+   * This method initializes a new instance of <code>OutputStreamWriter</code>
+   * to write to the specified stream using the default encoding.
+   *
+   * @param out The <code>OutputStream</code> to write to
+   */
+  public OutputStreamWriter (OutputStream out)
+  {
+    this(out, UnicodeToBytes.getDefaultEncoder());
+  }
+
+  /**
+   * This method initializes a new instance of <code>OutputStreamWriter</code>
+   * to write to the specified stream using a given <code>Charset</code>.
+   *
+   * @param out The <code>OutputStream</code> to write to
+   * @param cs The <code>Charset</code> of the encoding to use
+   */
+  public OutputStreamWriter(OutputStream out, Charset cs)
+  {
+    this(out, new CharsetToBytesAdaptor(cs));
+  }
+
+  /**
+   * This method initializes a new instance of <code>OutputStreamWriter</code>
+   * to write to the specified stream using a given
+   * <code>CharsetEncoder</code>.
+   *
+   * @param out The <code>OutputStream</code> to write to
+   * @param enc The <code>CharsetEncoder</code> to encode the output with
+   */
+  public OutputStreamWriter(OutputStream out, CharsetEncoder enc)
+  {
+    this(out, new CharsetToBytesAdaptor(enc));
+  }
+
+  /**
+   * This method closes this stream, and the underlying 
+   * <code>OutputStream</code>
+   *
+   * @exception IOException If an error occurs
+   */
+  public void close () throws IOException
+  {
+    synchronized (lock)
+      {
+	if (out != null)
+	  {
+	    converter.setFinished();
+	    flush();
+	    out.close();
+	    out = null;
+	  }
+	work = null;
+      }
+  }
+
+  /**
+   * This method returns the name of the character encoding scheme currently
+   * in use by this stream.  If the stream has been closed, then this method
+   * may return <code>null</code>.
+   *
+   * @return The encoding scheme name
+   */
+  public String getEncoding ()
+  {
+    return out != null ? converter.getName() : null;
+  }
+
+  /**
+   * This method flushes any buffered bytes to the underlying output sink.
+   *
+   * @exception IOException If an error occurs
+   */
+  public void flush () throws IOException
+  {
+    synchronized (lock)
+      {
+	if (out == null)
+	  throw new IOException("Stream closed");
+
+	// Always write -- if we are close()ing then we want to make
+	// sure the converter is flushed.
+	if (work == null)
+	  work = new char[100];
+	writeChars(work, 0, wcount);
+	wcount = 0;
+
+	out.flush();
+      }
+  }
+
+  /**
+   * This method writes <code>count</code> characters from the specified
+   * array to the output stream starting at position <code>offset</code>
+   * into the array.
+   *
+   * @param buf The array of character to write from
+   * @param offset The offset into the array to start writing chars from
+   * @param count The number of chars to write.
+   *
+   * @exception IOException If an error occurs
+   */
+  public void write (char[] buf, int offset, int count) throws IOException
+  {
+    synchronized (lock)
+      {
+	if (out == null)
+	  throw new IOException("Stream closed");
+
+	if (wcount > 0)
+	  {
+	    writeChars(work, 0, wcount);
+	    wcount = 0;
+	  }
+	writeChars(buf, offset, count);
+      }
+  }
+
+  /*
+   * Writes characters through to the inferior BufferedOutputStream.
+   * Ignores wcount and the work buffer.
+   */
+  private void writeChars(char[] buf, int offset, int count)
+    throws IOException
+  {
+    do
+      {
+	// We must flush if out.count == out.buf.length.
+	// It is probably a good idea to flush if out.buf is almost full.
+	// This test is an approximation for "almost full".
+	if (out.count + count >= out.buf.length)
+	  {
+	    out.flush();
+	    if (out.count != 0)
+	      throw new IOException("unable to flush output byte buffer");
+	  }
+	converter.setOutput(out.buf, out.count);
+	int converted = converter.write(buf, offset, count);
+	// Must set this before we flush the output stream, because
+	// flushing will reset 'out.count'.
+	out.count = converter.count;
+	// Flush if we cannot make progress.
+	if (converted == 0 && out.count == converter.count)
+	  {
+	    out.flush();
+	    if (out.count != 0)
+	      throw new IOException("unable to flush output byte buffer");
+	  }
+	offset += converted;
+	count -= converted;
+      }
+    while (count > 0 || converter.havePendingBytes());
+  }
+
+  /**
+   * This method writes <code>count</code> bytes from the specified 
+   * <code>String</code> starting at position <code>offset</code> into the
+   * <code>String</code>.
+   *
+   * @param str The <code>String</code> to write chars from
+   * @param offset The position in the <code>String</code> to start 
+   * writing chars from
+   * @param count The number of chars to write
+   *
+   * @exception IOException If an error occurs
+   */
+  public void write (String str, int offset, int count) throws IOException
+  {
+    synchronized (lock)
+      {
+	if (out == null)
+	  throw new IOException("Stream closed");
+
+	if (work == null)
+	  work = new char[100];
+	int wlength = work.length;
+	while (count > 0)
+	  {
+	    int size = count;
+	    if (wcount + size > wlength)
+	      {
+		if (2*wcount > wlength)
+		  {
+		    writeChars(work, 0, wcount);
+		    wcount = 0;
+		  }
+		if (wcount + size > wlength)
+		  size = wlength - wcount;
+	      }
+	    str.getChars(offset, offset+size, work, wcount);
+	    offset += size;
+	    count -= size;
+	    wcount += size;
+	  }
+      }
+  }
+
+  /**
+   * This method writes a single character to the output stream.
+   *
+   * @param ch The char to write, passed as an int.
+   *
+   * @exception IOException If an error occurs
+   */
+  public void write (int ch) throws IOException
+  {
+    synchronized (lock)
+      {
+	if (out == null)
+	  throw new IOException("Stream closed");
+
+	if (work == null)
+	  work = new char[100];
+	if (wcount >= work.length)
+	  {
+	    writeChars(work, 0, wcount);
+	    wcount = 0;
+	  }
+	work[wcount++] = (char) ch;
+      }
+  }
+
+} // class OutputStreamWriter
+

Added: llvm-gcc-4.2/trunk/libjava/java/io/PrintStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/PrintStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/PrintStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/PrintStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,566 @@
+/* PrintStream.java -- OutputStream for printing output
+   Copyright (C) 1998, 1999, 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+import gnu.gcj.convert.UnicodeToBytes;
+
+/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
+ * "The Java Language Specification", ISBN 0-201-63451-1
+ * Status:  Believed complete and correct to 1.3
+ */
+
+/**
+ * This class prints Java primitive values and object to a stream as
+ * text.  None of the methods in this class throw an exception.  However,
+ * errors can be detected by calling the <code>checkError()</code> method.
+ * Additionally, this stream can be designated as "autoflush" when 
+ * created so that any writes are automatically flushed to the underlying
+ * output sink when the current line is terminated.
+ * <p>
+ * This class converts char's into byte's using the system default encoding.
+ *
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ * @author Tom Tromey (tromey at cygnus.com)
+ */
+public class PrintStream extends FilterOutputStream
+{
+  /* Notice the implementation is quite similar to OutputStreamWriter.
+   * This leads to some minor duplication, because neither inherits
+   * from the other, and we want to maximize performance. */
+
+  // Line separator string.
+  private static final char[] line_separator
+    = System.getProperty("line.separator").toCharArray();
+  
+  UnicodeToBytes converter;
+
+  // Work buffer of characters for converter.
+  char[] work = new char[100];
+  // Work buffer of bytes where we temporarily keep converter output.
+  byte[] work_bytes = new byte[100];
+
+  /**
+   * This boolean indicates whether or not an error has ever occurred
+   * on this stream.
+   */
+  private boolean error_occurred = false;
+
+  /**
+   * This is <code>true</code> if auto-flush is enabled, 
+   * <code>false</code> otherwise
+   */
+  private boolean auto_flush;
+
+  /**
+   * This method intializes a new <code>PrintStream</code> object to write
+   * to the specified output sink.
+   *
+   * @param out The <code>OutputStream</code> to write to.
+   */
+  public PrintStream (OutputStream out)
+  {
+    this (out, false);
+  }
+
+  /**
+   * This method intializes a new <code>PrintStream</code> object to write
+   * to the specified output sink.  This constructor also allows "auto-flush"
+   * functionality to be specified where the stream will be flushed after
+   * every <code>print</code> or <code>println</code> call, when the 
+   * <code>write</code> methods with array arguments are called, or when a 
+   * single new-line character is written.
+   * <p>
+   *
+   * @param out The <code>OutputStream</code> to write to.
+   * @param auto_flush <code>true</code> to flush the stream after every 
+   * line, <code>false</code> otherwise
+   */
+  public PrintStream (OutputStream out, boolean auto_flush)
+  {
+    super (out);
+
+    converter = UnicodeToBytes.getDefaultEncoder();
+    this.auto_flush = auto_flush;
+  }
+
+  /**
+   * This method intializes a new <code>PrintStream</code> object to write
+   * to the specified output sink.  This constructor also allows "auto-flush"
+   * functionality to be specified where the stream will be flushed after
+   * every <code>print</code> or <code>println</code> call, when the 
+   * <code>write</code> methods with array arguments are called, or when a 
+   * single new-line character is written.
+   * <p>
+   *
+   * @param out The <code>OutputStream</code> to write to.
+   * @param auto_flush <code>true</code> to flush the stream after every 
+   * line, <code>false</code> otherwise
+   * @param encoding The name of the character encoding to use for this
+   * object.
+   */
+  public PrintStream (OutputStream out, boolean auto_flush, String encoding)
+    throws UnsupportedEncodingException
+  {
+    super (out);
+
+    converter = UnicodeToBytes.getEncoder (encoding);
+    this.auto_flush = auto_flush;
+  }
+
+  /**
+   * This method checks to see if an error has occurred on this stream.  Note
+   * that once an error has occurred, this method will continue to report
+   * <code>true</code> forever for this stream.  Before checking for an
+   * error condition, this method flushes the stream.
+   *
+   * @return <code>true</code> if an error has occurred, 
+   * <code>false</code> otherwise
+   */
+  public boolean checkError ()
+  {
+    flush ();
+    return error_occurred;
+  }
+
+  /**
+   * This method can be called by subclasses to indicate that an error
+   * has occurred and should be reported by <code>checkError</code>.
+   */
+  protected void setError ()
+  {
+    error_occurred = true;
+  }
+
+  /**
+   * This method closes this stream and all underlying streams.
+   */
+  public void close ()
+  {
+    try
+      {
+	converter.setFinished();
+	writeChars(new char[0], 0, 0);
+	flush();
+	out.close();
+      }
+    catch (InterruptedIOException iioe)
+      {
+	Thread.currentThread().interrupt();
+      }
+    catch (IOException e)
+      {
+	setError ();
+      }
+  }
+
+  /**
+   * This method flushes any buffered bytes to the underlying stream and
+   * then flushes that stream as well.
+   */
+  public void flush ()
+  {
+    try
+      {
+	out.flush();
+      }
+    catch (InterruptedIOException iioe)
+      {
+	Thread.currentThread().interrupt();
+      }
+    catch (IOException e)
+      {
+	setError ();
+      }
+  }
+
+  private synchronized void print (String str, boolean println)
+  {
+    try
+      {
+        writeChars(str, 0, str.length());
+	if (println)
+	  writeChars(line_separator, 0, line_separator.length);
+	if (auto_flush)
+	  flush();
+      }
+    catch (InterruptedIOException iioe)
+      {
+	Thread.currentThread().interrupt();
+      }
+    catch (IOException e)
+      {
+	setError ();
+      }
+  }
+
+  private synchronized void print (char[] chars, int pos, int len,
+				   boolean println)
+  {
+    try
+      {
+        writeChars(chars, pos, len);
+	if (println)
+	  writeChars(line_separator, 0, line_separator.length);
+	if (auto_flush)
+	  flush();
+      }
+    catch (InterruptedIOException iioe)
+      {
+	Thread.currentThread().interrupt();
+      }
+    catch (IOException e)
+      {
+	setError ();
+      }
+  }
+
+  private void writeChars(char[] buf, int offset, int count)
+    throws IOException
+  {
+    do
+      {
+	converter.setOutput(work_bytes, 0);
+	int converted = converter.write(buf, offset, count);
+	offset += converted;
+	count -= converted;
+	out.write(work_bytes, 0, converter.count);
+      }
+    while (count > 0 || converter.havePendingBytes());
+  }
+
+  private void writeChars(String str, int offset, int count)
+    throws IOException
+  {
+    do
+      {
+	converter.setOutput(work_bytes, 0);
+	int converted = converter.write(str, offset, count, work);
+	offset += converted;
+	count -= converted;
+	out.write(work_bytes, 0, converter.count);
+      }
+    while (count > 0 || converter.havePendingBytes());
+  }
+
+  /**
+   * This methods prints a boolean value to the stream.  <code>true</code>
+   * values are printed as "true" and <code>false</code> values are printed
+   * as "false".
+   *
+   * @param bool The <code>boolean</code> value to print
+   */
+  public void print (boolean bool)
+  {
+    print(String.valueOf(bool), false);
+  }
+
+  /**
+   * This method prints an integer to the stream.  The value printed is
+   * determined using the <code>String.valueOf()</code> method.
+   *
+   * @param inum The <code>int</code> value to be printed
+   */
+  public void print (int inum)
+  {
+    print(String.valueOf(inum), false);
+  }
+
+  /**
+   * This method prints a long to the stream.  The value printed is
+   * determined using the <code>String.valueOf()</code> method.
+   *
+   * @param lnum The <code>long</code> value to be printed
+   */
+  public void print (long lnum)
+  {
+    print(String.valueOf(lnum), false);
+  }
+
+  /**
+   * This method prints a float to the stream.  The value printed is
+   * determined using the <code>String.valueOf()</code> method.
+   *
+   * @param fnum The <code>float</code> value to be printed
+   */
+  public void print (float fnum)
+  {
+    print(String.valueOf(fnum), false);
+  }
+
+  /**
+   * This method prints a double to the stream.  The value printed is
+   * determined using the <code>String.valueOf()</code> method.
+   *
+   * @param dnum The <code>double</code> value to be printed
+   */
+  public void print (double dnum)
+  {
+    print(String.valueOf(dnum), false);
+  }
+
+  /**
+   * This method prints an <code>Object</code> to the stream.  The actual
+   * value printed is determined by calling the <code>String.valueOf()</code>
+   * method.
+   *
+   * @param obj The <code>Object</code> to print.
+   */
+  public void print (Object obj)
+  {
+    print(obj == null ? "null" : obj.toString(), false);
+  }
+
+  /**
+   * This method prints a <code>String</code> to the stream.  The actual
+   * value printed depends on the system default encoding.
+   *
+   * @param str The <code>String</code> to print.
+   */
+  public void print (String str)
+  {
+    print(str == null ? "null" : str, false);
+  }
+
+  /**
+   * This method prints a char to the stream.  The actual value printed is
+   * determined by the character encoding in use.
+   *
+   * @param ch The <code>char</code> value to be printed
+   */
+  public synchronized void print (char ch)
+  {
+    work[0] = ch;
+    print(work, 0, 1, false);
+  }
+
+  /**
+   * This method prints an array of characters to the stream.  The actual
+   * value printed depends on the system default encoding.
+   *
+   * @param charArray The array of characters to print.
+   */
+  public void print (char[] charArray)
+  {
+    print(charArray, 0, charArray.length, false);
+  }
+
+  /**
+   * This method prints a line separator sequence to the stream.  The value
+   * printed is determined by the system property <xmp>line.separator</xmp>
+   * and is not necessarily the Unix '\n' newline character.
+   */
+  public void println ()
+  {
+    print(line_separator, 0, line_separator.length, false);
+  }
+
+  /**
+   * This methods prints a boolean value to the stream.  <code>true</code>
+   * values are printed as "true" and <code>false</code> values are printed
+   * as "false".
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param bool The <code>boolean</code> value to print
+   */
+  public void println (boolean bool)
+  {
+    print(String.valueOf(bool), true);
+  }
+
+  /**
+   * This method prints an integer to the stream.  The value printed is
+   * determined using the <code>String.valueOf()</code> method.
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param inum The <code>int</code> value to be printed
+   */
+  public void println (int inum)
+  {
+    print(String.valueOf(inum), true);
+  }
+
+  /**
+   * This method prints a long to the stream.  The value printed is
+   * determined using the <code>String.valueOf()</code> method.
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param lnum The <code>long</code> value to be printed
+   */
+  public void println (long lnum)
+  {
+    print(String.valueOf(lnum), true);
+  }
+
+  /**
+   * This method prints a float to the stream.  The value printed is
+   * determined using the <code>String.valueOf()</code> method.
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param fnum The <code>float</code> value to be printed
+   */
+  public void println (float fnum)
+  {
+    print(String.valueOf(fnum), true);
+  }
+
+  /**
+   * This method prints a double to the stream.  The value printed is
+   * determined using the <code>String.valueOf()</code> method.
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param dnum The <code>double</code> value to be printed
+   */
+  public void println (double dnum)
+  {
+    print(String.valueOf(dnum), true);
+  }
+
+  /**
+   * This method prints an <code>Object</code> to the stream.  The actual
+   * value printed is determined by calling the <code>String.valueOf()</code>
+   * method.
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param obj The <code>Object</code> to print.
+   */
+  public void println (Object obj)
+  {
+    print(obj == null ? "null" : obj.toString(), true);
+  }
+
+  /**
+   * This method prints a <code>String</code> to the stream.  The actual
+   * value printed depends on the system default encoding.
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param str The <code>String</code> to print.
+   */
+  public void println (String str)
+  {
+    print (str == null ? "null" : str, true);
+  }
+
+  /**
+   * This method prints a char to the stream.  The actual value printed is
+   * determined by the character encoding in use.
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param ch The <code>char</code> value to be printed
+   */
+  public synchronized void println (char ch)
+  {
+    work[0] = ch;
+    print(work, 0, 1, true);
+  }
+
+  /**
+   * This method prints an array of characters to the stream.  The actual
+   * value printed depends on the system default encoding.
+   * <p>
+   * This method prints a line termination sequence after printing the value.
+   *
+   * @param charArray The array of characters to print.
+   */
+  public void println (char[] charArray)
+  {
+    print(charArray, 0, charArray.length, true);
+  }
+
+  /**
+   * This method writes a byte of data to the stream.  If auto-flush is
+   * enabled, printing a newline character will cause the stream to be
+   * flushed after the character is written.
+   * 
+   * @param oneByte The byte to be written
+   */
+  public void write (int oneByte)
+  {
+    try
+      {
+        out.write (oneByte & 0xff);
+        
+        if (auto_flush && (oneByte == '\n'))
+          flush ();
+      }
+    catch (InterruptedIOException iioe)
+      {
+	Thread.currentThread ().interrupt ();
+      }
+    catch (IOException e)
+      {
+        setError ();
+      }
+  }
+
+  /**
+   * This method writes <code>len</code> bytes from the specified array
+   * starting at index <code>offset</code> into the array.
+   *
+   * @param buffer The array of bytes to write
+   * @param offset The index into the array to start writing from
+   * @param len The number of bytes to write
+   */
+  public void write (byte[] buffer, int offset, int len)
+  {
+    try
+      {
+        out.write (buffer, offset, len);
+        
+        if (auto_flush)
+          flush ();
+      }
+    catch (InterruptedIOException iioe)
+      {
+	Thread.currentThread ().interrupt ();
+      }
+    catch (IOException e)
+      {
+        setError ();
+      }
+  }
+} // class PrintStream
+

Added: llvm-gcc-4.2/trunk/libjava/java/io/VMObjectStreamClass.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/VMObjectStreamClass.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/VMObjectStreamClass.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/VMObjectStreamClass.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,140 @@
+/* VMObjectStreamClass.java -- VM helper functions for ObjectStreamClass
+   Copyright (C) 2003  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+import java.lang.reflect.Field;
+
+final class VMObjectStreamClass
+{
+  /**
+    * Returns true if CLAZZ has a static class initializer
+    * (a.k.a. <clinit>).
+    */
+  static native boolean hasClassInitializer (Class clazz);
+
+  /**
+   * Sets the value of the specified "double" field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setDoubleNative(Field field, Object obj, double val);
+
+  /**
+   * Sets the value of the specified "float" field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setFloatNative(Field field, Object obj, float val);
+
+  /**
+   * Sets the value of the specified "long" field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setLongNative(Field field, Object obj, long val);
+  
+  /**
+   * Sets the value of the specified "int" field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setIntNative(Field field, Object obj, int val);
+  
+  /**
+   * Sets the value of the specified "short" field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setShortNative(Field field, Object obj, short val);
+
+  /**
+   * Sets the value of the specified "char" field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setCharNative(Field field, Object obj, char val);
+
+  /**
+   * Sets the value of the specified "byte" field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setByteNative(Field field, Object obj, byte val);
+
+  /**
+   * Sets the value of the specified "boolean" field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setBooleanNative(Field field, Object obj, boolean val);
+
+  /**
+   * Sets the value of the specified object field, allowing final values 
+   * to be assigned.
+   *
+   * @param field Field to set the value.
+   * @param obj Instance which will have its field set.
+   * @param val Value to put in the field.
+   */
+  static native void setObjectNative(Field field, Object obj, Object val);
+}

Added: llvm-gcc-4.2/trunk/libjava/java/io/natFilePosix.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/natFilePosix.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/natFilePosix.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/natFilePosix.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,458 @@
+// natFile.cc - Native part of File class for POSIX.
+
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006
+   Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+#include <string.h>
+#include <utime.h>
+
+#include <gcj/cni.h>
+#include <jvm.h>
+#include <java/io/File.h>
+#include <java/io/IOException.h>
+#include <java/util/ArrayList.h>
+#include <java/lang/String.h>
+#include <java/io/FilenameFilter.h>
+#include <java/io/FileFilter.h>
+#include <java/lang/System.h>
+
+jboolean
+java::io::File::_access (jint query)
+{
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+  JvAssert (query == READ || query == WRITE || query == EXISTS);
+#ifdef HAVE_ACCESS
+  int mode;
+  if (query == READ)
+    mode = R_OK;
+  else if (query == WRITE)
+    mode = W_OK;
+  else
+    mode = F_OK;
+  return ::access (buf, mode) == 0;
+#else
+  return false;
+#endif
+}
+
+jboolean
+java::io::File::_stat (jint query)
+{
+  if (query == ISHIDDEN)
+    return getName()->charAt(0) == '.';
+
+#ifdef HAVE_STAT
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+
+  struct stat sb;
+  if (::stat (buf, &sb))
+    return false;
+  
+  JvAssert (query == DIRECTORY || query == ISFILE);
+  jboolean r = S_ISDIR (sb.st_mode);
+  return query == DIRECTORY ? r : ! r;
+#else
+  return false;
+#endif
+}
+
+jlong
+java::io::File::attr (jint query)
+{
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+
+#ifdef HAVE_STAT
+  struct stat sb;
+  // FIXME: not sure about return value here.
+  if (::stat (buf, &sb))
+    return 0;
+
+  JvAssert (query == MODIFIED || query == LENGTH);
+  return query == MODIFIED ? (jlong)sb.st_mtime * 1000 : sb.st_size;
+#else
+  // There's no good choice here.
+  return 23;
+#endif
+}
+
+// These two methods are used to maintain dynamically allocated
+// buffers for getCanonicalPath without the overhead of calling
+// realloc every time a buffer is modified.  Buffers are sized
+// at the smallest multiple of CHUNKSIZ that is greater than or
+// equal to the desired length.  The default CHUNKSIZ is 256,
+// longer than most paths, so in most cases a getCanonicalPath
+// will require only one malloc per buffer.
+
+#define CHUNKLOG 8
+#define CHUNKSIZ (1 << CHUNKLOG)
+
+static int
+nextChunkSize (int size)
+{
+  return ((size >> CHUNKLOG) + ((size & (CHUNKSIZ - 1)) ? 1 : 0)) << CHUNKLOG;
+}
+
+static char *
+maybeGrowBuf (char *buf, int *size, int required)
+{
+  if (required > *size)
+    {
+      *size = nextChunkSize (required);
+      buf = (char *) _Jv_Realloc (buf, *size);
+    }
+  return buf;
+}
+
+// Return a canonical representation of the pathname of this file.  On
+// the GNU system this involves the removal of redundant separators,
+// references to "." and "..", and symbolic links.
+//
+// The conversion proceeds on a component-by-component basis: symbolic
+// links and references to ".."  are resolved as and when they occur.
+// This means that if "/foo/bar" is a symbolic link to "/baz" then the
+// canonical form of "/foo/bar/.." is "/" and not "/foo".
+//
+// In order to mimic the behaviour of proprietary JVMs, non-existant
+// path components are allowed (a departure from the normal GNU system
+// convention).  This means that if "/foo/bar" is a symbolic link to
+// "/baz", the canonical form of "/non-existant-directory/../foo/bar"
+// is "/baz".
+
+jstring
+java::io::File::getCanonicalPath (void)
+{
+  jstring path = getAbsolutePath ();
+
+  int len = JvGetStringUTFLength (path);
+  int srcl = nextChunkSize (len + 1);
+  char *src = (char *) _Jv_Malloc (srcl);
+  JvGetStringUTFRegion (path, 0, path->length(), src);
+  src[len] = '\0';
+  int srci = 1;
+
+  int dstl = nextChunkSize (2);  
+  char *dst = (char *) _Jv_Malloc (dstl);
+  dst[0] = '/';
+  int dsti = 1;
+
+  bool fschecks = true;
+
+  while (src[srci] != '\0')
+    {
+      // Skip slashes.
+      while (src[srci] == '/')
+	srci++;
+      int tmpi = srci;
+      // Find next slash.
+      while (src[srci] != '/' && src[srci] != '\0')
+	srci++;
+      if (srci == tmpi)
+	// We hit the end.
+	break;
+      len = srci - tmpi;
+
+      // Handle "." and "..".
+      if (len == 1 && src[tmpi] == '.')
+	continue;
+      if (len == 2 && src[tmpi] == '.' && src[tmpi + 1] == '.')
+	{
+	  while (dsti > 1 && dst[dsti - 1] != '/')
+	    dsti--;
+	  if (dsti != 1)
+	    dsti--;
+	  // Reenable filesystem checking if disabled, as we might
+	  // have reversed over whatever caused the problem before.
+	  // At least one proprietary JVM has inconsistencies because
+	  // it does not do this.
+	  fschecks = true;
+	  continue;
+	}
+
+      // Handle real path components.
+      dst = maybeGrowBuf (dst, &dstl, dsti + (dsti > 1 ? 1 : 0) + len + 1);
+      int dsti_save = dsti;
+      if (dsti > 1)
+	dst[dsti++] = '/';
+      strncpy (&dst[dsti], &src[tmpi], len);
+      dsti += len;
+      if (fschecks == false)
+	continue;
+
+#if defined (HAVE_LSTAT) && defined (HAVE_READLINK)
+      struct stat sb;
+      dst[dsti] = '\0';
+      if (::lstat (dst, &sb) == 0)
+	{
+	  if (S_ISLNK (sb.st_mode))
+	    {
+	      int tmpl = CHUNKSIZ;
+	      char *tmp = (char *) _Jv_Malloc (tmpl);
+
+	      while (1)
+		{
+		  tmpi = ::readlink (dst, tmp, tmpl);
+		  if (tmpi < 1)
+		    {
+		      _Jv_Free (src);
+		      _Jv_Free (dst);
+		      _Jv_Free (tmp);
+		      throw new IOException (
+			JvNewStringLatin1 ("readlink failed"));
+		    }
+		  if (tmpi < tmpl)
+		    break;
+		  tmpl += CHUNKSIZ;
+		  tmp = (char *) _Jv_Realloc (tmp, tmpl);
+		}
+
+	      // Prepend the link's path to src.
+	      tmp = maybeGrowBuf (tmp, &tmpl, tmpi + strlen (&src[srci]) + 1);
+	      strcpy(&tmp[tmpi], &src[srci]);
+	      _Jv_Free (src);
+	      src = tmp;
+	      srcl = tmpl;
+	      srci = 0;
+
+	      // Either replace or append dst depending on whether the
+	      // link is relative or absolute.
+	      dsti = src[0] == '/' ? 1 : dsti_save;
+	    }
+	}
+      else
+	{
+	  // Something doesn't exist, or we don't have permission to
+	  // read it, or a previous path component is a directory, or
+	  // a symlink is looped.  Whatever, we can't check the
+	  // filesystem any more.
+	  fschecks = false;
+	}
+#endif // HAVE_LSTAT && HAVE_READLINK
+    }
+  dst[dsti] = '\0';
+
+  // FIXME: what encoding to assume for file names?  This affects many
+  // calls.
+  path = JvNewStringUTF (dst);
+  _Jv_Free (src);
+  _Jv_Free (dst);
+  return path;
+}
+
+jboolean
+java::io::File::isAbsolute (void)
+{
+  return path->length() > 0 && path->charAt(0) == '/';
+}
+
+jobjectArray
+java::io::File::performList (java::io::FilenameFilter *filter, 
+			     java::io::FileFilter *fileFilter, 
+			     java::lang::Class *result_type)
+{
+  /* Some systems have dirent.h, but no directory reading functions like
+     opendir.  */
+#if defined(HAVE_DIRENT_H) && defined(HAVE_OPENDIR)
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+
+  DIR *dir = opendir (buf);
+  if (! dir)
+    return NULL;
+
+  java::util::ArrayList *list = new java::util::ArrayList ();
+  struct dirent *d;
+#if defined(HAVE_READDIR_R) && defined(_POSIX_PTHREAD_SEMANTICS)
+  int name_max = pathconf (buf, _PC_NAME_MAX);
+  char dbuf[sizeof (struct dirent) + name_max + 1];
+  while (readdir_r (dir, (struct dirent *) dbuf, &d) == 0 && d != NULL)
+#else /* HAVE_READDIR_R */
+  while ((d = readdir (dir)) != NULL)
+#endif /* HAVE_READDIR_R */
+    {
+      // Omit "." and "..".
+      if (d->d_name[0] == '.'
+	  && (d->d_name[1] == '\0'
+	      || (d->d_name[1] == '.' && d->d_name[2] == '\0')))
+	continue;
+
+      jstring name = JvNewStringUTF (d->d_name);
+      if (filter && ! filter->accept(this, name))
+	continue;
+
+      if (result_type == &java::io::File::class$)
+        {
+	  java::io::File *file = new java::io::File (this, name);
+	  if (fileFilter && ! fileFilter->accept(file))
+	    continue;
+
+	  list->add(file);
+	}
+      else
+	list->add(name);
+    }
+
+  closedir (dir);
+
+  jobjectArray ret = JvNewObjectArray (list->size(), result_type, NULL);
+  list->toArray(ret);
+  return ret;
+#else /* HAVE_DIRENT_H && HAVE_OPENDIR */
+  return NULL;
+#endif /* HAVE_DIRENT_H && HAVE_OPENDIR */
+}
+
+jboolean
+java::io::File::performMkdir (void)
+{
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+
+#ifdef HAVE_MKDIR
+  return ::mkdir (buf, 0755) == 0;
+#else
+  return false;
+#endif
+}
+
+jboolean
+java::io::File::performSetReadOnly (void)
+{
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+
+#if defined (HAVE_STAT) && defined (HAVE_CHMOD)
+  struct stat sb;
+  if (::stat (buf, &sb))
+    return false;
+
+  if (::chmod(buf, sb.st_mode & 0555))
+    return false;  
+  return true;
+#else
+  return false;
+#endif
+}
+
+JArray< ::java::io::File *>*
+java::io::File::performListRoots ()
+{
+  ::java::io::File *f = new ::java::io::File (JvNewStringLatin1 ("/"));
+  JArray<java::io::File *> *unixroot
+    = reinterpret_cast <JArray<java::io::File *>*> 
+          (JvNewObjectArray (1, &java::io::File::class$, f));
+  elements (unixroot) [0] = f;
+  return unixroot;
+}
+
+jboolean
+java::io::File::performRenameTo (File *dest)
+{
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+  char *buf2
+    = (char *) __builtin_alloca (JvGetStringUTFLength (dest->path) + 1);
+  total = JvGetStringUTFRegion (dest->path, 0, dest->path->length(), buf2);
+  buf2[total] = '\0';
+
+#ifdef HAVE_RENAME
+  return ::rename (buf, buf2) == 0;
+#else
+  return false;
+#endif
+}
+
+jboolean
+java::io::File::performSetLastModified (jlong time)
+{
+#ifdef HAVE_UTIME
+  utimbuf tb;
+
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+  
+  tb.actime = time / 1000;
+  tb.modtime = time / 1000;
+  return (::utime (buf, &tb) == 0);
+#else
+  return false;
+#endif
+}
+
+jboolean
+java::io::File::performCreate (void)
+{
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+
+  int fd = ::open (buf, O_CREAT | O_EXCL, 0644);
+
+  if (fd < 0)
+    {
+      if (errno == EEXIST)
+        return false;
+      throw new IOException (JvNewStringLatin1 (strerror (errno)));
+    }
+  else
+    {
+      ::close (fd);
+      return true;
+    }
+}
+
+jboolean
+java::io::File::performDelete (void)
+{
+  char *buf = (char *) __builtin_alloca (JvGetStringUTFLength (path) + 1);
+  jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
+  buf[total] = '\0';
+
+#ifdef HAVE_UNLINK
+#ifdef HAVE_RMDIR
+  if (! ::rmdir (buf))
+    return true;
+  if (errno == ENOTDIR)
+#endif // HAVE_RMDIR
+    return ::unlink (buf) == 0;
+#endif // HAVE_UNLINK
+  return false;
+}
+
+void
+java::io::File::init_native ()
+{
+  maxPathLen = MAXPATHLEN;
+  caseSensitive = true;
+}

Added: llvm-gcc-4.2/trunk/libjava/java/io/natFileWin32.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/natFileWin32.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/natFileWin32.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/natFileWin32.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,351 @@
+// natFileWin32.cc - Native part of File class for Win32.
+
+/* Copyright (C) 1998, 1999, 2002, 2003  Free Software Foundation, Inc.
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#include <config.h>
+#include <platform.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#undef STRICT
+
+#include <java/io/File.h>
+#include <java/io/IOException.h>
+#include <java/util/Vector.h>
+#include <java/lang/String.h>
+#include <java/io/FilenameFilter.h>
+#include <java/io/FileFilter.h>
+#include <java/lang/System.h>
+
+// Java timestamps are milliseconds since the UNIX epoch (00:00:00 UTC on 
+// January 1, 1970) while Win32 file-times are 100-nanosecond intervals
+// since the Win32 epoch (00:00:00 UTC on January 1, 1601). The following
+// constant represents the number of milliseconds to be added to a
+// Java timestamp to base it on the Win32 epoch.
+// 
+// There were 369 years between 1601 and 1970, including 89 leap years
+// (since 1700, 1800 and 1900 were not leap years):
+//
+// (89*366 + 280*365) days * 86400 seconds/day = 11644473600 seconds
+//
+#define WIN32_EPOCH_MILLIS 11644473600000LL
+
+jboolean
+java::io::File::_access (jint query)
+{
+  JV_TEMP_STRING_WIN32 (canon, getCanonicalPath());
+  if (!canon)
+    return false;
+
+  JvAssert (query == READ || query == WRITE || query == EXISTS);
+
+  // FIXME: Is it possible to differentiate between existing and reading?
+  // If the file exists but cannot be read because of the secuirty attributes
+  // on an NTFS disk this wont work (it reports it can be read but cant)
+  // Could we use something from the security API?
+  DWORD attributes = GetFileAttributes (canon);
+  if ((query == EXISTS) || (query == READ))
+    return (attributes == 0xffffffff) ? false : true;
+  else
+    return ((attributes != 0xffffffff) &&
+      ((attributes & FILE_ATTRIBUTE_READONLY) == 0)) ? true : false;
+}
+
+jboolean
+java::io::File::_stat (jint query)
+{
+  JV_TEMP_STRING_WIN32 (canon, getCanonicalPath());
+  if (!canon)
+    return false;
+
+  JvAssert (query == DIRECTORY || query == ISFILE);
+
+  DWORD attributes = GetFileAttributes (canon);
+  if (attributes == 0xffffffff)
+    return false;
+
+  if (query == DIRECTORY)
+    return attributes & FILE_ATTRIBUTE_DIRECTORY ? true : false;
+  else
+    return attributes & FILE_ATTRIBUTE_DIRECTORY ? false : true;
+}
+
+jlong
+java::io::File::attr (jint query)
+{
+  JV_TEMP_STRING_WIN32 (canon, getCanonicalPath());
+  if (!canon)
+    return false;
+
+  JvAssert (query == MODIFIED || query == LENGTH);
+
+  WIN32_FIND_DATA info;
+  HANDLE sHandle;
+  if ( ( sHandle = FindFirstFile( canon, &info)) == INVALID_HANDLE_VALUE)
+    return 0;
+  
+  FindClose( sHandle);
+  
+  if (query == LENGTH)
+    return ((long long)info.nFileSizeHigh) << 32 
+           | (unsigned long long)info.nFileSizeLow;
+  else 
+    {
+      // The file time as returned by Windows is in terms of the number
+      // of 100-nanosecond intervals since 00:00:00 UTC, January 1, 1601.
+      return (((((long long)info.ftLastWriteTime.dwHighDateTime) << 32) 
+               | ((unsigned long long)info.ftLastWriteTime.dwLowDateTime)) 
+              - WIN32_EPOCH_MILLIS*10000LL) / 10000LL;
+    }
+}
+
+jstring
+java::io::File::getCanonicalPath (void)
+{
+  JV_TEMP_STRING_WIN32 (cpath, path);
+  
+  // If the filename is blank, use the current directory.
+  LPCTSTR thepath = cpath.buf();
+  if (*thepath == 0)
+    thepath = _T(".");
+
+  LPTSTR unused;
+  TCHAR buf2[MAX_PATH];
+  if(!GetFullPathName(thepath, MAX_PATH, buf2, &unused))
+    throw new IOException (JvNewStringLatin1 ("GetFullPathName failed"));
+
+  return _Jv_Win32NewString (buf2);
+}
+
+jboolean
+java::io::File::isAbsolute (void)
+{
+  // See if the path represents a Windows UNC network path.
+  if (path->length () > 2
+      && (path->charAt (0) == '\\') && (path->charAt (1) == '\\'))
+    return true;
+
+  // Note that the path is not an absolute path even if it starts with
+  // a '/' or a '\' because it lacks a drive specifier.
+
+  if (path->length() < 3)
+    return false;
+  // Hard-code A-Za-z because Windows (I think) can't use non-ASCII
+  // letters as drive names.
+  if ((path->charAt(0) < 'a' || path->charAt(0) > 'z')
+      && (path->charAt(0) < 'A' || path->charAt(0) > 'Z'))
+    return false;
+  return (path->charAt(1) == ':'
+    && (path->charAt(2) == '/' || path->charAt(2) == '\\'));
+}
+
+void java::io::File::init_native () 
+{
+  maxPathLen = MAX_PATH;
+  caseSensitive = false;
+}
+
+jobjectArray
+java::io::File::performList (java::io::FilenameFilter *filter, 
+           java::io::FileFilter *fileFilter, 
+           java::lang::Class *clazz)
+{
+  jstring canon = getCanonicalPath();
+  if (! canon)
+    return NULL;
+
+  int len = canon->length();
+  TCHAR buf[len + 5];
+  
+  JV_TEMP_STRING_WIN32(canonstr, canon);
+  
+  _tcscpy(buf, canonstr);
+  if (buf[len - 1] == _T('\\'))
+    _tcscpy (&buf[len], _T("*.*"));
+  else
+    _tcscpy (&buf[len], _T("\\*.*"));
+
+  WIN32_FIND_DATA data;
+  HANDLE handle = FindFirstFile (buf, &data);
+  if (handle == INVALID_HANDLE_VALUE)
+    return NULL;
+
+  java::util::Vector *vec = new java::util::Vector ();
+
+  do
+    {
+      if (_tcscmp (data.cFileName, _T(".")) &&
+        _tcscmp (data.cFileName, _T("..")))
+        {
+          jstring name = _Jv_Win32NewString (data.cFileName);
+
+          if (filter && !filter->accept(this, name))
+            continue;
+          if (clazz == &java::io::File::class$)
+            {
+              java::io::File *file = new java::io::File (this, name);
+              if (fileFilter && !fileFilter->accept(file))
+                continue;
+              vec->addElement (file);
+            }
+          else
+            vec->addElement (name);
+        }
+    }
+  while (FindNextFile (handle, &data));
+
+  if (GetLastError () != ERROR_NO_MORE_FILES)
+    return NULL;
+
+  FindClose (handle);
+
+  jobjectArray ret = JvNewObjectArray (vec->size(), clazz, NULL);
+  vec->copyInto (ret);
+  return ret;
+}
+
+jboolean
+java::io::File::performMkdir (void)
+{
+  JV_TEMP_STRING_WIN32 (cpath, path);
+  return (CreateDirectory(cpath, NULL)) ? true : false;
+}
+
+jboolean
+java::io::File::performRenameTo (File *dest)
+{
+  JV_TEMP_STRING_WIN32 (pathFrom, path);
+  JV_TEMP_STRING_WIN32 (pathTo, dest->path);
+  return (MoveFile(pathFrom, pathTo)) ? true : false;
+}
+
+jboolean
+java::io::File::performDelete ()
+{
+  JV_TEMP_STRING_WIN32 (canon, getCanonicalPath());
+  if (!canon)
+    return false;
+
+  DWORD attributes = GetFileAttributes (canon);
+  if (attributes == 0xffffffff)
+    return false;
+
+  if (attributes & FILE_ATTRIBUTE_DIRECTORY)
+    return (RemoveDirectory (canon)) ? true : false;
+  else
+    return (DeleteFile (canon)) ? true : false;
+}
+
+jboolean java::io::File::performCreate (void) 
+{
+  JV_TEMP_STRING_WIN32 (canon, getCanonicalPath());
+  if (!canon)
+    return false;
+
+  HANDLE h = CreateFile (canon, 0, 0, NULL, CREATE_NEW, 
+                         FILE_ATTRIBUTE_NORMAL, NULL);
+  if (h != INVALID_HANDLE_VALUE)
+    {
+      CloseHandle (h);
+      return true;
+    }
+  else
+    {
+      if (GetLastError () == ERROR_ALREADY_EXISTS)
+        return false;
+      else
+        throw new IOException (JvNewStringLatin1 ("CreateFile failed"));
+    }
+}
+
+jboolean java::io::File::performSetReadOnly ()
+{
+  JV_TEMP_STRING_WIN32 (canon, getCanonicalPath());
+  if (!canon)
+    return false;
+
+  DWORD attrs = GetFileAttributes (canon);
+  if (attrs != INVALID_FILE_ATTRIBUTES)
+    {
+      if (SetFileAttributes (canon, attrs | FILE_ATTRIBUTE_READONLY) != 0)
+        return true;
+      else
+        return false;
+    }
+  else
+    return false;
+}
+
+jboolean java::io::File::performSetLastModified (jlong time)
+{
+  JV_TEMP_STRING_WIN32 (canon, getCanonicalPath());
+  if (!canon)
+    return false;
+
+  FILETIME modTime;
+  long long mTime100ns = ((long long) time        /* Ha! */
+                          + WIN32_EPOCH_MILLIS) * 10000LL;
+  
+  modTime.dwLowDateTime = (DWORD) mTime100ns;
+  modTime.dwHighDateTime = (DWORD) (mTime100ns >> 32);
+
+  jboolean retVal = false;
+  HANDLE h = CreateFile (canon, FILE_WRITE_ATTRIBUTES, 
+                         FILE_SHARE_READ | FILE_SHARE_WRITE, 
+                         NULL, OPEN_EXISTING, 0, NULL);
+
+  if (h != INVALID_HANDLE_VALUE)
+    {
+      if (SetFileTime (h, NULL, &modTime, &modTime) != 0)
+        retVal = true;
+
+      CloseHandle (h);
+    }
+
+  return retVal;
+}
+
+JArray<java::io::File*>* java::io::File::performListRoots ()
+{
+  DWORD drivesBitmap = GetLogicalDrives ();
+  DWORD mask;
+
+  // Possible drive letters are from ASCII 'A'-'Z'.
+  int numDrives = 0;
+  mask = 1;
+  for (int i = 0; i < 26; i++)
+    {
+      if ((drivesBitmap & mask) != 0)
+        numDrives++;
+      mask <<= 1;
+    }
+
+  JArray<java::io::File *> *roots
+    = reinterpret_cast <JArray<java::io::File *>*> 
+        (JvNewObjectArray (numDrives, &java::io::File::class$, NULL));
+
+  ::java::io::File **rootsArray = elements (roots);
+
+  char aDriveRoot[] = {'A', ':', '\\', '\0'};
+  mask = 1;
+  for (int i = 0, j = 0; i < 26; i++)
+    {
+      if ((drivesBitmap & mask) != 0)
+        {
+          rootsArray[j] 
+            = new ::java::io::File (JvNewStringLatin1 (aDriveRoot));
+          j++;
+        }
+      mask <<= 1;
+      aDriveRoot[0]++;
+    }
+
+  return roots;
+}

Added: llvm-gcc-4.2/trunk/libjava/java/io/natObjectInputStream.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/natObjectInputStream.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/natObjectInputStream.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/natObjectInputStream.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,80 @@
+// natObjectInputStream.cc - Native part of ObjectInputStream class.
+
+/* Copyright (C) 1998, 1999, 2000, 2001, 2005  Free Software Foundation
+
+   This ObjectInputStream is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the ObjectInputStream "LIBGCJ_LICENSE" for
+details.  */
+
+#include <config.h>
+
+#include <gcj/cni.h>
+#include <jvm.h>
+#include <gcj/method.h>
+
+#include <java/io/ObjectInputStream$GetField.h>
+#include <java/io/ObjectInputStream.h>
+#include <java/io/IOException.h>
+#include <java/lang/Class.h>
+#include <java/lang/reflect/Modifier.h>
+#include <java/lang/reflect/Method.h>
+#include <java/lang/ArrayIndexOutOfBoundsException.h>
+#include <java/lang/SecurityManager.h>
+#include <java/lang/reflect/Constructor.h>
+#include <java/lang/reflect/Method.h>
+#include <java-stack.h>
+
+#ifdef DEBUG
+#include <java/lang/System.h>
+#include <java/io/PrintStream.h>
+#endif
+
+jobject
+java::io::ObjectInputStream::allocateObject (jclass klass, jclass,
+  ::java::lang::reflect::Constructor *ctr)
+{
+  jobject obj = NULL;
+  using namespace java::lang::reflect;
+
+  try
+    {
+      JvAssert (klass && ! klass->isArray ());
+      if (klass->isInterface() || Modifier::isAbstract(klass->getModifiers()))
+	obj = NULL;	
+      else
+	{
+	  obj = _Jv_AllocObject (klass);
+	}	
+    }
+  catch (jthrowable t)
+    {
+      return NULL;
+    }
+
+  jmethodID meth = _Jv_FromReflectedConstructor (ctr);
+
+  // This is a bit inefficient, and a bit of a hack, since we don't
+  // actually use the Method and since what is returned isn't
+  // technically a Method.  We can't use Method.invoke as it looks up
+  // the declared method.
+  JArray<jclass> *arg_types
+    = (JArray<jclass> *) JvNewObjectArray (0, &java::lang::Class::class$,
+					   NULL);
+
+  // We lie about this being a constructor.  If we put `true' here
+  // then _Jv_CallAnyMethodA would try to allocate the object for us.
+  _Jv_CallAnyMethodA (obj, JvPrimClass (void), meth, false, arg_types, NULL);
+
+  return obj;
+}
+
+java::lang::ClassLoader *
+java::io::ObjectInputStream::currentLoader ()
+{
+  jclass caller = _Jv_StackTrace::GetCallingClass (&ObjectInputStream::class$);
+  if (caller)
+    return caller->getClassLoaderInternal();
+  return NULL;
+}

Added: llvm-gcc-4.2/trunk/libjava/java/io/natVMObjectStreamClass.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/io/natVMObjectStreamClass.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/io/natVMObjectStreamClass.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/java/io/natVMObjectStreamClass.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,87 @@
+// natVMObjectStreamClass.cc - Native part of VMObjectStreamClass class.
+
+/* Copyright (C) 2003  Free Software Foundation
+
+   This VMObjectStreamClass is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the ObjectInputStream "LIBGCJ_LICENSE" for
+details.  */
+
+#include <gcj/cni.h>
+#include <jvm.h>
+
+#include <java/io/VMObjectStreamClass.h>
+#include <java/lang/Class.h>
+#include <java/lang/reflect/Field.h>
+
+using namespace java::lang::reflect;
+
+jboolean
+java::io::VMObjectStreamClass::hasClassInitializer (jclass klass)
+{
+  if (klass->isPrimitive())
+    return false;
+  _Jv_Method *meth = _Jv_GetMethodLocal(klass, gcj::clinit_name,
+					       gcj::void_signature);
+  return (meth != NULL);
+}
+
+void
+java::io::VMObjectStreamClass::setDoubleNative (Field *f, jobject obj, 
+						jdouble val)
+{
+  f->setDouble (NULL, obj, val, false);
+}
+
+void 
+java::io::VMObjectStreamClass::setFloatNative (Field *f, jobject obj, 
+					       jfloat val)
+{
+  f->setFloat (NULL, obj, val, false);
+}
+
+void
+java::io::VMObjectStreamClass::setLongNative (Field *f, jobject obj, jlong val)
+{
+  f->setLong (NULL, obj, val, false);
+}
+
+void
+java::io::VMObjectStreamClass::setIntNative (Field *f, jobject obj, jint val)
+{
+  f->setInt (NULL, obj, val, false);
+}
+
+void
+java::io::VMObjectStreamClass::setShortNative (Field *f, jobject obj, 
+					       jshort val)
+{
+  f->setShort (NULL, obj, val, false);
+}
+
+void
+java::io::VMObjectStreamClass::setCharNative (Field *f, jobject obj, jchar val)
+{
+  f->setChar (NULL, obj, val, false);
+}
+
+void
+java::io::VMObjectStreamClass::setByteNative (Field *f, jobject obj, jbyte val)
+{
+  f->setByte (NULL, obj, val, false);
+}
+
+void
+java::io::VMObjectStreamClass::setBooleanNative (Field *f, jobject obj,
+						 jboolean val)
+{
+  f->setBoolean (NULL, obj, val, false);
+}
+
+void
+java::io::VMObjectStreamClass::setObjectNative (Field *f, jobject obj, 
+						jobject val)
+{
+  f->set (NULL, obj, val, f->getType(), false);
+}

Added: llvm-gcc-4.2/trunk/libjava/java/lang/Character.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/Character.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/Character.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/Character.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,3867 @@
+/* java.lang.Character -- Wrapper class for char, and Unicode subsets
+   Copyright (C) 1998, 1999, 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+/*
+ * Note: This class must not be merged with Classpath.  Gcj uses C-style
+ * arrays (see include/java-chartables.h) to store the Unicode character
+ * database, whereas Classpath uses Java objects (char[] extracted from
+ * String constants) in gnu.java.lang.CharData.  Gcj's approach is more
+ * efficient, because there is no vtable or data relocation to worry about.
+ * However, despite the difference in the database interface, the two
+ * versions share identical algorithms.
+ */
+
+package java.lang;
+
+import java.io.Serializable;
+import java.text.Collator;
+import java.util.Locale;
+
+/**
+ * Wrapper class for the primitive char data type.  In addition, this class
+ * allows one to retrieve property information and perform transformations
+ * on the 57,707 defined characters in the Unicode Standard, Version 3.0.0.
+ * java.lang.Character is designed to be very dynamic, and as such, it
+ * retrieves information on the Unicode character set from a separate
+ * database, gnu.java.lang.CharData, which can be easily upgraded.
+ *
+ * <p>For predicates, boundaries are used to describe
+ * the set of characters for which the method will return true.
+ * This syntax uses fairly normal regular expression notation.
+ * See 5.13 of the Unicode Standard, Version 3.0, for the
+ * boundary specification.
+ *
+ * <p>See <a href="http://www.unicode.org">http://www.unicode.org</a>
+ * for more information on the Unicode Standard.
+ *
+ * @author Tom Tromey (tromey at cygnus.com)
+ * @author Paul N. Fisher
+ * @author Jochen Hoenicke
+ * @author Eric Blake (ebb9 at email.byu.edu)
+ * @since 1.0
+ * @status updated to 1.4
+ */
+public final class Character implements Serializable, Comparable
+{
+  /**
+   * A subset of Unicode blocks.
+   *
+   * @author Paul N. Fisher
+   * @author Eric Blake (ebb9 at email.byu.edu)
+   * @since 1.2
+   */
+  public static class Subset
+  {
+    /** The name of the subset. */
+    private final String name;
+
+    /**
+     * Construct a new subset of characters.
+     *
+     * @param name the name of the subset
+     * @throws NullPointerException if name is null
+     */
+    protected Subset(String name)
+    {
+      // Note that name.toString() is name, unless name was null.
+      this.name = name.toString();
+    }
+
+    /**
+     * Compares two Subsets for equality. This is <code>final</code>, and
+     * restricts the comparison on the <code>==</code> operator, so it returns
+     * true only for the same object.
+     *
+     * @param o the object to compare
+     * @return true if o is this
+     */
+    public final boolean equals(Object o)
+    {
+      return o == this;
+    }
+
+    /**
+     * Makes the original hashCode of Object final, to be consistent with
+     * equals.
+     *
+     * @return the hash code for this object
+     */
+    public final int hashCode()
+    {
+      return super.hashCode();
+    }
+
+    /**
+     * Returns the name of the subset.
+     *
+     * @return the name
+     */
+    public final String toString()
+    {
+      return name;
+    }
+  } // class Subset
+
+  /**
+   * A family of character subsets in the Unicode specification. A character
+   * is in at most one of these blocks.
+   *
+   * This inner class was generated automatically from
+   * <code>libjava/gnu/gcj/convert/Blocks-3.txt</code>, by some perl scripts.
+   * This Unicode definition file can be found on the
+   * <a href="http://www.unicode.org">http://www.unicode.org</a> website.
+   * JDK 1.4 uses Unicode version 3.0.0.
+   *
+   * @author scripts/unicode-blocks.pl (written by Eric Blake)
+   * @since 1.2
+   */
+  public static final class UnicodeBlock extends Subset
+  {
+    /** The start of the subset. */
+    private final int start;
+
+    /** The end of the subset. */
+    private final int end;
+
+    /** The canonical name of the block according to the Unicode standard. */
+    private final String canonicalName;
+
+    /** Constants for the <code>forName()</code> method */
+    private static final int CANONICAL_NAME = 0;
+    private static final int NO_SPACES_NAME = 1;
+    private static final int CONSTANT_NAME = 2;
+
+    /**
+     * Constructor for strictly defined blocks.
+     *
+     * @param start the start character of the range
+     * @param end the end character of the range
+     * @param name the block name
+     */
+    private UnicodeBlock(int start, int end, String name,
+             String canonicalName)
+    {
+      super(name);
+      this.start = start;
+      this.end = end;
+      this.canonicalName = canonicalName;
+    }
+
+    /**
+     * Returns the Unicode character block which a character belongs to.
+     * <strong>Note</strong>: This method does not support the use of
+     * supplementary characters.  For such support, <code>of(int)</code>
+     * should be used instead.
+     *
+     * @param ch the character to look up
+     * @return the set it belongs to, or null if it is not in one
+     */
+    public static UnicodeBlock of(char ch)
+    {
+      return of((int) ch);
+    }
+
+    /**
+     * Returns the Unicode character block which a code point belongs to.
+     *
+     * @param codePoint the character to look up
+     * @return the set it belongs to, or null if it is not in one.
+     * @throws IllegalArgumentException if the specified code point is
+     *         invalid.
+     * @since 1.5
+     */
+    public static UnicodeBlock of(int codePoint)
+    {
+      if (codePoint > MAX_CODE_POINT)
+    throw new IllegalArgumentException("The supplied integer value is " +
+                       "too large to be a codepoint.");
+      // Simple binary search for the correct block.
+      int low = 0;
+      int hi = sets.length - 1;
+      while (low <= hi)
+        {
+          int mid = (low + hi) >> 1;
+          UnicodeBlock b = sets[mid];
+          if (codePoint < b.start)
+            hi = mid - 1;
+          else if (codePoint > b.end)
+            low = mid + 1;
+          else
+            return b;
+        }
+      return null;
+    }
+
+    /**
+     * <p>
+     * Returns the <code>UnicodeBlock</code> with the given name, as defined
+     * by the Unicode standard.  The version of Unicode in use is defined by
+     * the <code>Character</code> class, and the names are given in the
+     * <code>Blocks-<version>.txt</code> file corresponding to that version.
+     * The name may be specified in one of three ways:
+     * </p>
+     * <ol>
+     * <li>The canonical, human-readable name used by the Unicode standard.
+     * This is the name with all spaces and hyphens retained.  For example,
+     * `Basic Latin' retrieves the block, UnicodeBlock.BASIC_LATIN.</li>
+     * <li>The canonical name with all spaces removed e.g. `BasicLatin'.</li>
+     * <li>The name used for the constants specified by this class, which
+     * is the canonical name with all spaces and hyphens replaced with
+     * underscores e.g. `BASIC_LATIN'</li>
+     * </ol>
+     * <p>
+     * The names are compared case-insensitively using the case comparison
+     * associated with the U.S. English locale.  The method recognises the
+     * previous names used for blocks as well as the current ones.  At
+     * present, this simply means that the deprecated `SURROGATES_AREA'
+     * will be recognised by this method (the <code>of()</code> methods
+     * only return one of the three new surrogate blocks).
+     * </p>
+     *
+     * @param blockName the name of the block to look up.
+     * @return the specified block.
+     * @throws NullPointerException if the <code>blockName</code> is
+     *         <code>null</code>.
+     * @throws IllegalArgumentException if the name does not match any Unicode
+     *         block.
+     * @since 1.5
+     */
+    public static final UnicodeBlock forName(String blockName)
+    {
+      int type;
+      if (blockName.indexOf(' ') != -1)
+        type = CANONICAL_NAME;
+      else if (blockName.indexOf('_') != -1)
+        type = CONSTANT_NAME;
+      else
+        type = NO_SPACES_NAME;
+      Collator usCollator = Collator.getInstance(Locale.US);
+      usCollator.setStrength(Collator.PRIMARY);
+      /* Special case for deprecated blocks not in sets */
+      switch (type)
+      {
+        case CANONICAL_NAME:
+          if (usCollator.compare(blockName, "Surrogates Area") == 0)
+            return SURROGATES_AREA;
+          break;
+        case NO_SPACES_NAME:
+          if (usCollator.compare(blockName, "SurrogatesArea") == 0)
+            return SURROGATES_AREA;
+          break;
+        case CONSTANT_NAME:
+          if (usCollator.compare(blockName, "SURROGATES_AREA") == 0) 
+            return SURROGATES_AREA;
+          break;
+      }
+      /* Other cases */
+      int setLength = sets.length;
+      switch (type)
+      {
+        case CANONICAL_NAME:
+          for (int i = 0; i < setLength; i++)
+            {
+              UnicodeBlock block = sets[i];
+              if (usCollator.compare(blockName, block.canonicalName) == 0)
+                return block;
+            }
+          break;
+        case NO_SPACES_NAME:
+          for (int i = 0; i < setLength; i++)
+            {
+              UnicodeBlock block = sets[i];
+              String nsName = block.canonicalName.replaceAll(" ","");
+              if (usCollator.compare(blockName, nsName) == 0)
+                return block;
+            }        
+          break;
+        case CONSTANT_NAME:
+          for (int i = 0; i < setLength; i++)
+            {
+              UnicodeBlock block = sets[i];
+              if (usCollator.compare(blockName, block.toString()) == 0)
+                return block;
+            }
+          break;
+      }
+      throw new IllegalArgumentException("No Unicode block found for " +
+                                         blockName + ".");
+    }
+
+    /**
+     * Basic Latin.
+     * 0x0000 - 0x007F.
+     */
+    public static final UnicodeBlock BASIC_LATIN
+      = new UnicodeBlock(0x0000, 0x007F,
+                         "BASIC_LATIN", 
+                         "Basic Latin");
+
+    /**
+     * Latin-1 Supplement.
+     * 0x0080 - 0x00FF.
+     */
+    public static final UnicodeBlock LATIN_1_SUPPLEMENT
+      = new UnicodeBlock(0x0080, 0x00FF,
+                         "LATIN_1_SUPPLEMENT", 
+                         "Latin-1 Supplement");
+
+    /**
+     * Latin Extended-A.
+     * 0x0100 - 0x017F.
+     */
+    public static final UnicodeBlock LATIN_EXTENDED_A
+      = new UnicodeBlock(0x0100, 0x017F,
+                         "LATIN_EXTENDED_A", 
+                         "Latin Extended-A");
+
+    /**
+     * Latin Extended-B.
+     * 0x0180 - 0x024F.
+     */
+    public static final UnicodeBlock LATIN_EXTENDED_B
+      = new UnicodeBlock(0x0180, 0x024F,
+                         "LATIN_EXTENDED_B", 
+                         "Latin Extended-B");
+
+    /**
+     * IPA Extensions.
+     * 0x0250 - 0x02AF.
+     */
+    public static final UnicodeBlock IPA_EXTENSIONS
+      = new UnicodeBlock(0x0250, 0x02AF,
+                         "IPA_EXTENSIONS", 
+                         "IPA Extensions");
+
+    /**
+     * Spacing Modifier Letters.
+     * 0x02B0 - 0x02FF.
+     */
+    public static final UnicodeBlock SPACING_MODIFIER_LETTERS
+      = new UnicodeBlock(0x02B0, 0x02FF,
+                         "SPACING_MODIFIER_LETTERS", 
+                         "Spacing Modifier Letters");
+
+    /**
+     * Combining Diacritical Marks.
+     * 0x0300 - 0x036F.
+     */
+    public static final UnicodeBlock COMBINING_DIACRITICAL_MARKS
+      = new UnicodeBlock(0x0300, 0x036F,
+                         "COMBINING_DIACRITICAL_MARKS", 
+                         "Combining Diacritical Marks");
+
+    /**
+     * Greek.
+     * 0x0370 - 0x03FF.
+     */
+    public static final UnicodeBlock GREEK
+      = new UnicodeBlock(0x0370, 0x03FF,
+                         "GREEK", 
+                         "Greek");
+
+    /**
+     * Cyrillic.
+     * 0x0400 - 0x04FF.
+     */
+    public static final UnicodeBlock CYRILLIC
+      = new UnicodeBlock(0x0400, 0x04FF,
+                         "CYRILLIC", 
+                         "Cyrillic");
+
+    /**
+     * Cyrillic Supplementary.
+     * 0x0500 - 0x052F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock CYRILLIC_SUPPLEMENTARY
+      = new UnicodeBlock(0x0500, 0x052F,
+                         "CYRILLIC_SUPPLEMENTARY", 
+                         "Cyrillic Supplementary");
+
+    /**
+     * Armenian.
+     * 0x0530 - 0x058F.
+     */
+    public static final UnicodeBlock ARMENIAN
+      = new UnicodeBlock(0x0530, 0x058F,
+                         "ARMENIAN", 
+                         "Armenian");
+
+    /**
+     * Hebrew.
+     * 0x0590 - 0x05FF.
+     */
+    public static final UnicodeBlock HEBREW
+      = new UnicodeBlock(0x0590, 0x05FF,
+                         "HEBREW", 
+                         "Hebrew");
+
+    /**
+     * Arabic.
+     * 0x0600 - 0x06FF.
+     */
+    public static final UnicodeBlock ARABIC
+      = new UnicodeBlock(0x0600, 0x06FF,
+                         "ARABIC", 
+                         "Arabic");
+
+    /**
+     * Syriac.
+     * 0x0700 - 0x074F.
+     * @since 1.4
+     */
+    public static final UnicodeBlock SYRIAC
+      = new UnicodeBlock(0x0700, 0x074F,
+                         "SYRIAC", 
+                         "Syriac");
+
+    /**
+     * Thaana.
+     * 0x0780 - 0x07BF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock THAANA
+      = new UnicodeBlock(0x0780, 0x07BF,
+                         "THAANA", 
+                         "Thaana");
+
+    /**
+     * Devanagari.
+     * 0x0900 - 0x097F.
+     */
+    public static final UnicodeBlock DEVANAGARI
+      = new UnicodeBlock(0x0900, 0x097F,
+                         "DEVANAGARI", 
+                         "Devanagari");
+
+    /**
+     * Bengali.
+     * 0x0980 - 0x09FF.
+     */
+    public static final UnicodeBlock BENGALI
+      = new UnicodeBlock(0x0980, 0x09FF,
+                         "BENGALI", 
+                         "Bengali");
+
+    /**
+     * Gurmukhi.
+     * 0x0A00 - 0x0A7F.
+     */
+    public static final UnicodeBlock GURMUKHI
+      = new UnicodeBlock(0x0A00, 0x0A7F,
+                         "GURMUKHI", 
+                         "Gurmukhi");
+
+    /**
+     * Gujarati.
+     * 0x0A80 - 0x0AFF.
+     */
+    public static final UnicodeBlock GUJARATI
+      = new UnicodeBlock(0x0A80, 0x0AFF,
+                         "GUJARATI", 
+                         "Gujarati");
+
+    /**
+     * Oriya.
+     * 0x0B00 - 0x0B7F.
+     */
+    public static final UnicodeBlock ORIYA
+      = new UnicodeBlock(0x0B00, 0x0B7F,
+                         "ORIYA", 
+                         "Oriya");
+
+    /**
+     * Tamil.
+     * 0x0B80 - 0x0BFF.
+     */
+    public static final UnicodeBlock TAMIL
+      = new UnicodeBlock(0x0B80, 0x0BFF,
+                         "TAMIL", 
+                         "Tamil");
+
+    /**
+     * Telugu.
+     * 0x0C00 - 0x0C7F.
+     */
+    public static final UnicodeBlock TELUGU
+      = new UnicodeBlock(0x0C00, 0x0C7F,
+                         "TELUGU", 
+                         "Telugu");
+
+    /**
+     * Kannada.
+     * 0x0C80 - 0x0CFF.
+     */
+    public static final UnicodeBlock KANNADA
+      = new UnicodeBlock(0x0C80, 0x0CFF,
+                         "KANNADA", 
+                         "Kannada");
+
+    /**
+     * Malayalam.
+     * 0x0D00 - 0x0D7F.
+     */
+    public static final UnicodeBlock MALAYALAM
+      = new UnicodeBlock(0x0D00, 0x0D7F,
+                         "MALAYALAM", 
+                         "Malayalam");
+
+    /**
+     * Sinhala.
+     * 0x0D80 - 0x0DFF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock SINHALA
+      = new UnicodeBlock(0x0D80, 0x0DFF,
+                         "SINHALA", 
+                         "Sinhala");
+
+    /**
+     * Thai.
+     * 0x0E00 - 0x0E7F.
+     */
+    public static final UnicodeBlock THAI
+      = new UnicodeBlock(0x0E00, 0x0E7F,
+                         "THAI", 
+                         "Thai");
+
+    /**
+     * Lao.
+     * 0x0E80 - 0x0EFF.
+     */
+    public static final UnicodeBlock LAO
+      = new UnicodeBlock(0x0E80, 0x0EFF,
+                         "LAO", 
+                         "Lao");
+
+    /**
+     * Tibetan.
+     * 0x0F00 - 0x0FFF.
+     */
+    public static final UnicodeBlock TIBETAN
+      = new UnicodeBlock(0x0F00, 0x0FFF,
+                         "TIBETAN", 
+                         "Tibetan");
+
+    /**
+     * Myanmar.
+     * 0x1000 - 0x109F.
+     * @since 1.4
+     */
+    public static final UnicodeBlock MYANMAR
+      = new UnicodeBlock(0x1000, 0x109F,
+                         "MYANMAR", 
+                         "Myanmar");
+
+    /**
+     * Georgian.
+     * 0x10A0 - 0x10FF.
+     */
+    public static final UnicodeBlock GEORGIAN
+      = new UnicodeBlock(0x10A0, 0x10FF,
+                         "GEORGIAN", 
+                         "Georgian");
+
+    /**
+     * Hangul Jamo.
+     * 0x1100 - 0x11FF.
+     */
+    public static final UnicodeBlock HANGUL_JAMO
+      = new UnicodeBlock(0x1100, 0x11FF,
+                         "HANGUL_JAMO", 
+                         "Hangul Jamo");
+
+    /**
+     * Ethiopic.
+     * 0x1200 - 0x137F.
+     * @since 1.4
+     */
+    public static final UnicodeBlock ETHIOPIC
+      = new UnicodeBlock(0x1200, 0x137F,
+                         "ETHIOPIC", 
+                         "Ethiopic");
+
+    /**
+     * Cherokee.
+     * 0x13A0 - 0x13FF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock CHEROKEE
+      = new UnicodeBlock(0x13A0, 0x13FF,
+                         "CHEROKEE", 
+                         "Cherokee");
+
+    /**
+     * Unified Canadian Aboriginal Syllabics.
+     * 0x1400 - 0x167F.
+     * @since 1.4
+     */
+    public static final UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS
+      = new UnicodeBlock(0x1400, 0x167F,
+                         "UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS", 
+                         "Unified Canadian Aboriginal Syllabics");
+
+    /**
+     * Ogham.
+     * 0x1680 - 0x169F.
+     * @since 1.4
+     */
+    public static final UnicodeBlock OGHAM
+      = new UnicodeBlock(0x1680, 0x169F,
+                         "OGHAM", 
+                         "Ogham");
+
+    /**
+     * Runic.
+     * 0x16A0 - 0x16FF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock RUNIC
+      = new UnicodeBlock(0x16A0, 0x16FF,
+                         "RUNIC", 
+                         "Runic");
+
+    /**
+     * Tagalog.
+     * 0x1700 - 0x171F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock TAGALOG
+      = new UnicodeBlock(0x1700, 0x171F,
+                         "TAGALOG", 
+                         "Tagalog");
+
+    /**
+     * Hanunoo.
+     * 0x1720 - 0x173F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock HANUNOO
+      = new UnicodeBlock(0x1720, 0x173F,
+                         "HANUNOO", 
+                         "Hanunoo");
+
+    /**
+     * Buhid.
+     * 0x1740 - 0x175F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock BUHID
+      = new UnicodeBlock(0x1740, 0x175F,
+                         "BUHID", 
+                         "Buhid");
+
+    /**
+     * Tagbanwa.
+     * 0x1760 - 0x177F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock TAGBANWA
+      = new UnicodeBlock(0x1760, 0x177F,
+                         "TAGBANWA", 
+                         "Tagbanwa");
+
+    /**
+     * Khmer.
+     * 0x1780 - 0x17FF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock KHMER
+      = new UnicodeBlock(0x1780, 0x17FF,
+                         "KHMER", 
+                         "Khmer");
+
+    /**
+     * Mongolian.
+     * 0x1800 - 0x18AF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock MONGOLIAN
+      = new UnicodeBlock(0x1800, 0x18AF,
+                         "MONGOLIAN", 
+                         "Mongolian");
+
+    /**
+     * Limbu.
+     * 0x1900 - 0x194F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock LIMBU
+      = new UnicodeBlock(0x1900, 0x194F,
+                         "LIMBU", 
+                         "Limbu");
+
+    /**
+     * Tai Le.
+     * 0x1950 - 0x197F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock TAI_LE
+      = new UnicodeBlock(0x1950, 0x197F,
+                         "TAI_LE", 
+                         "Tai Le");
+
+    /**
+     * Khmer Symbols.
+     * 0x19E0 - 0x19FF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock KHMER_SYMBOLS
+      = new UnicodeBlock(0x19E0, 0x19FF,
+                         "KHMER_SYMBOLS", 
+                         "Khmer Symbols");
+
+    /**
+     * Phonetic Extensions.
+     * 0x1D00 - 0x1D7F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock PHONETIC_EXTENSIONS
+      = new UnicodeBlock(0x1D00, 0x1D7F,
+                         "PHONETIC_EXTENSIONS", 
+                         "Phonetic Extensions");
+
+    /**
+     * Latin Extended Additional.
+     * 0x1E00 - 0x1EFF.
+     */
+    public static final UnicodeBlock LATIN_EXTENDED_ADDITIONAL
+      = new UnicodeBlock(0x1E00, 0x1EFF,
+                         "LATIN_EXTENDED_ADDITIONAL", 
+                         "Latin Extended Additional");
+
+    /**
+     * Greek Extended.
+     * 0x1F00 - 0x1FFF.
+     */
+    public static final UnicodeBlock GREEK_EXTENDED
+      = new UnicodeBlock(0x1F00, 0x1FFF,
+                         "GREEK_EXTENDED", 
+                         "Greek Extended");
+
+    /**
+     * General Punctuation.
+     * 0x2000 - 0x206F.
+     */
+    public static final UnicodeBlock GENERAL_PUNCTUATION
+      = new UnicodeBlock(0x2000, 0x206F,
+                         "GENERAL_PUNCTUATION", 
+                         "General Punctuation");
+
+    /**
+     * Superscripts and Subscripts.
+     * 0x2070 - 0x209F.
+     */
+    public static final UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS
+      = new UnicodeBlock(0x2070, 0x209F,
+                         "SUPERSCRIPTS_AND_SUBSCRIPTS", 
+                         "Superscripts and Subscripts");
+
+    /**
+     * Currency Symbols.
+     * 0x20A0 - 0x20CF.
+     */
+    public static final UnicodeBlock CURRENCY_SYMBOLS
+      = new UnicodeBlock(0x20A0, 0x20CF,
+                         "CURRENCY_SYMBOLS", 
+                         "Currency Symbols");
+
+    /**
+     * Combining Marks for Symbols.
+     * 0x20D0 - 0x20FF.
+     */
+    public static final UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS
+      = new UnicodeBlock(0x20D0, 0x20FF,
+                         "COMBINING_MARKS_FOR_SYMBOLS", 
+                         "Combining Marks for Symbols");
+
+    /**
+     * Letterlike Symbols.
+     * 0x2100 - 0x214F.
+     */
+    public static final UnicodeBlock LETTERLIKE_SYMBOLS
+      = new UnicodeBlock(0x2100, 0x214F,
+                         "LETTERLIKE_SYMBOLS", 
+                         "Letterlike Symbols");
+
+    /**
+     * Number Forms.
+     * 0x2150 - 0x218F.
+     */
+    public static final UnicodeBlock NUMBER_FORMS
+      = new UnicodeBlock(0x2150, 0x218F,
+                         "NUMBER_FORMS", 
+                         "Number Forms");
+
+    /**
+     * Arrows.
+     * 0x2190 - 0x21FF.
+     */
+    public static final UnicodeBlock ARROWS
+      = new UnicodeBlock(0x2190, 0x21FF,
+                         "ARROWS", 
+                         "Arrows");
+
+    /**
+     * Mathematical Operators.
+     * 0x2200 - 0x22FF.
+     */
+    public static final UnicodeBlock MATHEMATICAL_OPERATORS
+      = new UnicodeBlock(0x2200, 0x22FF,
+                         "MATHEMATICAL_OPERATORS", 
+                         "Mathematical Operators");
+
+    /**
+     * Miscellaneous Technical.
+     * 0x2300 - 0x23FF.
+     */
+    public static final UnicodeBlock MISCELLANEOUS_TECHNICAL
+      = new UnicodeBlock(0x2300, 0x23FF,
+                         "MISCELLANEOUS_TECHNICAL", 
+                         "Miscellaneous Technical");
+
+    /**
+     * Control Pictures.
+     * 0x2400 - 0x243F.
+     */
+    public static final UnicodeBlock CONTROL_PICTURES
+      = new UnicodeBlock(0x2400, 0x243F,
+                         "CONTROL_PICTURES", 
+                         "Control Pictures");
+
+    /**
+     * Optical Character Recognition.
+     * 0x2440 - 0x245F.
+     */
+    public static final UnicodeBlock OPTICAL_CHARACTER_RECOGNITION
+      = new UnicodeBlock(0x2440, 0x245F,
+                         "OPTICAL_CHARACTER_RECOGNITION", 
+                         "Optical Character Recognition");
+
+    /**
+     * Enclosed Alphanumerics.
+     * 0x2460 - 0x24FF.
+     */
+    public static final UnicodeBlock ENCLOSED_ALPHANUMERICS
+      = new UnicodeBlock(0x2460, 0x24FF,
+                         "ENCLOSED_ALPHANUMERICS", 
+                         "Enclosed Alphanumerics");
+
+    /**
+     * Box Drawing.
+     * 0x2500 - 0x257F.
+     */
+    public static final UnicodeBlock BOX_DRAWING
+      = new UnicodeBlock(0x2500, 0x257F,
+                         "BOX_DRAWING", 
+                         "Box Drawing");
+
+    /**
+     * Block Elements.
+     * 0x2580 - 0x259F.
+     */
+    public static final UnicodeBlock BLOCK_ELEMENTS
+      = new UnicodeBlock(0x2580, 0x259F,
+                         "BLOCK_ELEMENTS", 
+                         "Block Elements");
+
+    /**
+     * Geometric Shapes.
+     * 0x25A0 - 0x25FF.
+     */
+    public static final UnicodeBlock GEOMETRIC_SHAPES
+      = new UnicodeBlock(0x25A0, 0x25FF,
+                         "GEOMETRIC_SHAPES", 
+                         "Geometric Shapes");
+
+    /**
+     * Miscellaneous Symbols.
+     * 0x2600 - 0x26FF.
+     */
+    public static final UnicodeBlock MISCELLANEOUS_SYMBOLS
+      = new UnicodeBlock(0x2600, 0x26FF,
+                         "MISCELLANEOUS_SYMBOLS", 
+                         "Miscellaneous Symbols");
+
+    /**
+     * Dingbats.
+     * 0x2700 - 0x27BF.
+     */
+    public static final UnicodeBlock DINGBATS
+      = new UnicodeBlock(0x2700, 0x27BF,
+                         "DINGBATS", 
+                         "Dingbats");
+
+    /**
+     * Miscellaneous Mathematical Symbols-A.
+     * 0x27C0 - 0x27EF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A
+      = new UnicodeBlock(0x27C0, 0x27EF,
+                         "MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A", 
+                         "Miscellaneous Mathematical Symbols-A");
+
+    /**
+     * Supplemental Arrows-A.
+     * 0x27F0 - 0x27FF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock SUPPLEMENTAL_ARROWS_A
+      = new UnicodeBlock(0x27F0, 0x27FF,
+                         "SUPPLEMENTAL_ARROWS_A", 
+                         "Supplemental Arrows-A");
+
+    /**
+     * Braille Patterns.
+     * 0x2800 - 0x28FF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock BRAILLE_PATTERNS
+      = new UnicodeBlock(0x2800, 0x28FF,
+                         "BRAILLE_PATTERNS", 
+                         "Braille Patterns");
+
+    /**
+     * Supplemental Arrows-B.
+     * 0x2900 - 0x297F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock SUPPLEMENTAL_ARROWS_B
+      = new UnicodeBlock(0x2900, 0x297F,
+                         "SUPPLEMENTAL_ARROWS_B", 
+                         "Supplemental Arrows-B");
+
+    /**
+     * Miscellaneous Mathematical Symbols-B.
+     * 0x2980 - 0x29FF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B
+      = new UnicodeBlock(0x2980, 0x29FF,
+                         "MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B", 
+                         "Miscellaneous Mathematical Symbols-B");
+
+    /**
+     * Supplemental Mathematical Operators.
+     * 0x2A00 - 0x2AFF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS
+      = new UnicodeBlock(0x2A00, 0x2AFF,
+                         "SUPPLEMENTAL_MATHEMATICAL_OPERATORS", 
+                         "Supplemental Mathematical Operators");
+
+    /**
+     * Miscellaneous Symbols and Arrows.
+     * 0x2B00 - 0x2BFF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS
+      = new UnicodeBlock(0x2B00, 0x2BFF,
+                         "MISCELLANEOUS_SYMBOLS_AND_ARROWS", 
+                         "Miscellaneous Symbols and Arrows");
+
+    /**
+     * CJK Radicals Supplement.
+     * 0x2E80 - 0x2EFF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock CJK_RADICALS_SUPPLEMENT
+      = new UnicodeBlock(0x2E80, 0x2EFF,
+                         "CJK_RADICALS_SUPPLEMENT", 
+                         "CJK Radicals Supplement");
+
+    /**
+     * Kangxi Radicals.
+     * 0x2F00 - 0x2FDF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock KANGXI_RADICALS
+      = new UnicodeBlock(0x2F00, 0x2FDF,
+                         "KANGXI_RADICALS", 
+                         "Kangxi Radicals");
+
+    /**
+     * Ideographic Description Characters.
+     * 0x2FF0 - 0x2FFF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS
+      = new UnicodeBlock(0x2FF0, 0x2FFF,
+                         "IDEOGRAPHIC_DESCRIPTION_CHARACTERS", 
+                         "Ideographic Description Characters");
+
+    /**
+     * CJK Symbols and Punctuation.
+     * 0x3000 - 0x303F.
+     */
+    public static final UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION
+      = new UnicodeBlock(0x3000, 0x303F,
+                         "CJK_SYMBOLS_AND_PUNCTUATION", 
+                         "CJK Symbols and Punctuation");
+
+    /**
+     * Hiragana.
+     * 0x3040 - 0x309F.
+     */
+    public static final UnicodeBlock HIRAGANA
+      = new UnicodeBlock(0x3040, 0x309F,
+                         "HIRAGANA", 
+                         "Hiragana");
+
+    /**
+     * Katakana.
+     * 0x30A0 - 0x30FF.
+     */
+    public static final UnicodeBlock KATAKANA
+      = new UnicodeBlock(0x30A0, 0x30FF,
+                         "KATAKANA", 
+                         "Katakana");
+
+    /**
+     * Bopomofo.
+     * 0x3100 - 0x312F.
+     */
+    public static final UnicodeBlock BOPOMOFO
+      = new UnicodeBlock(0x3100, 0x312F,
+                         "BOPOMOFO", 
+                         "Bopomofo");
+
+    /**
+     * Hangul Compatibility Jamo.
+     * 0x3130 - 0x318F.
+     */
+    public static final UnicodeBlock HANGUL_COMPATIBILITY_JAMO
+      = new UnicodeBlock(0x3130, 0x318F,
+                         "HANGUL_COMPATIBILITY_JAMO", 
+                         "Hangul Compatibility Jamo");
+
+    /**
+     * Kanbun.
+     * 0x3190 - 0x319F.
+     */
+    public static final UnicodeBlock KANBUN
+      = new UnicodeBlock(0x3190, 0x319F,
+                         "KANBUN", 
+                         "Kanbun");
+
+    /**
+     * Bopomofo Extended.
+     * 0x31A0 - 0x31BF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock BOPOMOFO_EXTENDED
+      = new UnicodeBlock(0x31A0, 0x31BF,
+                         "BOPOMOFO_EXTENDED", 
+                         "Bopomofo Extended");
+
+    /**
+     * Katakana Phonetic Extensions.
+     * 0x31F0 - 0x31FF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS
+      = new UnicodeBlock(0x31F0, 0x31FF,
+                         "KATAKANA_PHONETIC_EXTENSIONS", 
+                         "Katakana Phonetic Extensions");
+
+    /**
+     * Enclosed CJK Letters and Months.
+     * 0x3200 - 0x32FF.
+     */
+    public static final UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS
+      = new UnicodeBlock(0x3200, 0x32FF,
+                         "ENCLOSED_CJK_LETTERS_AND_MONTHS", 
+                         "Enclosed CJK Letters and Months");
+
+    /**
+     * CJK Compatibility.
+     * 0x3300 - 0x33FF.
+     */
+    public static final UnicodeBlock CJK_COMPATIBILITY
+      = new UnicodeBlock(0x3300, 0x33FF,
+                         "CJK_COMPATIBILITY", 
+                         "CJK Compatibility");
+
+    /**
+     * CJK Unified Ideographs Extension A.
+     * 0x3400 - 0x4DBF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A
+      = new UnicodeBlock(0x3400, 0x4DBF,
+                         "CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A", 
+                         "CJK Unified Ideographs Extension A");
+
+    /**
+     * Yijing Hexagram Symbols.
+     * 0x4DC0 - 0x4DFF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock YIJING_HEXAGRAM_SYMBOLS
+      = new UnicodeBlock(0x4DC0, 0x4DFF,
+                         "YIJING_HEXAGRAM_SYMBOLS", 
+                         "Yijing Hexagram Symbols");
+
+    /**
+     * CJK Unified Ideographs.
+     * 0x4E00 - 0x9FFF.
+     */
+    public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS
+      = new UnicodeBlock(0x4E00, 0x9FFF,
+                         "CJK_UNIFIED_IDEOGRAPHS", 
+                         "CJK Unified Ideographs");
+
+    /**
+     * Yi Syllables.
+     * 0xA000 - 0xA48F.
+     * @since 1.4
+     */
+    public static final UnicodeBlock YI_SYLLABLES
+      = new UnicodeBlock(0xA000, 0xA48F,
+                         "YI_SYLLABLES", 
+                         "Yi Syllables");
+
+    /**
+     * Yi Radicals.
+     * 0xA490 - 0xA4CF.
+     * @since 1.4
+     */
+    public static final UnicodeBlock YI_RADICALS
+      = new UnicodeBlock(0xA490, 0xA4CF,
+                         "YI_RADICALS", 
+                         "Yi Radicals");
+
+    /**
+     * Hangul Syllables.
+     * 0xAC00 - 0xD7AF.
+     */
+    public static final UnicodeBlock HANGUL_SYLLABLES
+      = new UnicodeBlock(0xAC00, 0xD7AF,
+                         "HANGUL_SYLLABLES", 
+                         "Hangul Syllables");
+
+    /**
+     * High Surrogates.
+     * 0xD800 - 0xDB7F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock HIGH_SURROGATES
+      = new UnicodeBlock(0xD800, 0xDB7F,
+                         "HIGH_SURROGATES", 
+                         "High Surrogates");
+
+    /**
+     * High Private Use Surrogates.
+     * 0xDB80 - 0xDBFF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock HIGH_PRIVATE_USE_SURROGATES
+      = new UnicodeBlock(0xDB80, 0xDBFF,
+                         "HIGH_PRIVATE_USE_SURROGATES", 
+                         "High Private Use Surrogates");
+
+    /**
+     * Low Surrogates.
+     * 0xDC00 - 0xDFFF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock LOW_SURROGATES
+      = new UnicodeBlock(0xDC00, 0xDFFF,
+                         "LOW_SURROGATES", 
+                         "Low Surrogates");
+
+    /**
+     * Private Use Area.
+     * 0xE000 - 0xF8FF.
+     */
+    public static final UnicodeBlock PRIVATE_USE_AREA
+      = new UnicodeBlock(0xE000, 0xF8FF,
+                         "PRIVATE_USE_AREA", 
+                         "Private Use Area");
+
+    /**
+     * CJK Compatibility Ideographs.
+     * 0xF900 - 0xFAFF.
+     */
+    public static final UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS
+      = new UnicodeBlock(0xF900, 0xFAFF,
+                         "CJK_COMPATIBILITY_IDEOGRAPHS", 
+                         "CJK Compatibility Ideographs");
+
+    /**
+     * Alphabetic Presentation Forms.
+     * 0xFB00 - 0xFB4F.
+     */
+    public static final UnicodeBlock ALPHABETIC_PRESENTATION_FORMS
+      = new UnicodeBlock(0xFB00, 0xFB4F,
+                         "ALPHABETIC_PRESENTATION_FORMS", 
+                         "Alphabetic Presentation Forms");
+
+    /**
+     * Arabic Presentation Forms-A.
+     * 0xFB50 - 0xFDFF.
+     */
+    public static final UnicodeBlock ARABIC_PRESENTATION_FORMS_A
+      = new UnicodeBlock(0xFB50, 0xFDFF,
+                         "ARABIC_PRESENTATION_FORMS_A", 
+                         "Arabic Presentation Forms-A");
+
+    /**
+     * Variation Selectors.
+     * 0xFE00 - 0xFE0F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock VARIATION_SELECTORS
+      = new UnicodeBlock(0xFE00, 0xFE0F,
+                         "VARIATION_SELECTORS", 
+                         "Variation Selectors");
+
+    /**
+     * Combining Half Marks.
+     * 0xFE20 - 0xFE2F.
+     */
+    public static final UnicodeBlock COMBINING_HALF_MARKS
+      = new UnicodeBlock(0xFE20, 0xFE2F,
+                         "COMBINING_HALF_MARKS", 
+                         "Combining Half Marks");
+
+    /**
+     * CJK Compatibility Forms.
+     * 0xFE30 - 0xFE4F.
+     */
+    public static final UnicodeBlock CJK_COMPATIBILITY_FORMS
+      = new UnicodeBlock(0xFE30, 0xFE4F,
+                         "CJK_COMPATIBILITY_FORMS", 
+                         "CJK Compatibility Forms");
+
+    /**
+     * Small Form Variants.
+     * 0xFE50 - 0xFE6F.
+     */
+    public static final UnicodeBlock SMALL_FORM_VARIANTS
+      = new UnicodeBlock(0xFE50, 0xFE6F,
+                         "SMALL_FORM_VARIANTS", 
+                         "Small Form Variants");
+
+    /**
+     * Arabic Presentation Forms-B.
+     * 0xFE70 - 0xFEFF.
+     */
+    public static final UnicodeBlock ARABIC_PRESENTATION_FORMS_B
+      = new UnicodeBlock(0xFE70, 0xFEFF,
+                         "ARABIC_PRESENTATION_FORMS_B", 
+                         "Arabic Presentation Forms-B");
+
+    /**
+     * Halfwidth and Fullwidth Forms.
+     * 0xFF00 - 0xFFEF.
+     */
+    public static final UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS
+      = new UnicodeBlock(0xFF00, 0xFFEF,
+                         "HALFWIDTH_AND_FULLWIDTH_FORMS", 
+                         "Halfwidth and Fullwidth Forms");
+
+    /**
+     * Specials.
+     * 0xFFF0 - 0xFFFF.
+     */
+    public static final UnicodeBlock SPECIALS
+      = new UnicodeBlock(0xFFF0, 0xFFFF,
+                         "SPECIALS", 
+                         "Specials");
+
+    /**
+     * Linear B Syllabary.
+     * 0x10000 - 0x1007F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock LINEAR_B_SYLLABARY
+      = new UnicodeBlock(0x10000, 0x1007F,
+                         "LINEAR_B_SYLLABARY", 
+                         "Linear B Syllabary");
+
+    /**
+     * Linear B Ideograms.
+     * 0x10080 - 0x100FF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock LINEAR_B_IDEOGRAMS
+      = new UnicodeBlock(0x10080, 0x100FF,
+                         "LINEAR_B_IDEOGRAMS", 
+                         "Linear B Ideograms");
+
+    /**
+     * Aegean Numbers.
+     * 0x10100 - 0x1013F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock AEGEAN_NUMBERS
+      = new UnicodeBlock(0x10100, 0x1013F,
+                         "AEGEAN_NUMBERS", 
+                         "Aegean Numbers");
+
+    /**
+     * Old Italic.
+     * 0x10300 - 0x1032F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock OLD_ITALIC
+      = new UnicodeBlock(0x10300, 0x1032F,
+                         "OLD_ITALIC", 
+                         "Old Italic");
+
+    /**
+     * Gothic.
+     * 0x10330 - 0x1034F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock GOTHIC
+      = new UnicodeBlock(0x10330, 0x1034F,
+                         "GOTHIC", 
+                         "Gothic");
+
+    /**
+     * Ugaritic.
+     * 0x10380 - 0x1039F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock UGARITIC
+      = new UnicodeBlock(0x10380, 0x1039F,
+                         "UGARITIC", 
+                         "Ugaritic");
+
+    /**
+     * Deseret.
+     * 0x10400 - 0x1044F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock DESERET
+      = new UnicodeBlock(0x10400, 0x1044F,
+                         "DESERET", 
+                         "Deseret");
+
+    /**
+     * Shavian.
+     * 0x10450 - 0x1047F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock SHAVIAN
+      = new UnicodeBlock(0x10450, 0x1047F,
+                         "SHAVIAN", 
+                         "Shavian");
+
+    /**
+     * Osmanya.
+     * 0x10480 - 0x104AF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock OSMANYA
+      = new UnicodeBlock(0x10480, 0x104AF,
+                         "OSMANYA", 
+                         "Osmanya");
+
+    /**
+     * Cypriot Syllabary.
+     * 0x10800 - 0x1083F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock CYPRIOT_SYLLABARY
+      = new UnicodeBlock(0x10800, 0x1083F,
+                         "CYPRIOT_SYLLABARY", 
+                         "Cypriot Syllabary");
+
+    /**
+     * Byzantine Musical Symbols.
+     * 0x1D000 - 0x1D0FF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS
+      = new UnicodeBlock(0x1D000, 0x1D0FF,
+                         "BYZANTINE_MUSICAL_SYMBOLS", 
+                         "Byzantine Musical Symbols");
+
+    /**
+     * Musical Symbols.
+     * 0x1D100 - 0x1D1FF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock MUSICAL_SYMBOLS
+      = new UnicodeBlock(0x1D100, 0x1D1FF,
+                         "MUSICAL_SYMBOLS", 
+                         "Musical Symbols");
+
+    /**
+     * Tai Xuan Jing Symbols.
+     * 0x1D300 - 0x1D35F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock TAI_XUAN_JING_SYMBOLS
+      = new UnicodeBlock(0x1D300, 0x1D35F,
+                         "TAI_XUAN_JING_SYMBOLS", 
+                         "Tai Xuan Jing Symbols");
+
+    /**
+     * Mathematical Alphanumeric Symbols.
+     * 0x1D400 - 0x1D7FF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS
+      = new UnicodeBlock(0x1D400, 0x1D7FF,
+                         "MATHEMATICAL_ALPHANUMERIC_SYMBOLS", 
+                         "Mathematical Alphanumeric Symbols");
+
+    /**
+     * CJK Unified Ideographs Extension B.
+     * 0x20000 - 0x2A6DF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
+      = new UnicodeBlock(0x20000, 0x2A6DF,
+                         "CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B", 
+                         "CJK Unified Ideographs Extension B");
+
+    /**
+     * CJK Compatibility Ideographs Supplement.
+     * 0x2F800 - 0x2FA1F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT
+      = new UnicodeBlock(0x2F800, 0x2FA1F,
+                         "CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT", 
+                         "CJK Compatibility Ideographs Supplement");
+
+    /**
+     * Tags.
+     * 0xE0000 - 0xE007F.
+     * @since 1.5
+     */
+    public static final UnicodeBlock TAGS
+      = new UnicodeBlock(0xE0000, 0xE007F,
+                         "TAGS", 
+                         "Tags");
+
+    /**
+     * Variation Selectors Supplement.
+     * 0xE0100 - 0xE01EF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT
+      = new UnicodeBlock(0xE0100, 0xE01EF,
+                         "VARIATION_SELECTORS_SUPPLEMENT", 
+                         "Variation Selectors Supplement");
+
+    /**
+     * Supplementary Private Use Area-A.
+     * 0xF0000 - 0xFFFFF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A
+      = new UnicodeBlock(0xF0000, 0xFFFFF,
+                         "SUPPLEMENTARY_PRIVATE_USE_AREA_A", 
+                         "Supplementary Private Use Area-A");
+
+    /**
+     * Supplementary Private Use Area-B.
+     * 0x100000 - 0x10FFFF.
+     * @since 1.5
+     */
+    public static final UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B
+      = new UnicodeBlock(0x100000, 0x10FFFF,
+                         "SUPPLEMENTARY_PRIVATE_USE_AREA_B", 
+                         "Supplementary Private Use Area-B");
+
+    /**
+     * Surrogates Area.
+     * 'D800' - 'DFFF'.
+     * @deprecated As of 1.5, the three areas, 
+     * <a href="#HIGH_SURROGATES">HIGH_SURROGATES</a>,
+     * <a href="#HIGH_PRIVATE_USE_SURROGATES">HIGH_PRIVATE_USE_SURROGATES</a>
+     * and <a href="#LOW_SURROGATES">LOW_SURROGATES</a>, as defined
+     * by the Unicode standard, should be used in preference to
+     * this.  These are also returned from calls to <code>of(int)</code>
+     * and <code>of(char)</code>.
+     */
+    public static final UnicodeBlock SURROGATES_AREA
+      = new UnicodeBlock(0xD800, 0xDFFF,
+                         "SURROGATES_AREA",
+             "Surrogates Area");
+
+    /**
+     * The defined subsets.
+     */
+    private static final UnicodeBlock sets[] = {
+      BASIC_LATIN,
+      LATIN_1_SUPPLEMENT,
+      LATIN_EXTENDED_A,
+      LATIN_EXTENDED_B,
+      IPA_EXTENSIONS,
+      SPACING_MODIFIER_LETTERS,
+      COMBINING_DIACRITICAL_MARKS,
+      GREEK,
+      CYRILLIC,
+      CYRILLIC_SUPPLEMENTARY,
+      ARMENIAN,
+      HEBREW,
+      ARABIC,
+      SYRIAC,
+      THAANA,
+      DEVANAGARI,
+      BENGALI,
+      GURMUKHI,
+      GUJARATI,
+      ORIYA,
+      TAMIL,
+      TELUGU,
+      KANNADA,
+      MALAYALAM,
+      SINHALA,
+      THAI,
+      LAO,
+      TIBETAN,
+      MYANMAR,
+      GEORGIAN,
+      HANGUL_JAMO,
+      ETHIOPIC,
+      CHEROKEE,
+      UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS,
+      OGHAM,
+      RUNIC,
+      TAGALOG,
+      HANUNOO,
+      BUHID,
+      TAGBANWA,
+      KHMER,
+      MONGOLIAN,
+      LIMBU,
+      TAI_LE,
+      KHMER_SYMBOLS,
+      PHONETIC_EXTENSIONS,
+      LATIN_EXTENDED_ADDITIONAL,
+      GREEK_EXTENDED,
+      GENERAL_PUNCTUATION,
+      SUPERSCRIPTS_AND_SUBSCRIPTS,
+      CURRENCY_SYMBOLS,
+      COMBINING_MARKS_FOR_SYMBOLS,
+      LETTERLIKE_SYMBOLS,
+      NUMBER_FORMS,
+      ARROWS,
+      MATHEMATICAL_OPERATORS,
+      MISCELLANEOUS_TECHNICAL,
+      CONTROL_PICTURES,
+      OPTICAL_CHARACTER_RECOGNITION,
+      ENCLOSED_ALPHANUMERICS,
+      BOX_DRAWING,
+      BLOCK_ELEMENTS,
+      GEOMETRIC_SHAPES,
+      MISCELLANEOUS_SYMBOLS,
+      DINGBATS,
+      MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A,
+      SUPPLEMENTAL_ARROWS_A,
+      BRAILLE_PATTERNS,
+      SUPPLEMENTAL_ARROWS_B,
+      MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B,
+      SUPPLEMENTAL_MATHEMATICAL_OPERATORS,
+      MISCELLANEOUS_SYMBOLS_AND_ARROWS,
+      CJK_RADICALS_SUPPLEMENT,
+      KANGXI_RADICALS,
+      IDEOGRAPHIC_DESCRIPTION_CHARACTERS,
+      CJK_SYMBOLS_AND_PUNCTUATION,
+      HIRAGANA,
+      KATAKANA,
+      BOPOMOFO,
+      HANGUL_COMPATIBILITY_JAMO,
+      KANBUN,
+      BOPOMOFO_EXTENDED,
+      KATAKANA_PHONETIC_EXTENSIONS,
+      ENCLOSED_CJK_LETTERS_AND_MONTHS,
+      CJK_COMPATIBILITY,
+      CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A,
+      YIJING_HEXAGRAM_SYMBOLS,
+      CJK_UNIFIED_IDEOGRAPHS,
+      YI_SYLLABLES,
+      YI_RADICALS,
+      HANGUL_SYLLABLES,
+      HIGH_SURROGATES,
+      HIGH_PRIVATE_USE_SURROGATES,
+      LOW_SURROGATES,
+      PRIVATE_USE_AREA,
+      CJK_COMPATIBILITY_IDEOGRAPHS,
+      ALPHABETIC_PRESENTATION_FORMS,
+      ARABIC_PRESENTATION_FORMS_A,
+      VARIATION_SELECTORS,
+      COMBINING_HALF_MARKS,
+      CJK_COMPATIBILITY_FORMS,
+      SMALL_FORM_VARIANTS,
+      ARABIC_PRESENTATION_FORMS_B,
+      HALFWIDTH_AND_FULLWIDTH_FORMS,
+      SPECIALS,
+      LINEAR_B_SYLLABARY,
+      LINEAR_B_IDEOGRAMS,
+      AEGEAN_NUMBERS,
+      OLD_ITALIC,
+      GOTHIC,
+      UGARITIC,
+      DESERET,
+      SHAVIAN,
+      OSMANYA,
+      CYPRIOT_SYLLABARY,
+      BYZANTINE_MUSICAL_SYMBOLS,
+      MUSICAL_SYMBOLS,
+      TAI_XUAN_JING_SYMBOLS,
+      MATHEMATICAL_ALPHANUMERIC_SYMBOLS,
+      CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B,
+      CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT,
+      TAGS,
+      VARIATION_SELECTORS_SUPPLEMENT,
+      SUPPLEMENTARY_PRIVATE_USE_AREA_A,
+      SUPPLEMENTARY_PRIVATE_USE_AREA_B,
+    };
+  } // class UnicodeBlock
+
+  /**
+   * The immutable value of this Character.
+   *
+   * @serial the value of this Character
+   */
+  private final char value;
+
+  /**
+   * Compatible with JDK 1.0+.
+   */
+  private static final long serialVersionUID = 3786198910865385080L;
+
+  /**
+   * Smallest value allowed for radix arguments in Java. This value is 2.
+   *
+   * @see #digit(char, int)
+   * @see #forDigit(int, int)
+   * @see Integer#toString(int, int)
+   * @see Integer#valueOf(String)
+   */
+  public static final int MIN_RADIX = 2;
+
+  /**
+   * Largest value allowed for radix arguments in Java. This value is 36.
+   *
+   * @see #digit(char, int)
+   * @see #forDigit(int, int)
+   * @see Integer#toString(int, int)
+   * @see Integer#valueOf(String)
+   */
+  public static final int MAX_RADIX = 36;
+
+  /**
+   * The minimum value the char data type can hold.
+   * This value is <code>'\\u0000'</code>.
+   */
+  public static final char MIN_VALUE = '\u0000';
+
+  /**
+   * The maximum value the char data type can hold.
+   * This value is <code>'\\uFFFF'</code>.
+   */
+  public static final char MAX_VALUE = '\uFFFF';
+
+  /**
+   * Class object representing the primitive char data type.
+   *
+   * @since 1.1
+   */
+  public static final Class TYPE = VMClassLoader.getPrimitiveClass('C');
+
+  /**
+   * The number of bits needed to represent a <code>char</code>.
+   * @since 1.5
+   */
+  public static final int SIZE = 16;
+
+  // This caches some Character values, and is used by boxing
+  // conversions via valueOf().  We must cache at least 0..127;
+  // this constant controls how much we actually cache.
+  private static final int MAX_CACHE = 127;
+  private static Character[] charCache = new Character[MAX_CACHE + 1];
+
+  /**
+   * Lu = Letter, Uppercase (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte UPPERCASE_LETTER = 1;
+
+  /**
+   * Ll = Letter, Lowercase (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte LOWERCASE_LETTER = 2;
+
+  /**
+   * Lt = Letter, Titlecase (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte TITLECASE_LETTER = 3;
+
+  /**
+   * Mn = Mark, Non-Spacing (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte NON_SPACING_MARK = 6;
+
+  /**
+   * Mc = Mark, Spacing Combining (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte COMBINING_SPACING_MARK = 8;
+
+  /**
+   * Me = Mark, Enclosing (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte ENCLOSING_MARK = 7;
+
+  /**
+   * Nd = Number, Decimal Digit (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte DECIMAL_DIGIT_NUMBER = 9;
+
+  /**
+   * Nl = Number, Letter (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte LETTER_NUMBER = 10;
+
+  /**
+   * No = Number, Other (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte OTHER_NUMBER = 11;
+
+  /**
+   * Zs = Separator, Space (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte SPACE_SEPARATOR = 12;
+
+  /**
+   * Zl = Separator, Line (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte LINE_SEPARATOR = 13;
+
+  /**
+   * Zp = Separator, Paragraph (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte PARAGRAPH_SEPARATOR = 14;
+
+  /**
+   * Cc = Other, Control (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte CONTROL = 15;
+
+  /**
+   * Cf = Other, Format (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte FORMAT = 16;
+
+  /**
+   * Cs = Other, Surrogate (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte SURROGATE = 19;
+
+  /**
+   * Co = Other, Private Use (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte PRIVATE_USE = 18;
+
+  /**
+   * Cn = Other, Not Assigned (Normative).
+   *
+   * @since 1.1
+   */
+  public static final byte UNASSIGNED = 0;
+
+  /**
+   * Lm = Letter, Modifier (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte MODIFIER_LETTER = 4;
+
+  /**
+   * Lo = Letter, Other (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte OTHER_LETTER = 5;
+
+  /**
+   * Pc = Punctuation, Connector (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte CONNECTOR_PUNCTUATION = 23;
+
+  /**
+   * Pd = Punctuation, Dash (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte DASH_PUNCTUATION = 20;
+
+  /**
+   * Ps = Punctuation, Open (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte START_PUNCTUATION = 21;
+
+  /**
+   * Pe = Punctuation, Close (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte END_PUNCTUATION = 22;
+
+  /**
+   * Pi = Punctuation, Initial Quote (Informative).
+   *
+   * @since 1.4
+   */
+  public static final byte INITIAL_QUOTE_PUNCTUATION = 29;
+
+  /**
+   * Pf = Punctuation, Final Quote (Informative).
+   *
+   * @since 1.4
+   */
+  public static final byte FINAL_QUOTE_PUNCTUATION = 30;
+
+  /**
+   * Po = Punctuation, Other (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte OTHER_PUNCTUATION = 24;
+
+  /**
+   * Sm = Symbol, Math (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte MATH_SYMBOL = 25;
+
+  /**
+   * Sc = Symbol, Currency (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte CURRENCY_SYMBOL = 26;
+
+  /**
+   * Sk = Symbol, Modifier (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte MODIFIER_SYMBOL = 27;
+
+  /**
+   * So = Symbol, Other (Informative).
+   *
+   * @since 1.1
+   */
+  public static final byte OTHER_SYMBOL = 28;
+
+  /**
+   * Undefined bidirectional character type. Undefined char values have
+   * undefined directionality in the Unicode specification.
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_UNDEFINED = -1;
+
+  /**
+   * Strong bidirectional character type "L".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = 0;
+
+  /**
+   * Strong bidirectional character type "R".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = 1;
+
+  /**
+   * Strong bidirectional character type "AL".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 2;
+
+  /**
+   * Weak bidirectional character type "EN".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = 3;
+
+  /**
+   * Weak bidirectional character type "ES".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 4;
+
+  /**
+   * Weak bidirectional character type "ET".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 5;
+
+  /**
+   * Weak bidirectional character type "AN".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_ARABIC_NUMBER = 6;
+
+  /**
+   * Weak bidirectional character type "CS".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 7;
+
+  /**
+   * Weak bidirectional character type "NSM".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_NONSPACING_MARK = 8;
+
+  /**
+   * Weak bidirectional character type "BN".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = 9;
+
+  /**
+   * Neutral bidirectional character type "B".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 10;
+
+  /**
+   * Neutral bidirectional character type "S".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = 11;
+
+  /**
+   * Strong bidirectional character type "WS".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_WHITESPACE = 12;
+
+  /**
+   * Neutral bidirectional character type "ON".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_OTHER_NEUTRALS = 13;
+
+  /**
+   * Strong bidirectional character type "LRE".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 14;
+
+  /**
+   * Strong bidirectional character type "LRO".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 15;
+
+  /**
+   * Strong bidirectional character type "RLE".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 16;
+
+  /**
+   * Strong bidirectional character type "RLO".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 17;
+
+  /**
+   * Weak bidirectional character type "PDF".
+   *
+   * @since 1.4
+   */
+  public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18;
+
+  /**
+   * Mask for grabbing the type out of the result of readChar.
+   * @see #readChar(char)
+   */
+  private static final int TYPE_MASK = 0x1F;
+
+  /**
+   * Mask for grabbing the non-breaking space flag out of the result of
+   * readChar.
+   * @see #readChar(char)
+   */
+  private static final int NO_BREAK_MASK = 0x20;
+
+  /**
+   * Mask for grabbing the mirrored directionality flag out of the result
+   * of readChar.
+   * @see #readChar(char)
+   */
+  private static final int MIRROR_MASK = 0x40;
+
+  /**
+   * Min value for supplementary code point.
+   *
+   * @since 1.5
+   */
+  public static final int MIN_SUPPLEMENTARY_CODE_POINT = 0x10000;
+
+  /**
+   * Min value for code point.
+   *
+   * @since 1.5
+   */
+  public static final int MIN_CODE_POINT = 0; 
+ 
+ 
+  /**
+   * Max value for code point.
+   *
+   * @since 1.5
+   */
+  public static final int MAX_CODE_POINT = 0x010ffff;
+
+
+  /**
+   * Minimum high surrogate code in UTF-16 encoding.
+   *
+   * @since 1.5
+   */
+  public static final char MIN_HIGH_SURROGATE = '\ud800';
+
+  /**
+   * Maximum high surrogate code in UTF-16 encoding.
+   *
+   * @since 1.5
+   */
+  public static final char MAX_HIGH_SURROGATE = '\udbff';
+ 
+  /**
+   * Minimum low surrogate code in UTF-16 encoding.
+   *
+   * @since 1.5
+   */
+  public static final char MIN_LOW_SURROGATE = '\udc00';
+
+  /**
+   * Maximum low surrogate code in UTF-16 encoding.
+   *
+   * @since 1.5
+   */
+  public static final char MAX_LOW_SURROGATE = '\udfff';
+
+  /**
+   * Minimum surrogate code in UTF-16 encoding.
+   *
+   * @since 1.5
+   */
+  public static final char MIN_SURROGATE = MIN_HIGH_SURROGATE;
+
+  /**
+   * Maximum low surrogate code in UTF-16 encoding.
+   *
+   * @since 1.5
+   */
+  public static final char MAX_SURROGATE = MAX_LOW_SURROGATE;
+
+  /**
+   * Grabs an attribute offset from the Unicode attribute database. The lower
+   * 5 bits are the character type, the next 2 bits are flags, and the top
+   * 9 bits are the offset into the attribute tables. Note that the top 9
+   * bits are meaningless in this context; they are useful only in the native
+   * code.
+   *
+   * @param ch the character to look up
+   * @return the character's attribute offset and type
+   * @see #TYPE_MASK
+   * @see #NO_BREAK_MASK
+   * @see #MIRROR_MASK
+   */
+  private static native char readChar(char ch);
+
+  /**
+   * Grabs an attribute offset from the Unicode attribute database. The lower
+   * 5 bits are the character type, the next 2 bits are flags, and the top
+   * 9 bits are the offset into the attribute tables. Note that the top 9
+   * bits are meaningless in this context; they are useful only in the native
+   * code.
+   *
+   * @param codePoint the character to look up
+   * @return the character's attribute offset and type
+   * @see #TYPE_MASK
+   * @see #NO_BREAK_MASK
+   * @see #MIRROR_MASK
+   */
+  private static native char readCodePoint(int codePoint);
+
+  /**
+   * Wraps up a character.
+   *
+   * @param value the character to wrap
+   */
+  public Character(char value)
+  {
+    this.value = value;
+  }
+
+  /**
+   * Returns the character which has been wrapped by this class.
+   *
+   * @return the character wrapped
+   */
+  public char charValue()
+  {
+    return value;
+  }
+
+  /**
+   * Returns the numerical value (unsigned) of the wrapped character.
+   * Range of returned values: 0x0000-0xFFFF.
+   *
+   * @return the value of the wrapped character
+   */
+  public int hashCode()
+  {
+    return value;
+  }
+
+  /**
+   * Determines if an object is equal to this object. This is only true for
+   * another Character object wrapping the same value.
+   *
+   * @param o object to compare
+   * @return true if o is a Character with the same value
+   */
+  public boolean equals(Object o)
+  {
+    return o instanceof Character && value == ((Character) o).value;
+  }
+
+  /**
+   * Converts the wrapped character into a String.
+   *
+   * @return a String containing one character -- the wrapped character
+   *         of this instance
+   */
+  public String toString()
+  {
+    // This assumes that String.valueOf(char) can create a single-character
+    // String more efficiently than through the public API.
+    return String.valueOf(value);
+  }
+
+  /**
+   * Returns a String of length 1 representing the specified character.
+   *
+   * @param ch the character to convert
+   * @return a String containing the character
+   * @since 1.4
+   */
+  public static String toString(char ch)
+  {
+    // This assumes that String.valueOf(char) can create a single-character
+    // String more efficiently than through the public API.
+    return String.valueOf(ch);
+  }
+
+  /**
+   * Determines if a character is a Unicode lowercase letter. For example,
+   * <code>'a'</code> is lowercase.
+   * <br>
+   * lowercase = [Ll]
+   *
+   * @param ch character to test
+   * @return true if ch is a Unicode lowercase letter, else false
+   * @see #isUpperCase(char)
+   * @see #isTitleCase(char)
+   * @see #toLowerCase(char)
+   * @see #getType(char)
+   */
+  public static boolean isLowerCase(char ch)
+  {
+    return getType(ch) == LOWERCASE_LETTER;
+  }
+
+  /**
+   * Determines if a character is a Unicode lowercase letter. For example,
+   * <code>'a'</code> is lowercase.  Unlike isLowerCase(char), this method
+   * supports supplementary Unicode code points.
+   * <br>
+   * lowercase = [Ll]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is a Unicode lowercase letter, else false
+   * @see #isUpperCase(int)
+   * @see #isTitleCase(int)
+   * @see #toLowerCase(int)
+   * @see #getType(int)
+   * @since 1.5
+   */
+  public static boolean isLowerCase(int codePoint)
+  {
+    return getType(codePoint) == LOWERCASE_LETTER;
+  }
+
+  /**
+   * Determines if a character is a Unicode uppercase letter. For example,
+   * <code>'A'</code> is uppercase.
+   * <br>
+   * uppercase = [Lu]
+   *
+   * @param ch character to test
+   * @return true if ch is a Unicode uppercase letter, else false
+   * @see #isLowerCase(char)
+   * @see #isTitleCase(char)
+   * @see #toUpperCase(char)
+   * @see #getType(char)
+   */
+  public static boolean isUpperCase(char ch)
+  {
+    return getType(ch) == UPPERCASE_LETTER;
+  }
+
+  /**
+   * Determines if a character is a Unicode uppercase letter. For example,
+   * <code>'A'</code> is uppercase.  Unlike isUpperCase(char), this method
+   * supports supplementary Unicode code points.
+   * <br>
+   * uppercase = [Lu]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is a Unicode uppercase letter, else false
+   * @see #isLowerCase(int)
+   * @see #isTitleCase(int)
+   * @see #toUpperCase(int)
+   * @see #getType(int)
+   * @since 1.5
+   */
+  public static boolean isUpperCase(int codePoint)
+  {
+    return getType(codePoint) == UPPERCASE_LETTER;
+  }
+
+  /**
+   * Determines if a character is a Unicode titlecase letter. For example,
+   * the character "Lj" (Latin capital L with small letter j) is titlecase.
+   * <br>
+   * titlecase = [Lt]
+   *
+   * @param ch character to test
+   * @return true if ch is a Unicode titlecase letter, else false
+   * @see #isLowerCase(char)
+   * @see #isUpperCase(char)
+   * @see #toTitleCase(char)
+   * @see #getType(char)
+   */
+  public static boolean isTitleCase(char ch)
+  {
+    return getType(ch) == TITLECASE_LETTER;
+  }
+
+  /**
+   * Determines if a character is a Unicode titlecase letter. For example,
+   * the character "Lj" (Latin capital L with small letter j) is titlecase.
+   * Unlike isTitleCase(char), this method supports supplementary Unicode
+   * code points.
+   * <br>
+   * titlecase = [Lt]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is a Unicode titlecase letter, else false
+   * @see #isLowerCase(int)
+   * @see #isUpperCase(int)
+   * @see #toTitleCase(int)
+   * @see #getType(int)
+   * @since 1.5
+   */
+  public static boolean isTitleCase(int codePoint)
+  {
+    return getType(codePoint) == TITLECASE_LETTER;
+  }
+
+  /**
+   * Determines if a character is a Unicode decimal digit. For example,
+   * <code>'0'</code> is a digit.
+   * <br>
+   * Unicode decimal digit = [Nd]
+   *
+   * @param ch character to test
+   * @return true if ch is a Unicode decimal digit, else false
+   * @see #digit(char, int)
+   * @see #forDigit(int, int)
+   * @see #getType(char)
+   */
+  public static boolean isDigit(char ch)
+  {
+    return getType(ch) == DECIMAL_DIGIT_NUMBER;
+  }
+
+  /**
+   * Determines if a character is a Unicode decimal digit. For example,
+   * <code>'0'</code> is a digit.  Unlike isDigit(char), this method
+   * supports supplementary Unicode code points.
+   * <br>
+   * Unicode decimal digit = [Nd]
+   *
+   * @param codePoint character to test
+   * @return true if ccodePoint is a Unicode decimal digit, else false
+   * @see #digit(int, int)
+   * @see #forDigit(int, int)
+   * @see #getType(int)
+   * @since 1.5
+   */
+  public static boolean isDigit(int codePoint)
+  {
+    return getType(codePoint) == DECIMAL_DIGIT_NUMBER;
+  }
+
+  /**
+   * Determines if a character is part of the Unicode Standard. This is an
+   * evolving standard, but covers every character in the data file.
+   * <br>
+   * defined = not [Cn]
+   *
+   * @param ch character to test
+   * @return true if ch is a Unicode character, else false
+   * @see #isDigit(char)
+   * @see #isLetter(char)
+   * @see #isLetterOrDigit(char)
+   * @see #isLowerCase(char)
+   * @see #isTitleCase(char)
+   * @see #isUpperCase(char)
+   */
+  public static boolean isDefined(char ch)
+  {
+    return getType(ch) != UNASSIGNED;
+  }
+
+  /**
+   * Determines if a character is part of the Unicode Standard. This is an
+   * evolving standard, but covers every character in the data file.  Unlike
+   * isDefined(char), this method supports supplementary Unicode code points.
+   * <br>
+   * defined = not [Cn]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is a Unicode character, else false
+   * @see #isDigit(int)
+   * @see #isLetter(int)
+   * @see #isLetterOrDigit(int)
+   * @see #isLowerCase(int)
+   * @see #isTitleCase(int)
+   * @see #isUpperCase(int)
+   * @since 1.5
+   */
+  public static boolean isDefined(int codePoint)
+  {
+    return getType(codePoint) != UNASSIGNED;
+  }
+
+  /**
+   * Determines if a character is a Unicode letter. Not all letters have case,
+   * so this may return true when isLowerCase and isUpperCase return false.
+   * <br>
+   * letter = [Lu]|[Ll]|[Lt]|[Lm]|[Lo]
+   *
+   * @param ch character to test
+   * @return true if ch is a Unicode letter, else false
+   * @see #isDigit(char)
+   * @see #isJavaIdentifierStart(char)
+   * @see #isJavaLetter(char)
+   * @see #isJavaLetterOrDigit(char)
+   * @see #isLetterOrDigit(char)
+   * @see #isLowerCase(char)
+   * @see #isTitleCase(char)
+   * @see #isUnicodeIdentifierStart(char)
+   * @see #isUpperCase(char)
+   */
+  public static boolean isLetter(char ch)
+  {
+    return ((1 << getType(ch))
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER))) != 0;
+  }
+
+  /**
+   * Determines if a character is a Unicode letter. Not all letters have case,
+   * so this may return true when isLowerCase and isUpperCase return false.
+   * Unlike isLetter(char), this method supports supplementary Unicode code
+   * points.
+   * <br>
+   * letter = [Lu]|[Ll]|[Lt]|[Lm]|[Lo]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is a Unicode letter, else false
+   * @see #isDigit(int)
+   * @see #isJavaIdentifierStart(int)
+   * @see #isJavaLetter(int)
+   * @see #isJavaLetterOrDigit(int)
+   * @see #isLetterOrDigit(int)
+   * @see #isLowerCase(int)
+   * @see #isTitleCase(int)
+   * @see #isUnicodeIdentifierStart(int)
+   * @see #isUpperCase(int)
+   * @since 1.5
+   */
+  public static boolean isLetter(int codePoint)
+  {
+    return ((1 << getType(codePoint))
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER))) != 0;
+  }
+
+  /**
+   * Determines if a character is a Unicode letter or a Unicode digit. This
+   * is the combination of isLetter and isDigit.
+   * <br>
+   * letter or digit = [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nd]
+   *
+   * @param ch character to test
+   * @return true if ch is a Unicode letter or a Unicode digit, else false
+   * @see #isDigit(char)
+   * @see #isJavaIdentifierPart(char)
+   * @see #isJavaLetter(char)
+   * @see #isJavaLetterOrDigit(char)
+   * @see #isLetter(char)
+   * @see #isUnicodeIdentifierPart(char)
+   */
+  public static boolean isLetterOrDigit(char ch)
+  {
+    return ((1 << getType(ch))
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << DECIMAL_DIGIT_NUMBER))) != 0;
+  }
+
+  /**
+   * Determines if a character is a Unicode letter or a Unicode digit. This
+   * is the combination of isLetter and isDigit.  Unlike isLetterOrDigit(char),
+   * this method supports supplementary Unicode code points.
+   * <br>
+   * letter or digit = [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nd]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is a Unicode letter or a Unicode digit, else false
+   * @see #isDigit(int)
+   * @see #isJavaIdentifierPart(int)
+   * @see #isJavaLetter(int)
+   * @see #isJavaLetterOrDigit(int)
+   * @see #isLetter(int)
+   * @see #isUnicodeIdentifierPart(int)
+   * @since 1.5
+   */
+  public static boolean isLetterOrDigit(int codePoint)
+  {
+    return ((1 << getType(codePoint)
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << DECIMAL_DIGIT_NUMBER))) != 0);
+  }
+
+  /**
+   * Determines if a character can start a Java identifier. This is the
+   * combination of isLetter, any character where getType returns
+   * LETTER_NUMBER, currency symbols (like '$'), and connecting punctuation
+   * (like '_').
+   *
+   * @param ch character to test
+   * @return true if ch can start a Java identifier, else false
+   * @deprecated Replaced by {@link #isJavaIdentifierStart(char)}
+   * @see #isJavaLetterOrDigit(char)
+   * @see #isJavaIdentifierStart(char)
+   * @see #isJavaIdentifierPart(char)
+   * @see #isLetter(char)
+   * @see #isLetterOrDigit(char)
+   * @see #isUnicodeIdentifierStart(char)
+   */
+  public static boolean isJavaLetter(char ch)
+  {
+    return isJavaIdentifierStart(ch);
+  }
+
+  /**
+   * Determines if a character can start a Java identifier. This is the
+   * combination of isLetter, any character where getType returns
+   * LETTER_NUMBER, currency symbols (like '$'), and connecting punctuation
+   * (like '_'). Unlike isJavaIdentifierStart(char), this method supports
+   * supplementary Unicode code points.
+   * <br>
+   * Java identifier start = [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nl]|[Sc]|[Pc]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint can start a Java identifier, else false
+   * @see #isJavaIdentifierPart(int)
+   * @see #isLetter(int)
+   * @see #isUnicodeIdentifierStart(int)
+   * @since 1.5
+   */
+  public static boolean isJavaIdentifierStart(int codePoint)
+  {
+    return ((1 << getType(codePoint))
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << LETTER_NUMBER)
+               | (1 << CURRENCY_SYMBOL)
+               | (1 << CONNECTOR_PUNCTUATION))) != 0;
+  }
+
+  /**
+   * Determines if a character can follow the first letter in
+   * a Java identifier.  This is the combination of isJavaLetter (isLetter,
+   * type of LETTER_NUMBER, currency, connecting punctuation) and digit,
+   * numeric letter (like Roman numerals), combining marks, non-spacing marks,
+   * or isIdentifierIgnorable.
+   *
+   * @param ch character to test
+   * @return true if ch can follow the first letter in a Java identifier
+   * @deprecated Replaced by {@link #isJavaIdentifierPart(char)}
+   * @see #isJavaLetter(char)
+   * @see #isJavaIdentifierStart(char)
+   * @see #isJavaIdentifierPart(char)
+   * @see #isLetter(char)
+   * @see #isLetterOrDigit(char)
+   * @see #isUnicodeIdentifierPart(char)
+   * @see #isIdentifierIgnorable(char)
+   */
+  public static boolean isJavaLetterOrDigit(char ch)
+  {
+    return isJavaIdentifierPart(ch);
+  }
+
+  /**
+   * Determines if a character can start a Java identifier. This is the
+   * combination of isLetter, any character where getType returns
+   * LETTER_NUMBER, currency symbols (like '$'), and connecting punctuation
+   * (like '_').
+   * <br>
+   * Java identifier start = [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nl]|[Sc]|[Pc]
+   *
+   * @param ch character to test
+   * @return true if ch can start a Java identifier, else false
+   * @see #isJavaIdentifierPart(char)
+   * @see #isLetter(char)
+   * @see #isUnicodeIdentifierStart(char)
+   * @since 1.1
+   */
+  public static boolean isJavaIdentifierStart(char ch)
+  {
+    return ((1 << getType(ch))
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << LETTER_NUMBER)
+               | (1 << CURRENCY_SYMBOL)
+               | (1 << CONNECTOR_PUNCTUATION))) != 0;
+  }
+
+  /**
+   * Determines if a character can follow the first letter in
+   * a Java identifier.  This is the combination of isJavaLetter (isLetter,
+   * type of LETTER_NUMBER, currency, connecting punctuation) and digit,
+   * numeric letter (like Roman numerals), combining marks, non-spacing marks,
+   * or isIdentifierIgnorable.
+   * <br>
+   * Java identifier extender =
+   *   [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nl]|[Sc]|[Pc]|[Mn]|[Mc]|[Nd]|[Cf]
+   *   |U+0000-U+0008|U+000E-U+001B|U+007F-U+009F
+   *
+   * @param ch character to test
+   * @return true if ch can follow the first letter in a Java identifier
+   * @see #isIdentifierIgnorable(char)
+   * @see #isJavaIdentifierStart(char)
+   * @see #isLetterOrDigit(char)
+   * @see #isUnicodeIdentifierPart(char)
+   * @since 1.1
+   */
+  public static boolean isJavaIdentifierPart(char ch)
+  {
+    int category = getType(ch);
+    return ((1 << category)
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << NON_SPACING_MARK)
+               | (1 << COMBINING_SPACING_MARK)
+               | (1 << DECIMAL_DIGIT_NUMBER)
+               | (1 << LETTER_NUMBER)
+               | (1 << CURRENCY_SYMBOL)
+               | (1 << CONNECTOR_PUNCTUATION)
+               | (1 << FORMAT))) != 0
+      || (category == CONTROL && isIdentifierIgnorable(ch));
+  }
+
+  /**
+   * Determines if a character can follow the first letter in
+   * a Java identifier.  This is the combination of isJavaLetter (isLetter,
+   * type of LETTER_NUMBER, currency, connecting punctuation) and digit,
+   * numeric letter (like Roman numerals), combining marks, non-spacing marks,
+   * or isIdentifierIgnorable. Unlike isJavaIdentifierPart(char), this method
+   * supports supplementary Unicode code points.
+   * <br>
+   * Java identifier extender =
+   *   [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nl]|[Sc]|[Pc]|[Mn]|[Mc]|[Nd]|[Cf]
+   *   |U+0000-U+0008|U+000E-U+001B|U+007F-U+009F
+   *
+   * @param codePoint character to test
+   * @return true if codePoint can follow the first letter in a Java identifier
+   * @see #isIdentifierIgnorable(int)
+   * @see #isJavaIdentifierStart(int)
+   * @see #isLetterOrDigit(int)
+   * @see #isUnicodeIdentifierPart(int)
+   * @since 1.5
+   */
+  public static boolean isJavaIdentifierPart(int codePoint)
+  {
+    int category = getType(codePoint);
+    return ((1 << category)
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << NON_SPACING_MARK)
+               | (1 << COMBINING_SPACING_MARK)
+               | (1 << DECIMAL_DIGIT_NUMBER)
+               | (1 << LETTER_NUMBER)
+               | (1 << CURRENCY_SYMBOL)
+               | (1 << CONNECTOR_PUNCTUATION)
+               | (1 << FORMAT))) != 0
+      || (category == CONTROL && isIdentifierIgnorable(codePoint));
+  }
+
+  /**
+   * Determines if a character can start a Unicode identifier.  Only
+   * letters can start a Unicode identifier, but this includes characters
+   * in LETTER_NUMBER.
+   * <br>
+   * Unicode identifier start = [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nl]
+   *
+   * @param ch character to test
+   * @return true if ch can start a Unicode identifier, else false
+   * @see #isJavaIdentifierStart(char)
+   * @see #isLetter(char)
+   * @see #isUnicodeIdentifierPart(char)
+   * @since 1.1
+   */
+  public static boolean isUnicodeIdentifierStart(char ch)
+  {
+    return ((1 << getType(ch))
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << LETTER_NUMBER))) != 0;
+  }
+
+  /**
+   * Determines if a character can start a Unicode identifier.  Only
+   * letters can start a Unicode identifier, but this includes characters
+   * in LETTER_NUMBER.  Unlike isUnicodeIdentifierStart(char), this method
+   * supports supplementary Unicode code points.
+   * <br>
+   * Unicode identifier start = [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nl]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint can start a Unicode identifier, else false
+   * @see #isJavaIdentifierStart(int)
+   * @see #isLetter(int)
+   * @see #isUnicodeIdentifierPart(int)
+   * @since 1.5
+   */
+  public static boolean isUnicodeIdentifierStart(int codePoint)
+  {
+    return ((1 << getType(codePoint))
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << LETTER_NUMBER))) != 0;
+  }
+
+  /**
+   * Determines if a character can follow the first letter in
+   * a Unicode identifier. This includes letters, connecting punctuation,
+   * digits, numeric letters, combining marks, non-spacing marks, and
+   * isIdentifierIgnorable.
+   * <br>
+   * Unicode identifier extender =
+   *   [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nl]|[Mn]|[Mc]|[Nd]|[Pc]|[Cf]|
+   *   |U+0000-U+0008|U+000E-U+001B|U+007F-U+009F
+   *
+   * @param ch character to test
+   * @return true if ch can follow the first letter in a Unicode identifier
+   * @see #isIdentifierIgnorable(char)
+   * @see #isJavaIdentifierPart(char)
+   * @see #isLetterOrDigit(char)
+   * @see #isUnicodeIdentifierStart(char)
+   * @since 1.1
+   */
+  public static boolean isUnicodeIdentifierPart(char ch)
+  {
+    int category = getType(ch);
+    return ((1 << category)
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << NON_SPACING_MARK)
+               | (1 << COMBINING_SPACING_MARK)
+               | (1 << DECIMAL_DIGIT_NUMBER)
+               | (1 << LETTER_NUMBER)
+               | (1 << CONNECTOR_PUNCTUATION)
+               | (1 << FORMAT))) != 0
+      || (category == CONTROL && isIdentifierIgnorable(ch));
+  }
+
+  /**
+   * Determines if a character can follow the first letter in
+   * a Unicode identifier. This includes letters, connecting punctuation,
+   * digits, numeric letters, combining marks, non-spacing marks, and
+   * isIdentifierIgnorable.  Unlike isUnicodeIdentifierPart(char), this method
+   * supports supplementary Unicode code points.
+   * <br>
+   * Unicode identifier extender =
+   *   [Lu]|[Ll]|[Lt]|[Lm]|[Lo]|[Nl]|[Mn]|[Mc]|[Nd]|[Pc]|[Cf]|
+   *   |U+0000-U+0008|U+000E-U+001B|U+007F-U+009F
+   *
+   * @param codePoint character to test
+   * @return true if codePoint can follow the first letter in a Unicode 
+   *         identifier
+   * @see #isIdentifierIgnorable(int)
+   * @see #isJavaIdentifierPart(int)
+   * @see #isLetterOrDigit(int)
+   * @see #isUnicodeIdentifierStart(int)
+   * @since 1.5
+   */
+  public static boolean isUnicodeIdentifierPart(int codePoint)
+  {
+    int category = getType(codePoint);
+    return ((1 << category)
+            & ((1 << UPPERCASE_LETTER)
+               | (1 << LOWERCASE_LETTER)
+               | (1 << TITLECASE_LETTER)
+               | (1 << MODIFIER_LETTER)
+               | (1 << OTHER_LETTER)
+               | (1 << NON_SPACING_MARK)
+               | (1 << COMBINING_SPACING_MARK)
+               | (1 << DECIMAL_DIGIT_NUMBER)
+               | (1 << LETTER_NUMBER)
+               | (1 << CONNECTOR_PUNCTUATION)
+               | (1 << FORMAT))) != 0
+      || (category == CONTROL && isIdentifierIgnorable(codePoint));
+  }
+
+  /**
+   * Determines if a character is ignorable in a Unicode identifier. This
+   * includes the non-whitespace ISO control characters (<code>'\u0000'</code>
+   * through <code>'\u0008'</code>, <code>'\u000E'</code> through
+   * <code>'\u001B'</code>, and <code>'\u007F'</code> through
+   * <code>'\u009F'</code>), and FORMAT characters.
+   * <br>
+   * Unicode identifier ignorable = [Cf]|U+0000-U+0008|U+000E-U+001B
+   *    |U+007F-U+009F
+   *
+   * @param ch character to test
+   * @return true if ch is ignorable in a Unicode or Java identifier
+   * @see #isJavaIdentifierPart(char)
+   * @see #isUnicodeIdentifierPart(char)
+   * @since 1.1
+   */
+  public static boolean isIdentifierIgnorable(char ch)
+  {
+    return (ch <= '\u009F' && (ch < '\t' || ch >= '\u007F'
+                               || (ch <= '\u001B' && ch >= '\u000E')))
+      || getType(ch) == FORMAT;
+  }
+
+  /**
+   * Determines if a character is ignorable in a Unicode identifier. This
+   * includes the non-whitespace ISO control characters (<code>'\u0000'</code>
+   * through <code>'\u0008'</code>, <code>'\u000E'</code> through
+   * <code>'\u001B'</code>, and <code>'\u007F'</code> through
+   * <code>'\u009F'</code>), and FORMAT characters.  Unlike 
+   * isIdentifierIgnorable(char), this method supports supplementary Unicode
+   * code points.
+   * <br>
+   * Unicode identifier ignorable = [Cf]|U+0000-U+0008|U+000E-U+001B
+   *    |U+007F-U+009F
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is ignorable in a Unicode or Java identifier
+   * @see #isJavaIdentifierPart(int)
+   * @see #isUnicodeIdentifierPart(int)
+   * @since 1.5
+   */
+  public static boolean isIdentifierIgnorable(int codePoint)
+  {
+    return ((codePoint >= 0 && codePoint <= 0x0008)
+        || (codePoint >= 0x000E && codePoint <= 0x001B)
+        || (codePoint >= 0x007F && codePoint <= 0x009F)
+            || getType(codePoint) == FORMAT);
+  }
+
+  /**
+   * Converts a Unicode character into its lowercase equivalent mapping.
+   * If a mapping does not exist, then the character passed is returned.
+   * Note that isLowerCase(toLowerCase(ch)) does not always return true.
+   *
+   * @param ch character to convert to lowercase
+   * @return lowercase mapping of ch, or ch if lowercase mapping does
+   *         not exist
+   * @see #isLowerCase(char)
+   * @see #isUpperCase(char)
+   * @see #toTitleCase(char)
+   * @see #toUpperCase(char)
+   */
+  public static native char toLowerCase(char ch);
+
+  /**
+   * Converts a Unicode character into its lowercase equivalent mapping.
+   * If a mapping does not exist, then the character passed is returned.
+   * Note that isLowerCase(toLowerCase(codePoint)) does not always return true.
+   * Unlike toLowerCase(char), this method supports supplementary Unicode
+   * code points.
+   *
+   * @param codePoint character to convert to lowercase
+   * @return lowercase mapping of codePoint, or codePoint if lowercase 
+   *         mapping does not exist
+   * @see #isLowerCase(int)
+   * @see #isUpperCase(int)
+   * @see #toTitleCase(int)
+   * @see #toUpperCase(int)
+   * @since 1.5
+   */
+  public static native int toLowerCase(int codePoint);
+
+  /**
+   * Converts a Unicode character into its uppercase equivalent mapping.
+   * If a mapping does not exist, then the character passed is returned.
+   * Note that isUpperCase(toUpperCase(ch)) does not always return true.
+   *
+   * @param ch character to convert to uppercase
+   * @return uppercase mapping of ch, or ch if uppercase mapping does
+   *         not exist
+   * @see #isLowerCase(char)
+   * @see #isUpperCase(char)
+   * @see #toLowerCase(char)
+   * @see #toTitleCase(char)
+   */
+  public static native char toUpperCase(char ch);
+
+  /**
+   * Converts a Unicode character into its uppercase equivalent mapping.
+   * If a mapping does not exist, then the character passed is returned.
+   * Note that isUpperCase(toUpperCase(codePoint)) does not always return true.
+   * Unlike toUpperCase(char), this method supports supplementary 
+   * Unicode code points.
+   *
+   * @param codePoint character to convert to uppercase
+   * @return uppercase mapping of codePoint, or codePoint if uppercase 
+   *         mapping does not exist
+   * @see #isLowerCase(int)
+   * @see #isUpperCase(int)
+   * @see #toLowerCase(int)
+   * @see #toTitleCase(int)
+   * @since 1.5
+   */
+  public static native int toUpperCase(int codePoint);
+
+  /**
+   * Converts a Unicode character into its titlecase equivalent mapping.
+   * If a mapping does not exist, then the character passed is returned.
+   * Note that isTitleCase(toTitleCase(ch)) does not always return true.
+   *
+   * @param ch character to convert to titlecase
+   * @return titlecase mapping of ch, or ch if titlecase mapping does
+   *         not exist
+   * @see #isTitleCase(char)
+   * @see #toLowerCase(char)
+   * @see #toUpperCase(char)
+   */
+  public static native char toTitleCase(char ch);
+
+  /**
+   * Converts a Unicode character into its titlecase equivalent mapping.
+   * If a mapping does not exist, then the character passed is returned.
+   * Note that isTitleCase(toTitleCase(codePoint)) does not always return true.
+   * Unlike toTitleCase(char), this method supports supplementary 
+   * Unicode code points.
+   * 
+   * @param codePoint character to convert to titlecase
+   * @return titlecase mapping of codePoint, or codePoint if titlecase 
+   *         mapping does not exist
+   * @see #isTitleCase(int)
+   * @see #toLowerCase(int)
+   * @see #toUpperCase(int)
+   * @since 1.5
+   */
+  public static native int toTitleCase(int codePoint);
+
+  /**
+   * Converts a character into a digit of the specified radix. If the radix
+   * exceeds MIN_RADIX or MAX_RADIX, or if the result of getNumericValue(ch)
+   * exceeds the radix, or if ch is not a decimal digit or in the case
+   * insensitive set of 'a'-'z', the result is -1.
+   * <br>
+   * character argument boundary = [Nd]|U+0041-U+005A|U+0061-U+007A
+   *    |U+FF21-U+FF3A|U+FF41-U+FF5A
+   *
+   * @param ch character to convert into a digit
+   * @param radix radix in which ch is a digit
+   * @return digit which ch represents in radix, or -1 not a valid digit
+   * @see #MIN_RADIX
+   * @see #MAX_RADIX
+   * @see #forDigit(int, int)
+   * @see #isDigit(char)
+   * @see #getNumericValue(char)
+   */
+  public static native int digit(char ch, int radix);
+
+  /**
+   * Converts a character into a digit of the specified radix. If the radix
+   * exceeds MIN_RADIX or MAX_RADIX, or if the result of getNumericValue(int)
+   * exceeds the radix, or if codePoint is not a decimal digit or in the case
+   * insensitive set of 'a'-'z', the result is -1.  Unlike digit(char, int), 
+   * this method supports supplementary Unicode code points.
+   * <br>
+   * character argument boundary = [Nd]|U+0041-U+005A|U+0061-U+007A
+   *    |U+FF21-U+FF3A|U+FF41-U+FF5A
+   *
+   * @param codePoint character to convert into a digit
+   * @param radix radix in which codePoint is a digit
+   * @return digit which codePoint represents in radix, or -1 not a valid digit
+   * @see #MIN_RADIX
+   * @see #MAX_RADIX
+   * @see #forDigit(int, int)
+   * @see #isDigit(int)
+   * @see #getNumericValue(int)
+   * @since 1.5
+   */
+  public static native int digit(int codePoint, int radix);
+
+  /**
+   * Returns the Unicode numeric value property of a character. For example,
+   * <code>'\\u216C'</code> (the Roman numeral fifty) returns 50.
+   *
+   * <p>This method also returns values for the letters A through Z, (not
+   * specified by Unicode), in these ranges: <code>'\u0041'</code>
+   * through <code>'\u005A'</code> (uppercase); <code>'\u0061'</code>
+   * through <code>'\u007A'</code> (lowercase); and <code>'\uFF21'</code>
+   * through <code>'\uFF3A'</code>, <code>'\uFF41'</code> through
+   * <code>'\uFF5A'</code> (full width variants).
+   *
+   * <p>If the character lacks a numeric value property, -1 is returned.
+   * If the character has a numeric value property which is not representable
+   * as a nonnegative integer, such as a fraction, -2 is returned.
+   *
+   * character argument boundary = [Nd]|[Nl]|[No]|U+0041-U+005A|U+0061-U+007A
+   *    |U+FF21-U+FF3A|U+FF41-U+FF5A
+   *
+   * @param ch character from which the numeric value property will
+   *        be retrieved
+   * @return the numeric value property of ch, or -1 if it does not exist, or
+   *         -2 if it is not representable as a nonnegative integer
+   * @see #forDigit(int, int)
+   * @see #digit(char, int)
+   * @see #isDigit(char)
+   * @since 1.1
+   */
+  public static native int getNumericValue(char ch);
+
+  /**
+   * Returns the Unicode numeric value property of a character. For example,
+   * <code>'\\u216C'</code> (the Roman numeral fifty) returns 50.
+   *
+   * <p>This method also returns values for the letters A through Z, (not
+   * specified by Unicode), in these ranges: <code>'\u0041'</code>
+   * through <code>'\u005A'</code> (uppercase); <code>'\u0061'</code>
+   * through <code>'\u007A'</code> (lowercase); and <code>'\uFF21'</code>
+   * through <code>'\uFF3A'</code>, <code>'\uFF41'</code> through
+   * <code>'\uFF5A'</code> (full width variants).
+   *
+   * <p>If the character lacks a numeric value property, -1 is returned.
+   * If the character has a numeric value property which is not representable
+   * as a nonnegative integer, such as a fraction, -2 is returned.
+   *
+   * Unlike getNumericValue(char), this method supports supplementary Unicode
+   * code points.
+   *
+   * character argument boundary = [Nd]|[Nl]|[No]|U+0041-U+005A|U+0061-U+007A
+   *    |U+FF21-U+FF3A|U+FF41-U+FF5A
+   *
+   * @param codePoint character from which the numeric value property will
+   *        be retrieved
+   * @return the numeric value property of codePoint, or -1 if it does not 
+   *         exist, or -2 if it is not representable as a nonnegative integer
+   * @see #forDigit(int, int)
+   * @see #digit(int, int)
+   * @see #isDigit(int)
+   * @since 1.5
+   */
+  public static native int getNumericValue(int codePoint);
+
+  /**
+   * Determines if a character is a ISO-LATIN-1 space. This is only the five
+   * characters <code>'\t'</code>, <code>'\n'</code>, <code>'\f'</code>,
+   * <code>'\r'</code>, and <code>' '</code>.
+   * <br>
+   * Java space = U+0020|U+0009|U+000A|U+000C|U+000D
+   *
+   * @param ch character to test
+   * @return true if ch is a space, else false
+   * @deprecated Replaced by {@link #isWhitespace(char)}
+   * @see #isSpaceChar(char)
+   * @see #isWhitespace(char)
+   */
+  public static boolean isSpace(char ch)
+  {
+    // Performing the subtraction up front alleviates need to compare longs.
+    return ch-- <= ' ' && ((1 << ch)
+                           & ((1 << (' ' - 1))
+                              | (1 << ('\t' - 1))
+                              | (1 << ('\n' - 1))
+                              | (1 << ('\r' - 1))
+                              | (1 << ('\f' - 1)))) != 0;
+  }
+
+  /**
+   * Determines if a character is a Unicode space character. This includes
+   * SPACE_SEPARATOR, LINE_SEPARATOR, and PARAGRAPH_SEPARATOR.
+   * <br>
+   * Unicode space = [Zs]|[Zp]|[Zl]
+   *
+   * @param ch character to test
+   * @return true if ch is a Unicode space, else false
+   * @see #isWhitespace(char)
+   * @since 1.1
+   */
+  public static boolean isSpaceChar(char ch)
+  {
+    return ((1 << getType(ch))
+            & ((1 << SPACE_SEPARATOR)
+               | (1 << LINE_SEPARATOR)
+               | (1 << PARAGRAPH_SEPARATOR))) != 0;
+  }
+
+  /**
+   * Determines if a character is a Unicode space character. This includes
+   * SPACE_SEPARATOR, LINE_SEPARATOR, and PARAGRAPH_SEPARATOR.  Unlike
+   * isSpaceChar(char), this method supports supplementary Unicode code points.
+   * <br>
+   * Unicode space = [Zs]|[Zp]|[Zl]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is a Unicode space, else false
+   * @see #isWhitespace(int)
+   * @since 1.5
+   */
+  public static boolean isSpaceChar(int codePoint)
+  {
+    return ((1 << getType(codePoint))
+            & ((1 << SPACE_SEPARATOR)
+               | (1 << LINE_SEPARATOR)
+               | (1 << PARAGRAPH_SEPARATOR))) != 0;
+  }
+
+  /**
+   * Determines if a character is Java whitespace. This includes Unicode
+   * space characters (SPACE_SEPARATOR, LINE_SEPARATOR, and
+   * PARAGRAPH_SEPARATOR) except the non-breaking spaces
+   * (<code>'\u00A0'</code>, <code>'\u2007'</code>, and <code>'\u202F'</code>);
+   * and these characters: <code>'\u0009'</code>, <code>'\u000A'</code>,
+   * <code>'\u000B'</code>, <code>'\u000C'</code>, <code>'\u000D'</code>,
+   * <code>'\u001C'</code>, <code>'\u001D'</code>, <code>'\u001E'</code>,
+   * and <code>'\u001F'</code>.
+   * <br>
+   * Java whitespace = ([Zs] not Nb)|[Zl]|[Zp]|U+0009-U+000D|U+001C-U+001F
+   *
+   * @param ch character to test
+   * @return true if ch is Java whitespace, else false
+   * @see #isSpaceChar(char)
+   * @since 1.1
+   */
+  public static boolean isWhitespace(char ch)
+  {
+    int attr = readChar(ch);
+    return ((((1 << (attr & TYPE_MASK))
+              & ((1 << SPACE_SEPARATOR)
+                 | (1 << LINE_SEPARATOR)
+                 | (1 << PARAGRAPH_SEPARATOR))) != 0)
+            && (attr & NO_BREAK_MASK) == 0)
+      || (ch <= '\u001F' && ((1 << ch)
+                             & ((1 << '\t')
+                                | (1 << '\n')
+                                | (1 << '\u000B')
+                                | (1 << '\u000C')
+                                | (1 << '\r')
+                                | (1 << '\u001C')
+                                | (1 << '\u001D')
+                                | (1 << '\u001E')
+                                | (1 << '\u001F'))) != 0);
+  }
+
+  /**
+   * Determines if a character is Java whitespace. This includes Unicode
+   * space characters (SPACE_SEPARATOR, LINE_SEPARATOR, and
+   * PARAGRAPH_SEPARATOR) except the non-breaking spaces
+   * (<code>'\u00A0'</code>, <code>'\u2007'</code>, and <code>'\u202F'</code>);
+   * and these characters: <code>'\u0009'</code>, <code>'\u000A'</code>,
+   * <code>'\u000B'</code>, <code>'\u000C'</code>, <code>'\u000D'</code>,
+   * <code>'\u001C'</code>, <code>'\u001D'</code>, <code>'\u001E'</code>,
+   * and <code>'\u001F'</code>.  Unlike isWhitespace(char), this method
+   * supports supplementary Unicode code points.
+   * <br>
+   * Java whitespace = ([Zs] not Nb)|[Zl]|[Zp]|U+0009-U+000D|U+001C-U+001F
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is Java whitespace, else false
+   * @see #isSpaceChar(int)
+   * @since 1.5
+   */
+  public static boolean isWhitespace(int codePoint)
+  {
+    int plane = codePoint >>> 16;
+    if (plane > 2 && plane != 14)
+      return false;
+    int attr = readCodePoint(codePoint);
+    return ((((1 << (attr & TYPE_MASK))
+              & ((1 << SPACE_SEPARATOR)
+                 | (1 << LINE_SEPARATOR)
+                 | (1 << PARAGRAPH_SEPARATOR))) != 0)
+            && (attr & NO_BREAK_MASK) == 0)
+      || (codePoint <= '\u001F' && ((1 << codePoint)
+                             & ((1 << '\t')
+                                | (1 << '\n')
+                                | (1 << '\u000B')
+                                | (1 << '\u000C')
+                                | (1 << '\r')
+                                | (1 << '\u001C')
+                                | (1 << '\u001D')
+                                | (1 << '\u001E')
+                                | (1 << '\u001F'))) != 0);
+  }
+
+  /**
+   * Determines if a character has the ISO Control property.
+   * <br>
+   * ISO Control = [Cc]
+   *
+   * @param ch character to test
+   * @return true if ch is an ISO Control character, else false
+   * @see #isSpaceChar(char)
+   * @see #isWhitespace(char)
+   * @since 1.1
+   */
+  public static boolean isISOControl(char ch)
+  {
+    return getType(ch) == CONTROL;
+  }
+
+  /**
+   * Determines if a character has the ISO Control property.  Unlike
+   * isISOControl(char), this method supports supplementary unicode
+   * code points.
+   * <br>
+   * ISO Control = [Cc]
+   *
+   * @param codePoint character to test
+   * @return true if codePoint is an ISO Control character, else false
+   * @see #isSpaceChar(int)
+   * @see #isWhitespace(int)
+   * @since 1.5
+   */
+  public static boolean isISOControl(int codePoint)
+  {
+    return getType(codePoint) == CONTROL;
+  }
+
+  /**
+   * Returns the Unicode general category property of a character.
+   *
+   * @param ch character from which the general category property will
+   *        be retrieved
+   * @return the character category property of ch as an integer
+   * @see #UNASSIGNED
+   * @see #UPPERCASE_LETTER
+   * @see #LOWERCASE_LETTER
+   * @see #TITLECASE_LETTER
+   * @see #MODIFIER_LETTER
+   * @see #OTHER_LETTER
+   * @see #NON_SPACING_MARK
+   * @see #ENCLOSING_MARK
+   * @see #COMBINING_SPACING_MARK
+   * @see #DECIMAL_DIGIT_NUMBER
+   * @see #LETTER_NUMBER
+   * @see #OTHER_NUMBER
+   * @see #SPACE_SEPARATOR
+   * @see #LINE_SEPARATOR
+   * @see #PARAGRAPH_SEPARATOR
+   * @see #CONTROL
+   * @see #FORMAT
+   * @see #PRIVATE_USE
+   * @see #SURROGATE
+   * @see #DASH_PUNCTUATION
+   * @see #START_PUNCTUATION
+   * @see #END_PUNCTUATION
+   * @see #CONNECTOR_PUNCTUATION
+   * @see #OTHER_PUNCTUATION
+   * @see #MATH_SYMBOL
+   * @see #CURRENCY_SYMBOL
+   * @see #MODIFIER_SYMBOL
+   * @see #INITIAL_QUOTE_PUNCTUATION
+   * @see #FINAL_QUOTE_PUNCTUATION
+   * @since 1.1
+   */
+  public static native int getType(char ch);
+
+  /**
+   * Returns the Unicode general category property of a character.  Supports
+   * supplementary Unicode code points.
+   *
+   * @param codePoint character from which the general category property will
+   *        be retrieved
+   * @return the character category property of codePoint as an integer
+   * @see #UNASSIGNED
+   * @see #UPPERCASE_LETTER
+   * @see #LOWERCASE_LETTER
+   * @see #TITLECASE_LETTER
+   * @see #MODIFIER_LETTER
+   * @see #OTHER_LETTER
+   * @see #NON_SPACING_MARK
+   * @see #ENCLOSING_MARK
+   * @see #COMBINING_SPACING_MARK
+   * @see #DECIMAL_DIGIT_NUMBER
+   * @see #LETTER_NUMBER
+   * @see #OTHER_NUMBER
+   * @see #SPACE_SEPARATOR
+   * @see #LINE_SEPARATOR
+   * @see #PARAGRAPH_SEPARATOR
+   * @see #CONTROL
+   * @see #FORMAT
+   * @see #PRIVATE_USE
+   * @see #SURROGATE
+   * @see #DASH_PUNCTUATION
+   * @see #START_PUNCTUATION
+   * @see #END_PUNCTUATION
+   * @see #CONNECTOR_PUNCTUATION
+   * @see #OTHER_PUNCTUATION
+   * @see #MATH_SYMBOL
+   * @see #CURRENCY_SYMBOL
+   * @see #MODIFIER_SYMBOL
+   * @see #INITIAL_QUOTE_PUNCTUATION
+   * @see #FINAL_QUOTE_PUNCTUATION
+   * @since 1.5
+   */
+  public static native int getType(int codePoint);
+
+  /**
+   * Converts a digit into a character which represents that digit
+   * in a specified radix. If the radix exceeds MIN_RADIX or MAX_RADIX,
+   * or the digit exceeds the radix, then the null character <code>'\0'</code>
+   * is returned.  Otherwise the return value is in '0'-'9' and 'a'-'z'.
+   * <br>
+   * return value boundary = U+0030-U+0039|U+0061-U+007A
+   *
+   * @param digit digit to be converted into a character
+   * @param radix radix of digit
+   * @return character representing digit in radix, or '\0'
+   * @see #MIN_RADIX
+   * @see #MAX_RADIX
+   * @see #digit(char, int)
+   */
+  public static char forDigit(int digit, int radix)
+  {
+    if (radix < MIN_RADIX || radix > MAX_RADIX
+        || digit < 0 || digit >= radix)
+      return '\0';
+    return (char) (digit < 10 ? ('0' + digit) : ('a' - 10 + digit));
+  }
+
+  /**
+   * Returns the Unicode directionality property of the character. This
+   * is used in the visual ordering of text.
+   *
+   * @param ch the character to look up
+   * @return the directionality constant, or DIRECTIONALITY_UNDEFINED
+   * @see #DIRECTIONALITY_UNDEFINED
+   * @see #DIRECTIONALITY_LEFT_TO_RIGHT
+   * @see #DIRECTIONALITY_RIGHT_TO_LEFT
+   * @see #DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
+   * @see #DIRECTIONALITY_EUROPEAN_NUMBER
+   * @see #DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
+   * @see #DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
+   * @see #DIRECTIONALITY_ARABIC_NUMBER
+   * @see #DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
+   * @see #DIRECTIONALITY_NONSPACING_MARK
+   * @see #DIRECTIONALITY_BOUNDARY_NEUTRAL
+   * @see #DIRECTIONALITY_PARAGRAPH_SEPARATOR
+   * @see #DIRECTIONALITY_SEGMENT_SEPARATOR
+   * @see #DIRECTIONALITY_WHITESPACE
+   * @see #DIRECTIONALITY_OTHER_NEUTRALS
+   * @see #DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
+   * @see #DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
+   * @see #DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
+   * @see #DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
+   * @see #DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
+   * @since 1.4
+   */
+  public static native byte getDirectionality(char ch);
+
+  /**
+   * Returns the Unicode directionality property of the character. This
+   * is used in the visual ordering of text.  Unlike getDirectionality(char),
+   * this method supports supplementary Unicode code points.
+   *
+   * @param codePoint the character to look up
+   * @return the directionality constant, or DIRECTIONALITY_UNDEFINED
+   * @see #DIRECTIONALITY_UNDEFINED
+   * @see #DIRECTIONALITY_LEFT_TO_RIGHT
+   * @see #DIRECTIONALITY_RIGHT_TO_LEFT
+   * @see #DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
+   * @see #DIRECTIONALITY_EUROPEAN_NUMBER
+   * @see #DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
+   * @see #DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
+   * @see #DIRECTIONALITY_ARABIC_NUMBER
+   * @see #DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
+   * @see #DIRECTIONALITY_NONSPACING_MARK
+   * @see #DIRECTIONALITY_BOUNDARY_NEUTRAL
+   * @see #DIRECTIONALITY_PARAGRAPH_SEPARATOR
+   * @see #DIRECTIONALITY_SEGMENT_SEPARATOR
+   * @see #DIRECTIONALITY_WHITESPACE
+   * @see #DIRECTIONALITY_OTHER_NEUTRALS
+   * @see #DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
+   * @see #DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
+   * @see #DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
+   * @see #DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
+   * @see #DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
+   * @since 1.5
+   */
+  public static native byte getDirectionality(int codePoint);
+
+  /**
+   * Determines whether the character is mirrored according to Unicode. For
+   * example, <code>\u0028</code> (LEFT PARENTHESIS) appears as '(' in
+   * left-to-right text, but ')' in right-to-left text.
+   *
+   * @param ch the character to look up
+   * @return true if the character is mirrored
+   * @since 1.4
+   */
+  public static boolean isMirrored(char ch)
+  {
+    return (readChar(ch) & MIRROR_MASK) != 0;
+  }
+
+  /**
+   * Determines whether the character is mirrored according to Unicode. For
+   * example, <code>\u0028</code> (LEFT PARENTHESIS) appears as '(' in
+   * left-to-right text, but ')' in right-to-left text.  Unlike 
+   * isMirrored(char), this method supports supplementary Unicode code points.
+   *
+   * @param codePoint the character to look up
+   * @return true if the character is mirrored
+   * @since 1.5
+   */
+  public static boolean isMirrored(int codePoint)
+  {
+    int plane = codePoint >>> 16;
+    if (plane > 2 && plane != 14)
+      return false;
+    return (readCodePoint(codePoint) & MIRROR_MASK) != 0;
+  }
+
+  /**
+   * Compares another Character to this Character, numerically.
+   *
+   * @param anotherCharacter Character to compare with this Character
+   * @return a negative integer if this Character is less than
+   *         anotherCharacter, zero if this Character is equal, and
+   *         a positive integer if this Character is greater
+   * @throws NullPointerException if anotherCharacter is null
+   * @since 1.2
+   */
+  public int compareTo(Character anotherCharacter)
+  {
+    return value - anotherCharacter.value;
+  }
+
+  /**
+   * Compares an object to this Character.  Assuming the object is a
+   * Character object, this method performs the same comparison as
+   * compareTo(Character).
+   *
+   * @param o object to compare
+   * @return the comparison value
+   * @throws ClassCastException if o is not a Character object
+   * @throws NullPointerException if o is null
+   * @see #compareTo(Character)
+   * @since 1.2
+   */
+  public int compareTo(Object o)
+  {
+    return compareTo((Character) o);
+  }
+
+  /**
+   * Returns an <code>Character</code> object wrapping the value.
+   * In contrast to the <code>Character</code> constructor, this method
+   * will cache some values.  It is used by boxing conversion.
+   *
+   * @param val the value to wrap
+   * @return the <code>Character</code>
+   * 
+   * @since 1.5
+   */
+  public static Character valueOf(char val)
+  {
+    if (val > MAX_CACHE)
+      return new Character(val);
+    synchronized (charCache)
+      {
+    if (charCache[val - MIN_VALUE] == null)
+      charCache[val - MIN_VALUE] = new Character(val);
+    return charCache[val - MIN_VALUE];
+      }
+  }
+
+  /**
+   * Reverse the bytes in val.
+   * @since 1.5
+   */
+  public static char reverseBytes(char val)
+  {
+    return (char) (((val >> 8) & 0xff) | ((val << 8) & 0xff00));
+  }
+
+  /**
+   * Converts a unicode code point to a UTF-16 representation of that
+   * code point.
+   * 
+   * @param codePoint the unicode code point
+   *
+   * @return the UTF-16 representation of that code point
+   *
+   * @throws IllegalArgumentException if the code point is not a valid
+   *         unicode code point
+   *
+   * @since 1.5
+   */
+  public static char[] toChars(int codePoint)
+  {
+    char[] result = new char[charCount(codePoint)];
+    int ignore = toChars(codePoint, result, 0);
+    return result;
+  }
+
+  /**
+   * Converts a unicode code point to its UTF-16 representation.
+   *
+   * @param codePoint the unicode code point
+   * @param dst the target char array
+   * @param dstIndex the start index for the target
+   *
+   * @return number of characters written to <code>dst</code>
+   *
+   * @throws IllegalArgumentException if <code>codePoint</code> is not a
+   *         valid unicode code point
+   * @throws NullPointerException if <code>dst</code> is <code>null</code>
+   * @throws IndexOutOfBoundsException if <code>dstIndex</code> is not valid
+   *         in <code>dst</code> or if the UTF-16 representation does not
+   *         fit into <code>dst</code>
+   *
+   * @since 1.5
+   */
+  public static int toChars(int codePoint, char[] dst, int dstIndex)
+  {
+    if (!isValidCodePoint(codePoint))
+      {
+        throw new IllegalArgumentException("not a valid code point: "
+                                           + codePoint);
+      }
+
+    int result;
+    if (isSupplementaryCodePoint(codePoint))
+      {
+        // Write second char first to cause IndexOutOfBoundsException
+        // immediately.
+        final int cp2 = codePoint - 0x10000;
+        dst[dstIndex + 1] = (char) ((cp2 % 0x400) + (int) MIN_LOW_SURROGATE);
+        dst[dstIndex] = (char) ((cp2 / 0x400) + (int) MIN_HIGH_SURROGATE);
+        result = 2;
+      }
+    else
+      {
+        dst[dstIndex] = (char) codePoint;
+        result = 1; 
+      }
+    return result;
+  }
+
+  /**
+   * Return number of 16-bit characters required to represent the given
+   * code point.
+   *
+   * @param codePoint a unicode code point
+   *
+   * @return 2 if codePoint >= 0x10000, 1 otherwise.
+   *
+   * @since 1.5
+   */
+  public static int charCount(int codePoint)
+  {
+    return 
+      (codePoint >= MIN_SUPPLEMENTARY_CODE_POINT) 
+      ? 2 
+      : 1;
+  }
+
+  /**
+   * Determines whether the specified code point is
+   * in the range 0x10000 .. 0x10FFFF, i.e. the character is within the Unicode
+   * supplementary character range.
+   *
+   * @param codePoint a Unicode code point
+   *
+   * @return <code>true</code> if code point is in supplementary range
+   *
+   * @since 1.5
+   */
+  public static boolean isSupplementaryCodePoint(int codePoint)
+  {
+    return codePoint >= MIN_SUPPLEMENTARY_CODE_POINT
+      && codePoint <= MAX_CODE_POINT;
+  }
+
+  /**
+   * Determines whether the specified code point is
+   * in the range 0x0000 .. 0x10FFFF, i.e. it is a valid Unicode code point.
+   *
+   * @param codePoint a Unicode code point
+   *
+   * @return <code>true</code> if code point is valid
+   *
+   * @since 1.5
+   */
+  public static boolean isValidCodePoint(int codePoint)
+  {
+    return codePoint >= MIN_CODE_POINT && codePoint <= MAX_CODE_POINT;
+  }
+
+  /**
+   * Return true if the given character is a high surrogate.
+   * @param ch the character
+   * @return true if the character is a high surrogate character
+   *
+   * @since 1.5
+   */
+  public static boolean isHighSurrogate(char ch)
+  {
+    return ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE;
+  }
+
+  /**
+   * Return true if the given character is a low surrogate.
+   * @param ch the character
+   * @return true if the character is a low surrogate character
+   *
+   * @since 1.5
+   */
+  public static boolean isLowSurrogate(char ch)
+  {
+    return ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE;
+  }
+
+  /**
+   * Return true if the given characters compose a surrogate pair.
+   * This is true if the first character is a high surrogate and the
+   * second character is a low surrogate.
+   * @param ch1 the first character
+   * @param ch2 the first character
+   * @return true if the characters compose a surrogate pair
+   *
+   * @since 1.5
+   */
+  public static boolean isSurrogatePair(char ch1, char ch2)
+  {
+    return isHighSurrogate(ch1) && isLowSurrogate(ch2);
+  }
+
+  /**
+   * Given a valid surrogate pair, this returns the corresponding
+   * code point.
+   * @param high the high character of the pair
+   * @param low the low character of the pair
+   * @return the corresponding code point
+   *
+   * @since 1.5
+   */
+  public static int toCodePoint(char high, char low)
+  {
+    return ((high - MIN_HIGH_SURROGATE) * 0x400) +
+      (low - MIN_LOW_SURROGATE) + 0x10000;
+  }
+
+  /**
+   * Get the code point at the specified index in the CharSequence.
+   * This is like CharSequence#charAt(int), but if the character is
+   * the start of a surrogate pair, and there is a following
+   * character, and this character completes the pair, then the
+   * corresponding supplementary code point is returned.  Otherwise,
+   * the character at the index is returned.
+   *
+   * @param sequence the CharSequence
+   * @param index the index of the codepoint to get, starting at 0
+   * @return the codepoint at the specified index
+   * @throws IndexOutOfBoundsException if index is negative or >= length()
+   * @since 1.5
+   */
+  public static int codePointAt(CharSequence sequence, int index)
+  {
+    int len = sequence.length();
+    if (index < 0 || index >= len)
+      throw new IndexOutOfBoundsException();
+    char high = sequence.charAt(index);
+    if (! isHighSurrogate(high) || ++index >= len)
+      return high;
+    char low = sequence.charAt(index);
+    if (! isLowSurrogate(low))
+      return high;
+    return toCodePoint(high, low);
+  }
+
+  /**
+   * Get the code point at the specified index in the CharSequence.
+   * If the character is the start of a surrogate pair, and there is a
+   * following character, and this character completes the pair, then
+   * the corresponding supplementary code point is returned.
+   * Otherwise, the character at the index is returned.
+   *
+   * @param chars the character array in which to look
+   * @param index the index of the codepoint to get, starting at 0
+   * @return the codepoint at the specified index
+   * @throws IndexOutOfBoundsException if index is negative or >= length()
+   * @since 1.5
+   */
+  public static int codePointAt(char[] chars, int index)
+  {
+    return codePointAt(chars, index, chars.length);
+  }
+
+  /**
+   * Get the code point at the specified index in the CharSequence.
+   * If the character is the start of a surrogate pair, and there is a
+   * following character within the specified range, and this
+   * character completes the pair, then the corresponding
+   * supplementary code point is returned.  Otherwise, the character
+   * at the index is returned.
+   *
+   * @param chars the character array in which to look
+   * @param index the index of the codepoint to get, starting at 0
+   * @param limit the limit past which characters should not be examined
+   * @return the codepoint at the specified index
+   * @throws IndexOutOfBoundsException if index is negative or >=
+   * limit, or if limit is negative or >= the length of the array
+   * @since 1.5
+   */
+  public static int codePointAt(char[] chars, int index, int limit)
+  {
+    if (index < 0 || index >= limit || limit < 0 || limit >= chars.length)
+      throw new IndexOutOfBoundsException();
+    char high = chars[index];
+    if (! isHighSurrogate(high) || ++index >= limit)
+      return high;
+    char low = chars[index];
+    if (! isLowSurrogate(low))
+      return high;
+    return toCodePoint(high, low);
+  }
+
+  /**
+   * Get the code point before the specified index.  This is like
+   * #codePointAt(char[], int), but checks the characters at
+   * <code>index-1</code> and <code>index-2</code> to see if they form
+   * a supplementary code point.  If they do not, the character at
+   * <code>index-1</code> is returned.
+   *
+   * @param chars the character array
+   * @param index the index just past the codepoint to get, starting at 0
+   * @return the codepoint at the specified index
+   * @throws IndexOutOfBoundsException if index is negative or >= length()
+   * @since 1.5
+   */
+  public static int codePointBefore(char[] chars, int index)
+  {
+    return codePointBefore(chars, index, 1);
+  }
+
+  /**
+   * Get the code point before the specified index.  This is like
+   * #codePointAt(char[], int), but checks the characters at
+   * <code>index-1</code> and <code>index-2</code> to see if they form
+   * a supplementary code point.  If they do not, the character at
+   * <code>index-1</code> is returned.  The start parameter is used to
+   * limit the range of the array which may be examined.
+   *
+   * @param chars the character array
+   * @param index the index just past the codepoint to get, starting at 0
+   * @param start the index before which characters should not be examined
+   * @return the codepoint at the specified index
+   * @throws IndexOutOfBoundsException if index is > start or >
+   * the length of the array, or if limit is negative or >= the
+   * length of the array
+   * @since 1.5
+   */
+  public static int codePointBefore(char[] chars, int index, int start)
+  {
+    if (index < start || index > chars.length
+	|| start < 0 || start >= chars.length)
+      throw new IndexOutOfBoundsException();
+    --index;
+    char low = chars[index];
+    if (! isLowSurrogate(low) || --index < start)
+      return low;
+    char high = chars[index];
+    if (! isHighSurrogate(high))
+      return low;
+    return toCodePoint(high, low);
+  }
+
+  /**
+   * Get the code point before the specified index.  This is like
+   * #codePointAt(CharSequence, int), but checks the characters at
+   * <code>index-1</code> and <code>index-2</code> to see if they form
+   * a supplementary code point.  If they do not, the character at
+   * <code>index-1</code> is returned.
+   *
+   * @param sequence the CharSequence
+   * @param index the index just past the codepoint to get, starting at 0
+   * @return the codepoint at the specified index
+   * @throws IndexOutOfBoundsException if index is negative or >= length()
+   * @since 1.5
+   */
+  public static int codePointBefore(CharSequence sequence, int index)
+  {
+    int len = sequence.length();
+    if (index < 1 || index > len)
+      throw new IndexOutOfBoundsException();
+    --index;
+    char low = sequence.charAt(index);
+    if (! isLowSurrogate(low) || --index < 0)
+      return low;
+    char high = sequence.charAt(index);
+    if (! isHighSurrogate(high))
+      return low;
+    return toCodePoint(high, low);
+  }
+} // class Character

Added: llvm-gcc-4.2/trunk/libjava/java/lang/Class.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/Class.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/Class.h (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/Class.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,667 @@
+// Class.h - Header file for java.lang.Class.  -*- c++ -*-
+
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+// Written primary using compiler source and Class.java as guides.
+#ifndef __JAVA_LANG_CLASS_H__
+#define __JAVA_LANG_CLASS_H__
+
+#pragma interface
+
+#include <stddef.h>
+#include <java/lang/Object.h>
+#include <java/lang/String.h>
+#include <java/net/URL.h>
+#include <java/lang/reflect/Modifier.h>
+#include <java/security/ProtectionDomain.h>
+#include <java/lang/Package.h>
+
+// Avoid including SystemClassLoader.h.
+extern "Java"
+{
+  namespace gnu
+  {
+    namespace gcj
+    {
+      namespace runtime
+      {
+        class SystemClassLoader;
+      }
+    }
+  }
+}
+
+// We declare these here to avoid including gcj/cni.h.
+extern "C" void _Jv_InitClass (jclass klass);
+extern "C" jclass _Jv_NewClassFromInitializer 
+   (const char *class_initializer);
+extern "C" void _Jv_RegisterNewClasses (char **classes);
+extern "C" void _Jv_RegisterClasses (const jclass *classes);
+extern "C" void _Jv_RegisterClasses_Counted (const jclass *classes,
+					     size_t count);
+
+// This must be predefined with "C" linkage.
+extern "C" void *_Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface, 
+                                               int meth_idx);
+extern "C" void *_Jv_ResolvePoolEntry (jclass this_class, jint index);
+
+// These are the possible values for the `state' field of the class
+// structure.  Note that ordering is important here.  Whenever the
+// state changes, one should notify all waiters of this class.
+enum
+{
+  JV_STATE_NOTHING = 0,		// Set by compiler.
+
+  JV_STATE_PRELOADING = 1,	// Can do _Jv_FindClass.
+
+  // There is an invariant through libgcj that a class will always be
+  // at a state greater than or equal to JV_STATE_LOADING when it is
+  // returned by a class loader to user code.  Hence, defineclass.cc
+  // installs supers before returning a class, C++-ABI-compiled
+  // classes are created with supers installed, and BC-ABI-compiled
+  // classes are linked to this state before being returned by their
+  // class loader.
+  JV_STATE_LOADING = 3,		// Has super installed.
+  JV_STATE_READ = 4,		// Has been completely defined.
+  JV_STATE_LOADED = 5,		// Has Miranda methods defined.
+
+  JV_STATE_COMPILED = 6,	// This was a compiled class.
+
+  JV_STATE_PREPARED = 7,	// Layout & static init done.
+  JV_STATE_LINKED = 9,		// Strings interned.
+
+  JV_STATE_IN_PROGRESS = 10,	// <clinit> running.
+
+  JV_STATE_ERROR = 12,
+
+  JV_STATE_PHANTOM = 13,	// Bytecode is missing. In many cases we can
+                                // work around that. If not, throw a
+                                // NoClassDefFoundError.
+
+  JV_STATE_DONE = 14,		// Must be last.
+
+
+};
+
+struct _Jv_Field;
+struct _Jv_VTable;
+union _Jv_word;
+struct _Jv_ArrayVTable;
+class _Jv_Linker;
+class _Jv_ExecutionEngine;
+class _Jv_CompiledEngine;
+class _Jv_IndirectCompiledEngine;
+class _Jv_InterpreterEngine;
+
+#ifdef INTERPRETER
+class _Jv_ClassReader;
+class _Jv_InterpClass;
+class _Jv_InterpMethod;
+#endif
+
+struct _Jv_Constants
+{
+  jint size;
+  jbyte *tags;
+  _Jv_word *data;
+};
+
+struct _Jv_Method
+{
+  // Method name.
+  _Jv_Utf8Const *name;
+  // Method signature.
+  _Jv_Utf8Const *signature;
+  // Access flags.
+  _Jv_ushort accflags;
+  // Method's index in the vtable.
+  _Jv_ushort index;
+  // Pointer to underlying function.
+  void *ncode;
+  // NULL-terminated list of exception class names; can be NULL if
+  // there are none such.
+  _Jv_Utf8Const **throws;
+
+  _Jv_Method *getNextMethod ()
+  { return this + 1; }
+};
+
+// The table used to resolve interface calls.
+struct _Jv_IDispatchTable
+{
+  // Index into interface's ioffsets.
+  jshort iindex;
+  jshort itable_length;
+  // Class Interface dispatch table.
+  void *itable[0];
+};
+
+// Used by _Jv_Linker::get_interfaces ()
+struct _Jv_ifaces
+{
+  jclass *list;
+  jshort len;
+  jshort count;
+};
+
+struct _Jv_MethodSymbol
+{
+  _Jv_Utf8Const *class_name;
+  _Jv_Utf8Const *name;
+  _Jv_Utf8Const *signature;
+};
+
+struct _Jv_OffsetTable
+{
+  jint state;
+  jint offsets[];
+};
+
+struct _Jv_AddressTable
+{
+  jint state;
+  void *addresses[];
+};
+
+struct _Jv_CatchClass
+{
+  java::lang::Class **address;
+  _Jv_Utf8Const *classname;
+};
+
+// Possible values for the assertion_code field in the type assertion table.
+enum
+{
+  JV_ASSERT_END_OF_TABLE = 0,
+  JV_ASSERT_TYPES_COMPATIBLE = 1,
+  JV_ASSERT_IS_INSTANTIABLE = 2
+};
+
+// Entry in the type assertion table, used to validate type constraints
+// for binary compatibility.
+struct _Jv_TypeAssertion
+{
+  jint assertion_code;
+  _Jv_Utf8Const *op1;
+  _Jv_Utf8Const *op2;
+};
+
+#define JV_PRIMITIVE_VTABLE ((_Jv_VTable *) -1)
+
+#define JV_CLASS(Obj) ((jclass) (*(_Jv_VTable **) Obj)->clas)
+
+// Forward declarations for friends of java::lang::Class
+
+// Friend functions implemented in natClass.cc.
+_Jv_Method *_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
+				_Jv_Utf8Const *signature);
+jboolean _Jv_IsAssignableFrom (jclass, jclass);
+jboolean _Jv_IsAssignableFromSlow (jclass, jclass);
+jboolean _Jv_InterfaceAssignableFrom (jclass, jclass);
+
+_Jv_Method* _Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *, 
+				      _Jv_Utf8Const*, jclass * = NULL);
+jfieldID JvGetFirstInstanceField (jclass);
+jint JvNumInstanceFields (jclass);
+jfieldID JvGetFirstStaticField (jclass);
+jint JvNumStaticFields (jclass);
+
+jobject _Jv_AllocObject (jclass);
+void *_Jv_AllocObj (jint, jclass);
+void *_Jv_AllocPtrFreeObj (jint, jclass);
+void *_Jv_AllocArray (jint, jclass);
+
+bool _Jv_getInterfaceMethod(jclass, jclass&, int&, 
+			    const _Jv_Utf8Const*,
+			    const _Jv_Utf8Const*);
+
+jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv *, jclass, jfieldID,
+				  jboolean);
+jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID,
+				   jboolean);
+jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);
+
+jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);
+jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);
+jint JvNumMethods (jclass);
+jmethodID JvGetFirstMethod (jclass);
+_Jv_Utf8Const *_Jv_GetClassNameUtf8 (jclass);
+
+#ifdef INTERPRETER
+// Finds a desired interpreter method in the given class or NULL if not found
+class _Jv_MethodBase;
+_Jv_MethodBase *_Jv_FindInterpreterMethod (jclass, jmethodID);
+#endif
+
+// Friend classes and functions to implement the ClassLoader
+class java::lang::ClassLoader;
+class java::lang::VMClassLoader;
+
+class java::io::ObjectOutputStream;
+class java::io::ObjectInputStream;
+class java::io::ObjectStreamClass;
+
+void _Jv_RegisterClassHookDefault (jclass klass);
+void _Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
+void _Jv_UnregisterInitiatingLoader (jclass,java::lang::ClassLoader*);
+void _Jv_UnregisterClass (jclass);
+jclass _Jv_FindClassNoException (_Jv_Utf8Const *name,
+		      java::lang::ClassLoader *loader);
+jclass _Jv_FindClass (_Jv_Utf8Const *name,
+		      java::lang::ClassLoader *loader);
+jclass _Jv_FindClassInCache (_Jv_Utf8Const *name);
+jclass _Jv_PopClass (void);
+void _Jv_PushClass (jclass k);
+void _Jv_NewArrayClass (jclass element,
+			java::lang::ClassLoader *loader,
+			_Jv_VTable *array_vtable = 0);
+jclass _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass,
+		     java::lang::ClassLoader *loader);
+void _Jv_InitNewClassFields (jclass klass);
+
+// Friend functions and classes in prims.cc
+void _Jv_InitPrimClass (jclass, const char *, char, int);
+jstring _Jv_GetMethodString (jclass, _Jv_Method *, jclass = NULL);
+
+jboolean _Jv_CheckAccess (jclass self_klass, jclass other_klass,
+			  jint flags);
+jclass _Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader);
+
+jboolean _Jv_IsInterpretedClass (jclass);
+jboolean _Jv_IsBinaryCompatibilityABI (jclass);
+
+jboolean _Jv_IsPhantomClass (jclass);
+
+void _Jv_CopyClassesToSystemLoader (gnu::gcj::runtime::SystemClassLoader *);
+
+#ifdef INTERPRETER
+void _Jv_InitField (jobject, jclass, int);
+#endif
+
+class _Jv_StackTrace;
+class _Jv_BytecodeVerifier;
+class java::io::VMObjectStreamClass;
+
+void _Jv_sharedlib_register_hook (jclass klass);
+
+
+class java::lang::Class : public java::lang::Object
+{
+public:
+  static jclass forName (jstring className, jboolean initialize, 
+			 java::lang::ClassLoader *loader);
+  static jclass forName (jstring className);
+  JArray<jclass> *getClasses (void);
+
+  java::lang::ClassLoader *getClassLoader (void);
+private:
+  java::lang::ClassLoader *getClassLoader (jclass caller);
+public:
+  // This is an internal method that circumvents the usual security
+  // checks when getting the class loader.
+  java::lang::ClassLoader *getClassLoaderInternal (void)
+  {
+    return loader;
+  }
+
+  java::lang::reflect::Constructor *getConstructor (JArray<jclass> *);
+  JArray<java::lang::reflect::Constructor *> *getConstructors (void);
+  java::lang::reflect::Constructor *getDeclaredConstructor (JArray<jclass> *);
+  JArray<java::lang::reflect::Constructor *> *getDeclaredConstructors (jboolean);
+  java::lang::reflect::Field *getDeclaredField (jstring);
+  JArray<java::lang::reflect::Field *> *getDeclaredFields ();
+  JArray<java::lang::reflect::Field *> *getDeclaredFields (jboolean);
+  java::lang::reflect::Method *getDeclaredMethod (jstring, JArray<jclass> *);
+  JArray<java::lang::reflect::Method *> *getDeclaredMethods (void);
+
+  JArray<jclass> *getDeclaredClasses (void);
+  JArray<jclass> *getDeclaredClasses (jboolean);
+  jclass getDeclaringClass (void);
+
+  java::lang::reflect::Field *getField (jstring);
+private:
+  JArray<java::lang::reflect::Field *> internalGetFields ();
+  java::lang::reflect::Field *getField (jstring, jint);
+  jint _getMethods (JArray<java::lang::reflect::Method *> *result,
+		    jint offset);
+  java::lang::reflect::Field *getPrivateField (jstring);
+  java::lang::reflect::Method *getPrivateMethod (jstring, JArray<jclass> *);
+  java::security::ProtectionDomain *getProtectionDomain0 ();
+
+  java::lang::reflect::Method *_getMethod (jstring, JArray<jclass> *);
+  java::lang::reflect::Method *_getDeclaredMethod (jstring, JArray<jclass> *);
+
+public:
+  JArray<java::lang::reflect::Field *> *getFields (void);
+
+  JArray<jclass> *getInterfaces (void);
+
+  void getSignature (java::lang::StringBuffer *buffer);
+  static jstring getSignature (JArray<jclass> *, jboolean is_constructor);
+  JArray<java::lang::reflect::Method *> *getMethods (void);
+
+  inline jint getModifiers (void)
+  {
+    return accflags & java::lang::reflect::Modifier::ALL_FLAGS;
+  }
+
+  jstring getName (void);
+
+  java::net::URL        *getResource (jstring resourceName);
+  java::io::InputStream *getResourceAsStream (jstring resourceName);
+  JArray<jobject> *getSigners (void);
+  void setSigners(JArray<jobject> *);
+
+  inline jclass getSuperclass (void)
+  {
+    return superclass;
+  }
+
+  inline jclass getInterface (jint n)
+  {
+    return interfaces[n];
+  }
+
+  inline jboolean isArray (void)
+    {
+      return name->first() == '[';
+    }
+
+  inline jclass getComponentType (void)
+    {
+      return isArray () ? element_type : 0;
+    }
+
+  jboolean isAssignableFrom (jclass cls);
+  jboolean isInstance (jobject obj);
+
+  inline jboolean isInterface (void)
+  {
+    return (accflags & java::lang::reflect::Modifier::INTERFACE) != 0;
+  }
+  
+  inline jboolean isPrimitive (void)
+    {
+      return vtable == JV_PRIMITIVE_VTABLE;
+    }
+
+  jobject newInstance (void);
+  java::security::ProtectionDomain *getProtectionDomain (void);
+  java::lang::Package *getPackage (void);
+  jstring toString (void);
+  jboolean desiredAssertionStatus (void);
+
+  JArray<java::lang::reflect::TypeVariable *> *getTypeParameters (void);
+
+  java::lang::Class *getEnclosingClass (void);
+  java::lang::reflect::Constructor *getEnclosingConstructor (void);
+  java::lang::reflect::Method *getEnclosingMethod (void);
+  jboolean isEnum (void);
+
+  // FIXME: this probably shouldn't be public.
+  jint size (void)
+  {
+    return size_in_bytes;
+  }
+
+  // The index of the first method we declare ourself (as opposed to
+  // inheriting).
+  inline jint firstMethodIndex (void)
+  {
+    return vtable_method_count - method_count;
+  }
+    
+  // finalization
+  void finalize ();
+
+  // This constructor is used to create Class object for the primitive
+  // types. See prims.cc.
+  Class ();
+
+  static java::lang::Class class$;
+
+private:   
+
+  void memberAccessCheck (jint flags);
+
+  void initializeClass (void);
+
+  static jstring getPackagePortion (jstring);
+
+  void set_state (jint nstate)
+  {
+    state = nstate;
+    notifyAll ();
+  }
+
+  // Friend functions implemented in natClass.cc.
+  friend _Jv_Method *::_Jv_GetMethodLocal (jclass klass, _Jv_Utf8Const *name,
+					   _Jv_Utf8Const *signature);
+  friend jboolean (::_Jv_IsAssignableFrom) (jclass, jclass);
+  friend jboolean (::_Jv_IsAssignableFromSlow) (jclass, jclass);
+  friend jboolean (::_Jv_InterfaceAssignableFrom) (jclass, jclass);
+  friend void *::_Jv_LookupInterfaceMethodIdx (jclass klass, jclass iface, 
+					       int method_idx);
+
+  friend void ::_Jv_InitClass (jclass klass);
+  friend java::lang::Class* ::_Jv_NewClassFromInitializer (const char *class_initializer);
+  friend void _Jv_RegisterNewClasses (void **classes);
+
+  friend _Jv_Method* ::_Jv_LookupDeclaredMethod (jclass, _Jv_Utf8Const *, 
+						 _Jv_Utf8Const*, jclass *);
+  friend jfieldID (::JvGetFirstInstanceField) (jclass);
+  friend jint (::JvNumInstanceFields) (jclass);
+  friend jfieldID (::JvGetFirstStaticField) (jclass);
+  friend jint (::JvNumStaticFields) (jclass);
+
+  friend jobject (::_Jv_AllocObject) (jclass);
+  friend void *::_Jv_AllocObj (jint, jclass);
+  friend void *::_Jv_AllocPtrFreeObj (jint, jclass);
+  friend void *::_Jv_AllocArray (jint, jclass);
+
+  friend jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv *, jclass, jfieldID,
+					       jboolean);
+  friend jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID,
+						jboolean);
+  friend jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *);
+
+  friend jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *);
+  friend jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *);
+  friend jint (::JvNumMethods) (jclass);
+  friend jmethodID (::JvGetFirstMethod) (jclass);
+  friend _Jv_Utf8Const *::_Jv_GetClassNameUtf8 (jclass);
+#ifdef INTERPRETER
+  friend _Jv_MethodBase *(::_Jv_FindInterpreterMethod) (jclass klass,
+							jmethodID desired_method);
+#endif
+
+  // Friends classes and functions to implement the ClassLoader
+  friend class java::lang::ClassLoader;
+  friend class java::lang::VMClassLoader;
+
+  friend class java::io::ObjectOutputStream;
+  friend class java::io::ObjectInputStream;
+  friend class java::io::ObjectStreamClass;
+
+  friend void ::_Jv_RegisterClasses (const jclass *classes);
+  friend void ::_Jv_RegisterClasses_Counted (const jclass *classes, 
+					     size_t count);
+  friend void ::_Jv_RegisterClassHookDefault (jclass klass);
+  friend void ::_Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
+  friend void ::_Jv_UnregisterInitiatingLoader (jclass,java::lang::ClassLoader*);
+  friend void ::_Jv_UnregisterClass (jclass);
+  friend jclass (::_Jv_FindClassNoException) (_Jv_Utf8Const *name,
+				   java::lang::ClassLoader *loader);
+  friend jclass (::_Jv_FindClass) (_Jv_Utf8Const *name,
+				   java::lang::ClassLoader *loader);
+  friend jclass (::_Jv_FindClassInCache) (_Jv_Utf8Const *name);
+  friend jclass (::_Jv_PopClass) (void);
+  friend void ::_Jv_PushClass (jclass k);
+  friend void ::_Jv_NewArrayClass (jclass element,
+				   java::lang::ClassLoader *loader,
+				   _Jv_VTable *array_vtable);
+  friend jclass (::_Jv_NewClass) (_Jv_Utf8Const *name, jclass superclass,
+				  java::lang::ClassLoader *loader);
+  friend void ::_Jv_InitNewClassFields (jclass klass);
+
+  // in prims.cc
+  friend void ::_Jv_InitPrimClass (jclass, const char *, char, int);
+
+  friend jstring (::_Jv_GetMethodString) (jclass, _Jv_Method *, jclass);
+
+  friend jboolean (::_Jv_CheckAccess) (jclass self_klass, jclass other_klass,
+				   jint flags);
+  
+  friend bool (::_Jv_getInterfaceMethod) (jclass, jclass&, int&, 
+					  const _Jv_Utf8Const*,
+					  const _Jv_Utf8Const*);
+
+  friend jclass (::_Jv_GetArrayClass) (jclass klass,
+				       java::lang::ClassLoader *loader);
+
+  friend jboolean (::_Jv_IsInterpretedClass) (jclass);
+  friend jboolean (::_Jv_IsBinaryCompatibilityABI) (jclass);
+
+  friend jboolean (::_Jv_IsPhantomClass) (jclass);
+
+#ifdef INTERPRETER
+  friend void ::_Jv_InitField (jobject, jclass, int);
+
+  friend class ::_Jv_ClassReader;	
+  friend class ::_Jv_InterpClass;
+  friend class ::_Jv_InterpMethod;
+#endif
+  friend class ::_Jv_StackTrace;
+
+#ifdef JV_MARKOBJ_DECL
+  friend JV_MARKOBJ_DECL;
+#endif
+
+  friend class ::_Jv_BytecodeVerifier;
+  friend class java::io::VMObjectStreamClass;
+
+  friend class ::_Jv_Linker;
+  friend class ::_Jv_ExecutionEngine;
+  friend class ::_Jv_CompiledEngine;
+  friend class ::_Jv_IndirectCompiledEngine;
+  friend class ::_Jv_InterpreterEngine;
+
+  friend void ::_Jv_sharedlib_register_hook (jclass klass);
+
+  friend void *::_Jv_ResolvePoolEntry (jclass this_class, jint index);
+
+  friend void ::_Jv_CopyClassesToSystemLoader (gnu::gcj::runtime::SystemClassLoader *);
+
+  // Chain for class pool.  This also doubles as the ABI version
+  // number.  It is only used for this purpose at class registration
+  // time, and only for precompiled classes.
+  jclass next_or_version;
+  // Name of class.
+  _Jv_Utf8Const *name;
+  // Access flags for class.
+  _Jv_ushort accflags;
+  // The superclass, or null for Object.
+  jclass superclass;
+  // Class constants.
+  _Jv_Constants constants;
+  // Methods.  If this is an array class, then this field holds a
+  // pointer to the element type.
+  union
+  {
+    _Jv_Method *methods;
+    jclass element_type;
+  };
+  // Number of methods.  If this class is primitive, this holds the
+  // character used to represent this type in a signature.
+  jshort method_count;
+  // Number of methods in the vtable.
+  jshort vtable_method_count;
+  // The fields.
+  _Jv_Field *fields;
+  // Size of instance fields, in bytes.
+  jint size_in_bytes;
+  // Total number of fields (instance and static).
+  jshort field_count;
+  // Number of static fields.
+  jshort static_field_count;
+  // The vtbl for all objects of this class.
+  _Jv_VTable *vtable;
+  // Virtual method offset table.
+  _Jv_OffsetTable *otable;
+  // Offset table symbols.
+  _Jv_MethodSymbol *otable_syms;
+  // Address table
+  _Jv_AddressTable *atable;
+  _Jv_MethodSymbol *atable_syms;
+  // Interface table
+  _Jv_AddressTable *itable;
+  _Jv_MethodSymbol *itable_syms;
+  _Jv_CatchClass *catch_classes;
+  // Interfaces implemented by this class.
+  jclass *interfaces;
+  // The class loader for this class.
+  java::lang::ClassLoader *loader;
+  // Number of interfaces.
+  jshort interface_count;
+  // State of this class.
+  jbyte state;
+  // The thread which has locked this class.  Used during class
+  // initialization.
+  java::lang::Thread *thread;
+  // How many levels of "extends" this class is removed from Object.
+  jshort depth;
+  // Vector of this class's superclasses, ordered by decreasing depth.
+  jclass *ancestors;
+  // In a regular class, this field points to the Class Interface Dispatch 
+  // Table. In an interface, it points to the ioffsets table.
+  union 
+  {
+    _Jv_IDispatchTable *idt;
+    jshort *ioffsets;
+  };
+  // Pointer to the class that represents an array of this class.
+  jclass arrayclass;
+  // Security Domain to which this class belongs (or null).
+  java::security::ProtectionDomain *protectionDomain;
+  // Pointer to the type assertion table for this class.
+  _Jv_TypeAssertion *assertion_table;
+  // Signers of this class (or null).
+  JArray<jobject> *hack_signers;
+  // Used by Jv_PopClass and _Jv_PushClass to communicate with StackTrace.
+  jclass chain;
+  // Additional data, specific to the generator (JIT, native,
+  // interpreter) of this class.
+  void *aux_info;
+  // Execution engine.
+  _Jv_ExecutionEngine *engine;
+};
+
+// Inline functions that are friends of java::lang::Class
+
+inline void _Jv_InitClass (jclass klass)
+{
+  if (__builtin_expect (klass->state == JV_STATE_DONE, true))
+    return;
+  klass->initializeClass ();  
+}
+
+// Return array class corresponding to element type KLASS, creating it if
+// necessary.
+inline jclass
+_Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader)
+{
+  extern void _Jv_NewArrayClass (jclass element,
+				 java::lang::ClassLoader *loader,
+				 _Jv_VTable *array_vtable = 0);
+  if (__builtin_expect (!klass->arrayclass, false))
+    _Jv_NewArrayClass (klass, loader);
+  return klass->arrayclass;
+}
+
+#endif /* __JAVA_LANG_CLASS_H__ */

Added: llvm-gcc-4.2/trunk/libjava/java/lang/Class.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/Class.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/Class.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/Class.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1032 @@
+/* Class.java -- Representation of a Java class.
+   Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang;
+
+import java.io.InputStream;
+import java.io.Serializable;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.GenericDeclaration;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.net.URL;
+import java.security.ProtectionDomain;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+
+/**
+ * A Class represents a Java type.  There will never be multiple Class
+ * objects with identical names and ClassLoaders. Primitive types, array
+ * types, and void also have a Class object.
+ *
+ * <p>Arrays with identical type and number of dimensions share the same class.
+ * The array class ClassLoader is the same as the ClassLoader of the element
+ * type of the array (which can be null to indicate the bootstrap classloader).
+ * The name of an array class is <code>[<signature format>;</code>.
+ * <p> For example,
+ * String[]'s class is <code>[Ljava.lang.String;</code>. boolean, byte,
+ * short, char, int, long, float and double have the "type name" of
+ * Z,B,S,C,I,J,F,D for the purposes of array classes.  If it's a
+ * multidimensioned array, the same principle applies:
+ * <code>int[][][]</code> == <code>[[[I</code>.
+ *
+ * <p>There is no public constructor - Class objects are obtained only through
+ * the virtual machine, as defined in ClassLoaders.
+ *
+ * @serialData Class objects serialize specially:
+ * <code>TC_CLASS ClassDescriptor</code>. For more serialization information,
+ * see {@link ObjectStreamClass}.
+ *
+ * @author John Keiser
+ * @author Eric Blake (ebb9 at email.byu.edu)
+ * @author Tom Tromey (tromey at cygnus.com)
+ * @since 1.0
+ * @see ClassLoader
+ */
+public final class Class implements Type, GenericDeclaration, Serializable
+{
+  /**
+   * Class is non-instantiable from Java code; only the VM can create
+   * instances of this class.
+   */
+  private Class ()
+  {
+  }
+
+  // Initialize the class.
+  private native void initializeClass ();
+
+  // finalization
+  protected native void finalize () throws Throwable;
+
+  /**
+   * Use the classloader of the current class to load, link, and initialize
+   * a class. This is equivalent to your code calling
+   * <code>Class.forName(name, true, getClass().getClassLoader())</code>.
+   *
+   * @param name the name of the class to find
+   * @return the Class object representing the class
+   * @throws ClassNotFoundException if the class was not found by the
+   *         classloader
+   * @throws LinkageError if linking the class fails
+   * @throws ExceptionInInitializerError if the class loads, but an exception
+   *         occurs during initialization
+   */
+  public static native Class forName (String className)
+    throws ClassNotFoundException;
+
+  // A private internal method that is called by compiler-generated code.
+  private static Class forName (String className, Class caller)
+    throws ClassNotFoundException
+  {
+    return forName(className, true, caller.getClassLoaderInternal());
+  }
+
+
+  /**
+   * Use the specified classloader to load and link a class. If the loader
+   * is null, this uses the bootstrap class loader (provide the security
+   * check succeeds). Unfortunately, this method cannot be used to obtain
+   * the Class objects for primitive types or for void, you have to use
+   * the fields in the appropriate java.lang wrapper classes.
+   *
+   * <p>Calls <code>classloader.loadclass(name, initialize)</code>.
+   *
+   * @param name the name of the class to find
+   * @param initialize whether or not to initialize the class at this time
+   * @param classloader the classloader to use to find the class; null means
+   *        to use the bootstrap class loader
+   * @throws ClassNotFoundException if the class was not found by the
+   *         classloader
+   * @throws LinkageError if linking the class fails
+   * @throws ExceptionInInitializerError if the class loads, but an exception
+   *         occurs during initialization
+   * @throws SecurityException if the <code>classloader</code> argument
+   *         is <code>null</code> and the caller does not have the
+   *         <code>RuntimePermission("getClassLoader")</code> permission
+   * @see ClassLoader
+   * @since 1.2
+   */
+  public static native Class forName (String className, boolean initialize,
+				      ClassLoader loader)
+    throws ClassNotFoundException;
+  
+  /**
+   * Get all the public member classes and interfaces declared in this
+   * class or inherited from superclasses. This returns an array of length
+   * 0 if there are no member classes, including for primitive types. A
+   * security check may be performed, with
+   * <code>checkMemberAccess(this, Member.PUBLIC)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return all public member classes in this class
+   * @throws SecurityException if the security check fails
+   * @since 1.1
+   */
+  public Class[] getClasses()
+  {
+    memberAccessCheck(Member.PUBLIC);
+    return internalGetClasses();
+  }
+
+  /**
+   * Like <code>getClasses()</code> but without the security checks.
+   */
+  private Class[] internalGetClasses()
+  {
+    ArrayList list = new ArrayList();
+    list.addAll(Arrays.asList(getDeclaredClasses(true)));
+    Class superClass = getSuperclass();
+    if (superClass != null)
+      list.addAll(Arrays.asList(superClass.internalGetClasses()));
+    return (Class[])list.toArray(new Class[list.size()]);
+  }
+  
+  /**
+   * Get the ClassLoader that loaded this class.  If the class was loaded
+   * by the bootstrap classloader, this method will return null.
+   * If there is a security manager, and the caller's class loader is not
+   * an ancestor of the requested one, a security check of
+   * <code>RuntimePermission("getClassLoader")</code>
+   * must first succeed. Primitive types and void return null.
+   *
+   * @return the ClassLoader that loaded this class
+   * @throws SecurityException if the security check fails
+   * @see ClassLoader
+   * @see RuntimePermission
+   */
+  public native ClassLoader getClassLoader ();
+
+  // A private internal method that is called by compiler-generated code.
+  private final native ClassLoader getClassLoader (Class caller);
+
+  /**
+   *  Internal method that circumvents the usual security checks when 
+   *  getting the class loader.
+   */
+  private native ClassLoader getClassLoaderInternal ();
+
+  /**
+   * If this is an array, get the Class representing the type of array.
+   * Examples: "[[Ljava.lang.String;" would return "[Ljava.lang.String;", and
+   * calling getComponentType on that would give "java.lang.String".  If
+   * this is not an array, returns null.
+   *
+   * @return the array type of this class, or null
+   * @see Array
+   * @since 1.1
+   */
+  public native Class getComponentType ();
+
+  /**
+   * Get a public constructor declared in this class. If the constructor takes
+   * no argument, an array of zero elements and null are equivalent for the
+   * types argument. A security check may be performed, with
+   * <code>checkMemberAccess(this, Member.PUBLIC)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @param types the type of each parameter
+   * @return the constructor
+   * @throws NoSuchMethodException if the constructor does not exist
+   * @throws SecurityException if the security check fails
+   * @see #getConstructors()
+   * @since 1.1
+   */
+  public native Constructor getConstructor(Class[] args)
+    throws NoSuchMethodException;
+
+  /**
+   * Get all the public constructors of this class. This returns an array of
+   * length 0 if there are no constructors, including for primitive types,
+   * arrays, and interfaces. It does, however, include the default
+   * constructor if one was supplied by the compiler. A security check may
+   * be performed, with <code>checkMemberAccess(this, Member.PUBLIC)</code>
+   * as well as <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return all public constructors in this class
+   * @throws SecurityException if the security check fails
+   * @since 1.1
+   */
+  public Constructor[] getConstructors()
+  {
+    memberAccessCheck(Member.PUBLIC);
+    return getDeclaredConstructors(true);
+  }
+
+  /**
+   * Get a constructor declared in this class. If the constructor takes no
+   * argument, an array of zero elements and null are equivalent for the
+   * types argument. A security check may be performed, with
+   * <code>checkMemberAccess(this, Member.DECLARED)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @param types the type of each parameter
+   * @return the constructor
+   * @throws NoSuchMethodException if the constructor does not exist
+   * @throws SecurityException if the security check fails
+   * @see #getDeclaredConstructors()
+   * @since 1.1
+   */
+  public native Constructor getDeclaredConstructor(Class[] args)
+    throws NoSuchMethodException;
+
+  /**
+   * Get all the declared member classes and interfaces in this class, but
+   * not those inherited from superclasses. This returns an array of length
+   * 0 if there are no member classes, including for primitive types. A
+   * security check may be performed, with
+   * <code>checkMemberAccess(this, Member.DECLARED)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return all declared member classes in this class
+   * @throws SecurityException if the security check fails
+   * @since 1.1
+   */
+  public Class[] getDeclaredClasses()
+  {
+    memberAccessCheck(Member.DECLARED);
+    return getDeclaredClasses(false);
+  }
+
+  native Class[] getDeclaredClasses (boolean publicOnly);
+
+  /**
+   * Get all the declared constructors of this class. This returns an array of
+   * length 0 if there are no constructors, including for primitive types,
+   * arrays, and interfaces. It does, however, include the default
+   * constructor if one was supplied by the compiler. A security check may
+   * be performed, with <code>checkMemberAccess(this, Member.DECLARED)</code>
+   * as well as <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return all constructors in this class
+   * @throws SecurityException if the security check fails
+   * @since 1.1
+   */
+  public Constructor[] getDeclaredConstructors()
+  {
+    memberAccessCheck(Member.DECLARED);
+    return getDeclaredConstructors(false);
+  }
+
+  native Constructor[] getDeclaredConstructors (boolean publicOnly);
+
+  /**
+   * Get a field declared in this class, where name is its simple name. The
+   * implicit length field of arrays is not available. A security check may
+   * be performed, with <code>checkMemberAccess(this, Member.DECLARED)</code>
+   * as well as <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @param name the name of the field
+   * @return the field
+   * @throws NoSuchFieldException if the field does not exist
+   * @throws SecurityException if the security check fails
+   * @see #getDeclaredFields()
+   * @since 1.1
+   */
+  public native Field getDeclaredField(String fieldName)
+    throws NoSuchFieldException;
+
+  /**
+   * Get all the declared fields in this class, but not those inherited from
+   * superclasses. This returns an array of length 0 if there are no fields,
+   * including for primitive types. This does not return the implicit length
+   * field of arrays. A security check may be performed, with
+   * <code>checkMemberAccess(this, Member.DECLARED)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return all declared fields in this class
+   * @throws SecurityException if the security check fails
+   * @since 1.1
+   */
+  public Field[] getDeclaredFields()
+  {
+    memberAccessCheck(Member.DECLARED);
+    return getDeclaredFields(false);
+  }
+
+  native Field[] getDeclaredFields (boolean publicOnly);
+
+  private native Method _getDeclaredMethod(String methodName, Class[] args);
+
+  /**
+   * Get a method declared in this class, where name is its simple name. The
+   * implicit methods of Object are not available from arrays or interfaces.
+   * Constructors (named "<init>" in the class file) and class initializers
+   * (name "<clinit>") are not available.  The Virtual Machine allows
+   * multiple methods with the same signature but differing return types; in
+   * such a case the most specific return types are favored, then the final
+   * choice is arbitrary. If the method takes no argument, an array of zero
+   * elements and null are equivalent for the types argument. A security
+   * check may be performed, with
+   * <code>checkMemberAccess(this, Member.DECLARED)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @param methodName the name of the method
+   * @param types the type of each parameter
+   * @return the method
+   * @throws NoSuchMethodException if the method does not exist
+   * @throws SecurityException if the security check fails
+   * @see #getDeclaredMethods()
+   * @since 1.1
+   */
+  public Method getDeclaredMethod(String methodName, Class[] args)
+    throws NoSuchMethodException
+  {
+    memberAccessCheck(Member.DECLARED);
+
+    if ("<init>".equals(methodName) || "<clinit>".equals(methodName))
+      throw new NoSuchMethodException(methodName);
+
+    Method match = _getDeclaredMethod(methodName, args);
+    if (match == null)
+      throw new NoSuchMethodException(methodName);
+    return match;
+  }
+
+  /**
+   * Get all the declared methods in this class, but not those inherited from
+   * superclasses. This returns an array of length 0 if there are no methods,
+   * including for primitive types. This does include the implicit methods of
+   * arrays and interfaces which mirror methods of Object, nor does it
+   * include constructors or the class initialization methods. The Virtual
+   * Machine allows multiple methods with the same signature but differing
+   * return types; all such methods are in the returned array. A security
+   * check may be performed, with
+   * <code>checkMemberAccess(this, Member.DECLARED)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return all declared methods in this class
+   * @throws SecurityException if the security check fails
+   * @since 1.1
+   */
+  public native Method[] getDeclaredMethods();
+ 
+  /**
+   * If this is a nested or inner class, return the class that declared it.
+   * If not, return null.
+   *
+   * @return the declaring class of this class
+   * @since 1.1
+   */
+  // This is marked as unimplemented in the JCL book.
+  public native Class getDeclaringClass ();
+
+  private native Field getField (String fieldName, int hash)
+    throws NoSuchFieldException;
+
+  /**
+   * Get a public field declared or inherited in this class, where name is
+   * its simple name. If the class contains multiple accessible fields by
+   * that name, an arbitrary one is returned. The implicit length field of
+   * arrays is not available. A security check may be performed, with
+   * <code>checkMemberAccess(this, Member.PUBLIC)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @param fieldName the name of the field
+   * @return the field
+   * @throws NoSuchFieldException if the field does not exist
+   * @throws SecurityException if the security check fails
+   * @see #getFields()
+   * @since 1.1
+   */
+  public Field getField(String fieldName)
+    throws NoSuchFieldException
+  {
+    memberAccessCheck(Member.PUBLIC);
+    Field field = getField(fieldName, fieldName.hashCode());
+    if (field == null)
+      throw new NoSuchFieldException(fieldName);
+    return field;
+  }
+
+  /**
+   * Get all the public fields declared in this class or inherited from
+   * superclasses. This returns an array of length 0 if there are no fields,
+   * including for primitive types. This does not return the implicit length
+   * field of arrays. A security check may be performed, with
+   * <code>checkMemberAccess(this, Member.PUBLIC)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return all public fields in this class
+   * @throws SecurityException if the security check fails
+   * @since 1.1
+   */
+  public Field[] getFields()
+  {
+    memberAccessCheck(Member.PUBLIC);
+    return internalGetFields();
+  }
+
+  /**
+   * Like <code>getFields()</code> but without the security checks.
+   */
+  private Field[] internalGetFields()
+  {
+    HashSet set = new HashSet();
+    set.addAll(Arrays.asList(getDeclaredFields(true)));
+    Class[] interfaces = getInterfaces();
+    for (int i = 0; i < interfaces.length; i++)
+      set.addAll(Arrays.asList(interfaces[i].internalGetFields()));
+    Class superClass = getSuperclass();
+    if (superClass != null)
+      set.addAll(Arrays.asList(superClass.internalGetFields()));
+    return (Field[])set.toArray(new Field[set.size()]);
+  }
+
+  /**
+   * Returns the <code>Package</code> in which this class is defined
+   * Returns null when this information is not available from the
+   * classloader of this class.
+   *
+   * @return the package for this class, if it is available
+   * @since 1.2
+   */
+  public Package getPackage()
+  {
+    ClassLoader cl = getClassLoaderInternal();
+    if (cl != null)
+      return cl.getPackage(getPackagePortion(getName()));
+    else
+      return VMClassLoader.getPackage(getPackagePortion(getName()));
+  }
+
+  /**
+   * Get the interfaces this class <em>directly</em> implements, in the
+   * order that they were declared. This returns an empty array, not null,
+   * for Object, primitives, void, and classes or interfaces with no direct
+   * superinterface. Array types return Cloneable and Serializable.
+   *
+   * @return the interfaces this class directly implements
+   */
+  public native Class[] getInterfaces ();
+
+  private final native void getSignature(StringBuffer buffer);
+  private static final native String getSignature(Class[] args,
+						  boolean is_construtor);
+
+  public native Method _getMethod(String methodName, Class[] args);
+
+  /**
+   * Get a public method declared or inherited in this class, where name is
+   * its simple name. The implicit methods of Object are not available from
+   * interfaces.  Constructors (named "<init>" in the class file) and class
+   * initializers (name "<clinit>") are not available.  The Virtual
+   * Machine allows multiple methods with the same signature but differing
+   * return types, and the class can inherit multiple methods of the same
+   * return type; in such a case the most specific return types are favored,
+   * then the final choice is arbitrary. If the method takes no argument, an
+   * array of zero elements and null are equivalent for the types argument.
+   * A security check may be performed, with
+   * <code>checkMemberAccess(this, Member.PUBLIC)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @param methodName the name of the method
+   * @param types the type of each parameter
+   * @return the method
+   * @throws NoSuchMethodException if the method does not exist
+   * @throws SecurityException if the security check fails
+   * @see #getMethods()
+   * @since 1.1
+   */
+  public Method getMethod(String methodName, Class[] args)
+    throws NoSuchMethodException
+  {
+    memberAccessCheck(Member.PUBLIC);
+
+    if ("<init>".equals(methodName) || "<clinit>".equals(methodName))
+      throw new NoSuchMethodException(methodName);
+
+    Method method = _getMethod(methodName, args);
+    if (method == null)
+      throw new NoSuchMethodException(methodName);
+    return method;
+  }
+
+  private native int _getMethods (Method[] result, int offset);
+  
+  /**
+   * Get all the public methods declared in this class or inherited from
+   * superclasses. This returns an array of length 0 if there are no methods,
+   * including for primitive types. This does not include the implicit
+   * methods of interfaces which mirror methods of Object, nor does it
+   * include constructors or the class initialization methods. The Virtual
+   * Machine allows multiple methods with the same signature but differing
+   * return types; all such methods are in the returned array. A security
+   * check may be performed, with
+   * <code>checkMemberAccess(this, Member.PUBLIC)</code> as well as
+   * <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return all public methods in this class
+   * @throws SecurityException if the security check fails
+   * @since 1.1
+   */
+  public native Method[] getMethods();
+
+  /**
+   * Get the modifiers of this class.  These can be decoded using Modifier,
+   * and is limited to one of public, protected, or private, and any of
+   * final, static, abstract, or interface. An array class has the same
+   * public, protected, or private modifier as its component type, and is
+   * marked final but not an interface. Primitive types and void are marked
+   * public and final, but not an interface.
+   *
+   * @return the modifiers of this class
+   * @see Modifer
+   * @since 1.1
+   */
+  public native int getModifiers ();
+  
+  /**
+   * Get the name of this class, separated by dots for package separators.
+   * If the class represents a primitive type, or void, then the
+   * name of the type as it appears in the Java programming language
+   * is returned.  For instance, <code>Byte.TYPE.getName()</code>
+   * returns "byte".
+   *
+   * Arrays are specially encoded as shown on this table.
+   * <pre>
+   * array type          [<em>element type</em>
+   *                     (note that the element type is encoded per
+   *                      this table)
+   * boolean             Z
+   * byte                B
+   * char                C
+   * short               S
+   * int                 I
+   * long                J
+   * float               F
+   * double              D
+   * void                V
+   * class or interface, alone: <dotted name>
+   * class or interface, as element type: L<dotted name>;
+   * </pre>
+   *
+   * @return the name of this class
+   */
+  public native String getName ();
+
+  /**
+   * Get a resource URL using this class's package using the
+   * getClassLoader().getResource() method.  If this class was loaded using
+   * the system classloader, ClassLoader.getSystemResource() is used instead.
+   *
+   * <p>If the name you supply is absolute (it starts with a <code>/</code>),
+   * then the leading <code>/</code> is removed and it is passed on to
+   * getResource(). If it is relative, the package name is prepended, and
+   * <code>.</code>'s are replaced with <code>/</code>.
+   *
+   * <p>The URL returned is system- and classloader-dependent, and could
+   * change across implementations.
+   *
+   * @param resourceName the name of the resource, generally a path
+   * @return the URL to the resource
+   * @throws NullPointerException if name is null
+   * @since 1.1
+   */
+  public URL getResource(String resourceName)
+  {
+    String name = resourcePath(resourceName);
+    ClassLoader loader = getClassLoaderInternal();
+    if (loader == null)
+      return ClassLoader.getSystemResource(name);
+    return loader.getResource(name);
+  }
+
+  /**
+   * Get a resource using this class's package using the
+   * getClassLoader().getResourceAsStream() method.  If this class was loaded
+   * using the system classloader, ClassLoader.getSystemResource() is used
+   * instead.
+   *
+   * <p>If the name you supply is absolute (it starts with a <code>/</code>),
+   * then the leading <code>/</code> is removed and it is passed on to
+   * getResource(). If it is relative, the package name is prepended, and
+   * <code>.</code>'s are replaced with <code>/</code>.
+   *
+   * <p>The URL returned is system- and classloader-dependent, and could
+   * change across implementations.
+   *
+   * @param resourceName the name of the resource, generally a path
+   * @return an InputStream with the contents of the resource in it, or null
+   * @throws NullPointerException if name is null
+   * @since 1.1
+   */
+  public InputStream getResourceAsStream(String resourceName)
+  {
+    String name = resourcePath(resourceName);
+    ClassLoader loader = getClassLoaderInternal();
+    if (loader == null)
+      return ClassLoader.getSystemResourceAsStream(name);
+    return loader.getResourceAsStream(name);
+  }
+
+  private String resourcePath(String resourceName)
+  {
+    if (resourceName.length() > 0)
+      {
+	if (resourceName.charAt(0) != '/')
+	  {
+	    String pkg = getPackagePortion(getName());
+	    if (pkg.length() > 0)
+	      resourceName = pkg.replace('.','/') + '/' + resourceName;
+	  }
+	else
+	  {
+	    resourceName = resourceName.substring(1);
+	  }
+      }
+    return resourceName;
+  }
+
+  /**
+   * Get the signers of this class. This returns null if there are no signers,
+   * such as for primitive types or void.
+   *
+   * @return the signers of this class
+   * @since 1.1
+   */
+  public native Object[] getSigners ();
+  
+  /**
+   * Set the signers of this class.
+   *
+   * @param signers the signers of this class
+   */
+  native void setSigners(Object[] signers);
+
+  /**
+   * Get the direct superclass of this class.  If this is an interface,
+   * Object, a primitive type, or void, it will return null. If this is an
+   * array type, it will return Object.
+   *
+   * @return the direct superclass of this class
+   */
+  public native Class getSuperclass ();
+  
+  /**
+   * Return whether this class is an array type.
+   *
+   * @return whether this class is an array type
+   * @since 1.1
+   */
+  public native boolean isArray ();
+  
+  /**
+   * Discover whether an instance of the Class parameter would be an
+   * instance of this Class as well.  Think of doing
+   * <code>isInstance(c.newInstance())</code> or even
+   * <code>c.newInstance() instanceof (this class)</code>. While this
+   * checks widening conversions for objects, it must be exact for primitive
+   * types.
+   *
+   * @param c the class to check
+   * @return whether an instance of c would be an instance of this class
+   *         as well
+   * @throws NullPointerException if c is null
+   * @since 1.1
+   */
+  public native boolean isAssignableFrom (Class c);
+ 
+  /**
+   * Discover whether an Object is an instance of this Class.  Think of it
+   * as almost like <code>o instanceof (this class)</code>.
+   *
+   * @param o the Object to check
+   * @return whether o is an instance of this class
+   * @since 1.1
+   */
+  public native boolean isInstance (Object o);
+  
+  /**
+   * Check whether this class is an interface or not.  Array types are not
+   * interfaces.
+   *
+   * @return whether this class is an interface or not
+   */
+  public native boolean isInterface ();
+  
+  /**
+   * Return whether this class is a primitive type.  A primitive type class
+   * is a class representing a kind of "placeholder" for the various
+   * primitive types, or void.  You can access the various primitive type
+   * classes through java.lang.Boolean.TYPE, java.lang.Integer.TYPE, etc.,
+   * or through boolean.class, int.class, etc.
+   *
+   * @return whether this class is a primitive type
+   * @see Boolean#TYPE
+   * @see Byte#TYPE
+   * @see Character#TYPE
+   * @see Short#TYPE
+   * @see Integer#TYPE
+   * @see Long#TYPE
+   * @see Float#TYPE
+   * @see Double#TYPE
+   * @see Void#TYPE
+   * @since 1.1
+   */
+  public native boolean isPrimitive ();
+  
+  /**
+   * Get a new instance of this class by calling the no-argument constructor.
+   * The class is initialized if it has not been already. A security check
+   * may be performed, with <code>checkMemberAccess(this, Member.PUBLIC)</code>
+   * as well as <code>checkPackageAccess</code> both having to succeed.
+   *
+   * @return a new instance of this class
+   * @throws InstantiationException if there is not a no-arg constructor
+   *         for this class, including interfaces, abstract classes, arrays,
+   *         primitive types, and void; or if an exception occurred during
+   *         the constructor
+   * @throws IllegalAccessException if you are not allowed to access the
+   *         no-arg constructor because of scoping reasons
+   * @throws SecurityException if the security check fails
+   * @throws ExceptionInInitializerError if class initialization caused by
+   *         this call fails with an exception
+   */
+  public native Object newInstance ()
+    throws InstantiationException, IllegalAccessException;
+
+  // We need a native method to retrieve the protection domain, because we
+  // can't add fields to java.lang.Class that are accessible from Java.
+  private native ProtectionDomain getProtectionDomain0();
+
+  /**
+   * Returns the protection domain of this class. If the classloader did not
+   * record the protection domain when creating this class the unknown
+   * protection domain is returned which has a <code>null</code> code source
+   * and all permissions. A security check may be performed, with
+   * <code>RuntimePermission("getProtectionDomain")</code>.
+   *
+   * @return the protection domain
+   * @throws SecurityException if the security manager exists and the caller
+   * does not have <code>RuntimePermission("getProtectionDomain")</code>.
+   * @see RuntimePermission
+   * @since 1.2
+   */
+  public ProtectionDomain getProtectionDomain()
+  {
+    SecurityManager sm = System.getSecurityManager();
+    if (sm != null)
+      sm.checkPermission(VMClassLoader.protectionDomainPermission);
+    
+    ProtectionDomain protectionDomain = getProtectionDomain0();
+
+    if (protectionDomain == null)
+      return VMClassLoader.unknownProtectionDomain;
+    else
+      return protectionDomain;
+  }
+
+  /**
+   * Return the human-readable form of this Object.  For an object, this
+   * is either "interface " or "class " followed by <code>getName()</code>,
+   * for primitive types and void it is just <code>getName()</code>.
+   *
+   * @return the human-readable form of this Object
+   */
+  public String toString()
+  {
+    if (isPrimitive())
+      return getName();
+    return (isInterface() ? "interface " : "class ") + getName();
+  }
+
+  /**
+   * Returns the desired assertion status of this class, if it were to be
+   * initialized at this moment. The class assertion status, if set, is
+   * returned; the backup is the default package status; then if there is
+   * a class loader, that default is returned; and finally the system default
+   * is returned. This method seldom needs calling in user code, but exists
+   * for compilers to implement the assert statement. Note that there is no
+   * guarantee that the result of this method matches the class's actual
+   * assertion status.
+   *
+   * @return the desired assertion status
+   * @see ClassLoader#setClassAssertionStatus(String, boolean)
+   * @see ClassLoader#setPackageAssertionStatus(String, boolean)
+   * @see ClassLoader#setDefaultAssertionStatus(boolean)
+   * @since 1.4
+   */
+  public boolean desiredAssertionStatus()
+  {
+    ClassLoader c = getClassLoaderInternal();
+    Object status;
+    if (c == null)
+      return VMClassLoader.defaultAssertionStatus();
+    if (c.classAssertionStatus != null)
+      synchronized (c)
+        {
+          status = c.classAssertionStatus.get(getName());
+          if (status != null)
+            return status.equals(Boolean.TRUE);
+        }
+    else
+      {
+        status = ClassLoader.systemClassAssertionStatus.get(getName());
+        if (status != null)
+          return status.equals(Boolean.TRUE);
+      }
+    if (c.packageAssertionStatus != null)
+      synchronized (c)
+        {
+          String name = getPackagePortion(getName());
+          if ("".equals(name))
+            status = c.packageAssertionStatus.get(null);
+          else
+            do
+              {
+                status = c.packageAssertionStatus.get(name);
+                name = getPackagePortion(name);
+              }
+            while (! "".equals(name) && status == null);
+          if (status != null)
+            return status.equals(Boolean.TRUE);
+        }
+    else
+      {
+        String name = getPackagePortion(getName());
+        if ("".equals(name))
+          status = ClassLoader.systemPackageAssertionStatus.get(null);
+        else
+          do
+            {
+              status = ClassLoader.systemPackageAssertionStatus.get(name);
+              name = getPackagePortion(name);
+            }
+          while (! "".equals(name) && status == null);
+        if (status != null)
+          return status.equals(Boolean.TRUE);
+      }
+    return c.defaultAssertionStatus;
+  }
+
+  /**
+   * Strip the last portion of the name (after the last dot).
+   *
+   * @param name the name to get package of
+   * @return the package name, or "" if no package
+   */
+  private static String getPackagePortion(String name)
+  {
+    int lastInd = name.lastIndexOf('.');
+    if (lastInd == -1)
+      return "";
+    return name.substring(0, lastInd);
+  }
+
+  /**
+   * Perform security checks common to all of the methods that
+   * get members of this Class.
+   */
+  private void memberAccessCheck(int which)
+  {
+    SecurityManager sm = System.getSecurityManager();
+    if (sm != null)
+      {
+	sm.checkMemberAccess(this, which);
+	Package pkg = getPackage();
+	if (pkg != null)
+	  sm.checkPackageAccess(pkg.getName());
+      }
+  }
+
+  /**
+   * Returns the simple name for this class, as used in the source
+   * code.  For normal classes, this is the content returned by
+   * <code>getName()</code> which follows the last ".".  Anonymous
+   * classes have no name, and so the result of calling this method is
+   * "".  The simple name of an array consists of the simple name of
+   * its component type, followed by "[]".  Thus, an array with the
+   * component type of an anonymous class has a simple name of simply
+   * "[]".
+   *
+   * @return the simple name for this class.
+   * @since 1.5
+   */
+  public String getSimpleName()
+  {
+    // FIXME write real implementation
+    return "";
+  }
+
+  /**
+   * Returns the class which immediately encloses this class.  If this class
+   * is a top-level class, this method returns <code>null</code>.
+   *
+   * @return the immediate enclosing class, or <code>null</code> if this is
+   *         a top-level class.
+   * @since 1.5
+   */
+   /* FIXME[GENERICS]: Should return Class<?> */
+  public Class getEnclosingClass()
+  {
+    // FIXME write real implementation
+    return null;
+  }
+
+  /**
+   * Returns the constructor which immediately encloses this class.  If
+   * this class is a top-level class, or a local or anonymous class
+   * immediately enclosed by a type definition, instance initializer
+   * or static initializer, then <code>null</code> is returned.
+   *
+   * @return the immediate enclosing constructor if this class is
+   *         declared within a constructor.  Otherwise, <code>null</code>
+   *         is returned.
+   * @since 1.5
+   */
+   /* FIXME[GENERICS]: Should return Constructor<?> */
+  public Constructor getEnclosingConstructor()
+  {
+    // FIXME write real implementation
+    return null;
+  }
+
+  /**
+   * Returns the method which immediately encloses this class.  If
+   * this class is a top-level class, or a local or anonymous class
+   * immediately enclosed by a type definition, instance initializer
+   * or static initializer, then <code>null</code> is returned.
+   *
+   * @return the immediate enclosing method if this class is
+   *         declared within a method.  Otherwise, <code>null</code>
+   *         is returned.
+   * @since 1.5
+   */
+  public Method getEnclosingMethod()
+  {
+    // FIXME write real implementation
+    return null;
+  }
+
+  /**
+   * Returns an array of <code>TypeVariable</code> objects that represents
+   * the type variables declared by this class, in declaration order.
+   * An array of size zero is returned if this class has no type
+   * variables.
+   *
+   * @return the type variables associated with this class.
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+   /* FIXME[GENERICS]: Should return TypeVariable<Class<T>> */
+  public TypeVariable[] getTypeParameters()
+  {
+    // FIXME - provide real implementation.
+    return new TypeVariable[0];
+  }
+
+  /**
+   * Returns true if this class is an <code>Enum</code>.
+   *
+   * @return true if this is an enumeration class.
+   * @since 1.5
+   */
+  public boolean isEnum()
+  {
+    // FIXME - provide real implementation.
+    return false;
+  }
+
+}

Added: llvm-gcc-4.2/trunk/libjava/java/lang/ClassLoader.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/ClassLoader.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/ClassLoader.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/ClassLoader.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,998 @@
+/* ClassLoader.java -- responsible for loading classes into the VM
+   Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+import gnu.classpath.SystemProperties;
+import gnu.java.util.DoubleEnumeration;
+import gnu.java.util.EmptyEnumeration;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.security.CodeSource;
+import java.security.PermissionCollection;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The ClassLoader is a way of customizing the way Java gets its classes
+ * and loads them into memory.  The verifier and other standard Java things
+ * still run, but the ClassLoader is allowed great flexibility in determining
+ * where to get the classfiles and when to load and resolve them. For that
+ * matter, a custom ClassLoader can perform on-the-fly code generation or
+ * modification!
+ *
+ * <p>Every classloader has a parent classloader that is consulted before
+ * the 'child' classloader when classes or resources should be loaded.
+ * This is done to make sure that classes can be loaded from an hierarchy of
+ * multiple classloaders and classloaders do not accidentially redefine
+ * already loaded classes by classloaders higher in the hierarchy.
+ *
+ * <p>The grandparent of all classloaders is the bootstrap classloader, which
+ * loads all the standard system classes as implemented by GNU Classpath. The
+ * other special classloader is the system classloader (also called
+ * application classloader) that loads all classes from the CLASSPATH
+ * (<code>java.class.path</code> system property). The system classloader
+ * is responsible for finding the application classes from the classpath,
+ * and delegates all requests for the standard library classes to its parent
+ * the bootstrap classloader. Most programs will load all their classes
+ * through the system classloaders.
+ *
+ * <p>The bootstrap classloader in GNU Classpath is implemented as a couple of
+ * static (native) methods on the package private class
+ * <code>java.lang.VMClassLoader</code>, the system classloader is an
+ * instance of <code>gnu.java.lang.SystemClassLoader</code>
+ * (which is a subclass of <code>java.net.URLClassLoader</code>).
+ *
+ * <p>Users of a <code>ClassLoader</code> will normally just use the methods
+ * <ul>
+ *  <li> <code>loadClass()</code> to load a class.</li>
+ *  <li> <code>getResource()</code> or <code>getResourceAsStream()</code>
+ *       to access a resource.</li>
+ *  <li> <code>getResources()</code> to get an Enumeration of URLs to all
+ *       the resources provided by the classloader and its parents with the
+ *       same name.</li>
+ * </ul>
+ *
+ * <p>Subclasses should implement the methods
+ * <ul>
+ *  <li> <code>findClass()</code> which is called by <code>loadClass()</code>
+ *       when the parent classloader cannot provide a named class.</li>
+ *  <li> <code>findResource()</code> which is called by
+ *       <code>getResource()</code> when the parent classloader cannot provide
+ *       a named resource.</li>
+ *  <li> <code>findResources()</code> which is called by
+ *       <code>getResource()</code> to combine all the resources with the
+ *       same name from the classloader and its parents.</li>
+ *  <li> <code>findLibrary()</code> which is called by
+ *       <code>Runtime.loadLibrary()</code> when a class defined by the
+ *       classloader wants to load a native library.</li>
+ * </ul>
+ *
+ * @author John Keiser
+ * @author Mark Wielaard
+ * @author Eric Blake (ebb9 at email.byu.edu)
+ * @see Class
+ * @since 1.0
+ * @status still missing 1.4 functionality
+ */
+public abstract class ClassLoader
+{
+  /**
+   * All classes loaded by this classloader. VM's may choose to implement
+   * this cache natively; but it is here available for use if necessary. It
+   * is not private in order to allow native code (and trusted subclasses)
+   * access to this field.
+   */
+  final HashMap loadedClasses = new HashMap();
+
+  /**
+   * All packages defined by this classloader. It is not private in order to
+   * allow native code (and trusted subclasses) access to this field.
+   */
+  final HashMap definedPackages = new HashMap();
+
+  /**
+   * The classloader that is consulted before this classloader.
+   * If null then the parent is the bootstrap classloader.
+   */
+  private final ClassLoader parent;
+
+  /**
+   * This is true if this classloader was successfully initialized.
+   * This flag is needed to avoid a class loader attack: even if the
+   * security manager rejects an attempt to create a class loader, the
+   * malicious class could have a finalize method which proceeds to
+   * define classes.
+   */
+  private final boolean initialized;
+
+  /**
+   * System/Application classloader: defaults to an instance of
+   * gnu.java.lang.SystemClassLoader, unless the first invocation of
+   * getSystemClassLoader loads another class loader because of the
+   * java.system.class.loader property. The initialization of this field
+   * is somewhat circular - getSystemClassLoader() checks whether this
+   * field is null in order to bypass a security check.
+   */
+  static final ClassLoader systemClassLoader =
+    VMClassLoader.getSystemClassLoader();
+
+  static
+  {
+    // Find out if we have to install a default security manager. Note
+    // that this is done here because we potentially need the system
+    // class loader to load the security manager and note also that we
+    // don't need the security manager until the system class loader
+    // is created.  If the runtime chooses to use a class loader that
+    // doesn't have the system class loader as its parent, it is
+    // responsible for setting up a security manager before doing so.
+    String secman = SystemProperties.getProperty("java.security.manager");
+    if (secman != null && SecurityManager.current == null)
+    {
+      if (secman.equals("") || secman.equals("default"))
+      {
+	SecurityManager.current = new SecurityManager();
+      }
+      else
+      {
+	try
+	{
+	  Class cl = Class.forName(secman, false, systemClassLoader);
+	  SecurityManager.current = (SecurityManager) cl.newInstance();
+	}
+	catch (Exception x)
+	{
+	  throw (InternalError)
+	    new InternalError("Unable to create SecurityManager")
+	        .initCause(x);
+	}
+      }
+    }
+  }
+
+  /**
+   * The default protection domain, used when defining a class with a null
+   * paramter for the domain.
+   */
+  static final ProtectionDomain defaultProtectionDomain;
+  static
+  {
+    CodeSource cs = new CodeSource(null, null);
+    PermissionCollection perm = Policy.getPolicy().getPermissions(cs);
+    defaultProtectionDomain = new ProtectionDomain(cs, perm);
+  }
+
+  /**
+   * The desired assertion status of classes loaded by this loader, if not
+   * overridden by package or class instructions.
+   */
+  // Package visible for use by Class.
+  boolean defaultAssertionStatus = VMClassLoader.defaultAssertionStatus();
+
+  /**
+   * The command-line state of the package assertion status overrides. This
+   * map is never modified, so it does not need to be synchronized.
+   */
+  // Package visible for use by Class.
+  static final Map systemPackageAssertionStatus
+    = VMClassLoader.packageAssertionStatus();
+
+  /**
+   * The map of package assertion status overrides, or null if no package
+   * overrides have been specified yet. The values of the map should be
+   * Boolean.TRUE or Boolean.FALSE, and the unnamed package is represented
+   * by the null key. This map must be synchronized on this instance.
+   */
+  // Package visible for use by Class.
+  Map packageAssertionStatus;
+
+  /**
+   * The command-line state of the class assertion status overrides. This
+   * map is never modified, so it does not need to be synchronized.
+   */
+  // Package visible for use by Class.
+  static final Map systemClassAssertionStatus
+    = VMClassLoader.classAssertionStatus();
+
+  /**
+   * The map of class assertion status overrides, or null if no class
+   * overrides have been specified yet. The values of the map should be
+   * Boolean.TRUE or Boolean.FALSE. This map must be synchronized on this
+   * instance.
+   */
+  // Package visible for use by Class.
+  Map classAssertionStatus;
+
+  /**
+   * Create a new ClassLoader with as parent the system classloader. There
+   * may be a security check for <code>checkCreateClassLoader</code>.
+   *
+   * @throws SecurityException if the security check fails
+   */
+  protected ClassLoader() throws SecurityException
+  {
+    this(systemClassLoader);
+  }
+
+  /**
+   * Create a new ClassLoader with the specified parent. The parent will
+   * be consulted when a class or resource is requested through
+   * <code>loadClass()</code> or <code>getResource()</code>. Only when the
+   * parent classloader cannot provide the requested class or resource the
+   * <code>findClass()</code> or <code>findResource()</code> method
+   * of this classloader will be called. There may be a security check for
+   * <code>checkCreateClassLoader</code>.
+   *
+   * @param parent the classloader's parent, or null for the bootstrap
+   *        classloader
+   * @throws SecurityException if the security check fails
+   * @since 1.2
+   */
+  protected ClassLoader(ClassLoader parent)
+  {
+    // May we create a new classloader?
+    SecurityManager sm = System.getSecurityManager();
+    if (sm != null)
+      sm.checkCreateClassLoader();
+    this.parent = parent;
+    this.initialized = true;
+  }
+
+  /**
+   * Load a class using this ClassLoader or its parent, without resolving
+   * it. Calls <code>loadClass(name, false)</code>.
+   *
+   * <p>Subclasses should not override this method but should override
+   * <code>findClass()</code> which is called by this method.</p>
+   *
+   * @param name the name of the class relative to this ClassLoader
+   * @return the loaded class
+   * @throws ClassNotFoundException if the class cannot be found
+   */
+  public Class loadClass(String name) throws ClassNotFoundException
+  {
+    return loadClass(name, false);
+  }
+
+  private native Class loadClassFromSig(String name)
+    throws ClassNotFoundException;
+
+  /**
+   * Load a class using this ClassLoader or its parent, possibly resolving
+   * it as well using <code>resolveClass()</code>. It first tries to find
+   * out if the class has already been loaded through this classloader by
+   * calling <code>findLoadedClass()</code>. Then it calls
+   * <code>loadClass()</code> on the parent classloader (or when there is
+   * no parent it uses the VM bootclassloader). If the class is still
+   * not loaded it tries to create a new class by calling
+   * <code>findClass()</code>. Finally when <code>resolve</code> is
+   * <code>true</code> it also calls <code>resolveClass()</code> on the
+   * newly loaded class.
+   *
+   * <p>Subclasses should not override this method but should override
+   * <code>findClass()</code> which is called by this method.</p>
+   *
+   * @param name the fully qualified name of the class to load
+   * @param resolve whether or not to resolve the class
+   * @return the loaded class
+   * @throws ClassNotFoundException if the class cannot be found
+   */
+  protected synchronized Class loadClass(String name, boolean resolve)
+    throws ClassNotFoundException
+  {
+    // Arrays are handled specially.
+    Class c;
+    if (name.length() > 0 && name.charAt(0) == '[')
+      c = loadClassFromSig(name);
+    else
+      {
+	// Have we already loaded this class?
+	c = findLoadedClass(name);
+	if (c == null)
+	  {
+	    // Can the class be loaded by a parent?
+	    try
+	      {
+		if (parent == null)
+		  {
+		    c = VMClassLoader.loadClass(name, resolve);
+		    if (c != null)
+		      return c;
+		  }
+		else
+		  {
+		    return parent.loadClass(name, resolve);
+		  }
+	      }
+	    catch (ClassNotFoundException e)
+	      {
+	      }
+	    // Still not found, we have to do it ourself.
+	    c = findClass(name);
+	  }
+      }
+    if (resolve)
+      resolveClass(c);
+    return c;
+  }
+
+  /**
+   * Called for every class name that is needed but has not yet been
+   * defined by this classloader or one of its parents. It is called by
+   * <code>loadClass()</code> after both <code>findLoadedClass()</code> and
+   * <code>parent.loadClass()</code> couldn't provide the requested class.
+   *
+   * <p>The default implementation throws a
+   * <code>ClassNotFoundException</code>. Subclasses should override this
+   * method. An implementation of this method in a subclass should get the
+   * class bytes of the class (if it can find them), if the package of the
+   * requested class doesn't exist it should define the package and finally
+   * it should call define the actual class. It does not have to resolve the
+   * class. It should look something like the following:<br>
+   *
+   * <pre>
+   * // Get the bytes that describe the requested class
+   * byte[] classBytes = classLoaderSpecificWayToFindClassBytes(name);
+   * // Get the package name
+   * int lastDot = name.lastIndexOf('.');
+   * if (lastDot != -1)
+   *   {
+   *     String packageName = name.substring(0, lastDot);
+   *     // Look if the package already exists
+   *     if (getPackage(packageName) == null)
+   *       {
+   *         // define the package
+   *         definePackage(packageName, ...);
+   *       }
+   *   }
+   * // Define and return the class
+   *  return defineClass(name, classBytes, 0, classBytes.length);
+   * </pre>
+   *
+   * <p><code>loadClass()</code> makes sure that the <code>Class</code>
+   * returned by <code>findClass()</code> will later be returned by
+   * <code>findLoadedClass()</code> when the same class name is requested.
+   *
+   * @param name class name to find (including the package name)
+   * @return the requested Class
+   * @throws ClassNotFoundException when the class can not be found
+   * @since 1.2
+   */
+  protected Class findClass(String name) throws ClassNotFoundException
+  {
+    throw new ClassNotFoundException(name);
+  }
+
+  /**
+   * Helper to define a class using a string of bytes. This version is not
+   * secure.
+   *
+   * @param data the data representing the classfile, in classfile format
+   * @param offset the offset into the data where the classfile starts
+   * @param len the length of the classfile data in the array
+   * @return the class that was defined
+   * @throws ClassFormatError if data is not in proper classfile format
+   * @throws IndexOutOfBoundsException if offset or len is negative, or
+   *         offset + len exceeds data
+   * @deprecated use {@link #defineClass(String, byte[], int, int)} instead
+   */
+  protected final Class defineClass(byte[] data, int offset, int len)
+    throws ClassFormatError
+  {
+    return defineClass(null, data, offset, len);
+  }
+
+  /**
+   * Helper to define a class using a string of bytes without a
+   * ProtectionDomain. Subclasses should call this method from their
+   * <code>findClass()</code> implementation. The name should use '.'
+   * separators, and discard the trailing ".class".  The default protection
+   * domain has the permissions of
+   * <code>Policy.getPolicy().getPermissions(new CodeSource(null, null))</code>.
+   *
+   * @param name the name to give the class, or null if unknown
+   * @param data the data representing the classfile, in classfile format
+   * @param offset the offset into the data where the classfile starts
+   * @param len the length of the classfile data in the array
+   * @return the class that was defined
+   * @throws ClassFormatError if data is not in proper classfile format
+   * @throws IndexOutOfBoundsException if offset or len is negative, or
+   *         offset + len exceeds data
+   * @throws SecurityException if name starts with "java."
+   * @since 1.1
+   */
+  protected final Class defineClass(String name, byte[] data, int offset,
+                                    int len) throws ClassFormatError
+  {
+    return defineClass(name, data, offset, len, null);
+  }
+
+  /**
+   * Helper to define a class using a string of bytes. Subclasses should call
+   * this method from their <code>findClass()</code> implementation. If the
+   * domain is null, the default of
+   * <code>Policy.getPolicy().getPermissions(new CodeSource(null, null))</code>
+   * is used. Once a class has been defined in a package, all further classes
+   * in that package must have the same set of certificates or a
+   * SecurityException is thrown.
+   *
+   * @param name the name to give the class.  null if unknown
+   * @param data the data representing the classfile, in classfile format
+   * @param offset the offset into the data where the classfile starts
+   * @param len the length of the classfile data in the array
+   * @param domain the ProtectionDomain to give to the class, null for the
+   *        default protection domain
+   * @return the class that was defined
+   * @throws ClassFormatError if data is not in proper classfile format
+   * @throws IndexOutOfBoundsException if offset or len is negative, or
+   *         offset + len exceeds data
+   * @throws SecurityException if name starts with "java.", or if certificates
+   *         do not match up
+   * @since 1.2
+   */
+  protected final synchronized Class defineClass(String name, byte[] data,
+						 int offset, int len,
+						 ProtectionDomain domain)
+    throws ClassFormatError
+  {
+    if (domain == null)
+      domain = defaultProtectionDomain;
+    if (! initialized)
+      throw new SecurityException("attempt to define class from uninitialized class loader");
+    
+    Class retval = VMClassLoader.defineClass(this, name, data,
+					     offset, len, domain);
+    loadedClasses.put(retval.getName(), retval);
+    return retval;
+  }
+
+  /**
+   * Links the class, if that has not already been done. Linking basically
+   * resolves all references to other classes made by this class.
+   *
+   * @param c the class to resolve
+   * @throws NullPointerException if c is null
+   * @throws LinkageError if linking fails
+   */
+  protected final void resolveClass(Class c)
+  {
+    VMClassLoader.resolveClass(c);
+  }
+
+  /**
+   * Helper to find a Class using the system classloader, possibly loading it.
+   * A subclass usually does not need to call this, if it correctly
+   * overrides <code>findClass(String)</code>.
+   *
+   * @param name the name of the class to find
+   * @return the found class
+   * @throws ClassNotFoundException if the class cannot be found
+   */
+  protected final Class findSystemClass(String name)
+    throws ClassNotFoundException
+  {
+    return Class.forName(name, false, systemClassLoader);
+  }
+
+  /**
+   * Returns the parent of this classloader. If the parent of this
+   * classloader is the bootstrap classloader then this method returns
+   * <code>null</code>. A security check may be performed on
+   * <code>RuntimePermission("getClassLoader")</code>.
+   *
+   * @return the parent <code>ClassLoader</code>
+   * @throws SecurityException if the security check fails
+   * @since 1.2
+   */
+  public final ClassLoader getParent()
+  {
+    // Check if we may return the parent classloader.
+    SecurityManager sm = System.getSecurityManager();
+    if (sm != null)
+      {
+        Class c = VMSecurityManager.getClassContext(ClassLoader.class)[0];
+        ClassLoader cl = c.getClassLoader();
+	if (cl != null && ! cl.isAncestorOf(this))
+          sm.checkPermission(new RuntimePermission("getClassLoader"));
+      }
+    return parent;
+  }
+
+  /**
+   * Helper to set the signers of a class. This should be called after
+   * defining the class.
+   *
+   * @param c the Class to set signers of
+   * @param signers the signers to set
+   * @since 1.1
+   */
+  protected final void setSigners(Class c, Object[] signers)
+  {
+    c.setSigners(signers);
+  }
+
+  /**
+   * Helper to find an already-loaded class in this ClassLoader.
+   *
+   * @param name the name of the class to find
+   * @return the found Class, or null if it is not found
+   * @since 1.1
+   */
+  protected final synchronized Class findLoadedClass(String name)
+  {
+    // NOTE: If the VM is keeping its own cache, it may make sense to have
+    // this method be native.
+    return (Class) loadedClasses.get(name);
+  }
+
+  /**
+   * Get the URL to a resource using this classloader or one of its parents.
+   * First tries to get the resource by calling <code>getResource()</code>
+   * on the parent classloader. If the parent classloader returns null then
+   * it tries finding the resource by calling <code>findResource()</code> on
+   * this classloader. The resource name should be separated by '/' for path
+   * elements.
+   *
+   * <p>Subclasses should not override this method but should override
+   * <code>findResource()</code> which is called by this method.
+   *
+   * @param name the name of the resource relative to this classloader
+   * @return the URL to the resource or null when not found
+   */
+  public URL getResource(String name)
+  {
+    URL result;
+
+    if (parent == null)
+      result = VMClassLoader.getResource(name);
+    else
+      result = parent.getResource(name);
+
+    if (result == null)
+      result = findResource(name);
+    return result;
+  }
+
+  /**
+   * Returns an Enumeration of all resources with a given name that can
+   * be found by this classloader and its parents. Certain classloaders
+   * (such as the URLClassLoader when given multiple jar files) can have
+   * multiple resources with the same name that come from multiple locations.
+   * It can also occur that a parent classloader offers a resource with a
+   * certain name and the child classloader also offers a resource with that
+   * same name. <code>getResource()</code> only offers the first resource (of the
+   * parent) with a given name. This method lists all resources with the
+   * same name. The name should use '/' as path separators.
+   *
+   * <p>The Enumeration is created by first calling <code>getResources()</code>
+   * on the parent classloader and then calling <code>findResources()</code>
+   * on this classloader.</p>
+   *
+   * @param name the resource name
+   * @return an enumaration of all resources found
+   * @throws IOException if I/O errors occur in the process
+   * @since 1.2
+   */
+  public final Enumeration getResources(String name) throws IOException
+  {
+    Enumeration parentResources;
+    if (parent == null)
+      parentResources = VMClassLoader.getResources(name);
+    else
+      parentResources = parent.getResources(name);
+    return new DoubleEnumeration(parentResources, findResources(name));
+  }
+
+  /**
+   * Called whenever all locations of a named resource are needed.
+   * It is called by <code>getResources()</code> after it has called
+   * <code>parent.getResources()</code>. The results are combined by
+   * the <code>getResources()</code> method.
+   *
+   * <p>The default implementation always returns an empty Enumeration.
+   * Subclasses should override it when they can provide an Enumeration of
+   * URLs (possibly just one element) to the named resource.
+   * The first URL of the Enumeration should be the same as the one
+   * returned by <code>findResource</code>.
+   *
+   * @param name the name of the resource to be found
+   * @return a possibly empty Enumeration of URLs to the named resource
+   * @throws IOException if I/O errors occur in the process
+   * @since 1.2
+   */
+  protected Enumeration findResources(String name) throws IOException
+  {
+    return EmptyEnumeration.getInstance();
+  }
+
+  /**
+   * Called whenever a resource is needed that could not be provided by
+   * one of the parents of this classloader. It is called by
+   * <code>getResource()</code> after <code>parent.getResource()</code>
+   * couldn't provide the requested resource.
+   *
+   * <p>The default implementation always returns null. Subclasses should
+   * override this method when they can provide a way to return a URL
+   * to a named resource.
+   *
+   * @param name the name of the resource to be found
+   * @return a URL to the named resource or null when not found
+   * @since 1.2
+   */
+  protected URL findResource(String name)
+  {
+    return null;
+  }
+
+  /**
+   * Get the URL to a resource using the system classloader.
+   *
+   * @param name the name of the resource relative to the system classloader
+   * @return the URL to the resource
+   * @since 1.1
+   */
+  public static final URL getSystemResource(String name)
+  {
+    return systemClassLoader.getResource(name);
+  }
+
+  /**
+   * Get an Enumeration of URLs to resources with a given name using the
+   * the system classloader. The enumeration firsts lists the resources with
+   * the given name that can be found by the bootstrap classloader followed
+   * by the resources with the given name that can be found on the classpath.
+   *
+   * @param name the name of the resource relative to the system classloader
+   * @return an Enumeration of URLs to the resources
+   * @throws IOException if I/O errors occur in the process
+   * @since 1.2
+   */
+  public static Enumeration getSystemResources(String name) throws IOException
+  {
+    return systemClassLoader.getResources(name);
+  }
+
+  /**
+   * Get a resource as stream using this classloader or one of its parents.
+   * First calls <code>getResource()</code> and if that returns a URL to
+   * the resource then it calls and returns the InputStream given by
+   * <code>URL.openStream()</code>.
+   *
+   * <p>Subclasses should not override this method but should override
+   * <code>findResource()</code> which is called by this method.
+   *
+   * @param name the name of the resource relative to this classloader
+   * @return an InputStream to the resource, or null
+   * @since 1.1
+   */
+  public InputStream getResourceAsStream(String name)
+  {
+    try
+      {
+        URL url = getResource(name);
+        if (url == null)
+          return null;
+        return url.openStream();
+      }
+    catch (IOException e)
+      {
+        return null;
+      }
+  }
+
+  /**
+   * Get a resource using the system classloader.
+   *
+   * @param name the name of the resource relative to the system classloader
+   * @return an input stream for the resource, or null
+   * @since 1.1
+   */
+  public static final InputStream getSystemResourceAsStream(String name)
+  {
+    try
+      {
+        URL url = getSystemResource(name);
+        if (url == null)
+          return null;
+        return url.openStream();
+      }
+    catch (IOException e)
+      {
+        return null;
+      }
+  }
+
+  /**
+   * Returns the system classloader. The system classloader (also called
+   * the application classloader) is the classloader that was used to
+   * load the application classes on the classpath (given by the system
+   * property <code>java.class.path</code>. This is set as the context
+   * class loader for a thread. The system property
+   * <code>java.system.class.loader</code>, if defined, is taken to be the
+   * name of the class to use as the system class loader, which must have
+   * a public constructor which takes a ClassLoader as a parent; otherwise this
+   * uses gnu.java.lang.SystemClassLoader.
+   *
+   * <p>Note that this is different from the bootstrap classloader that
+   * actually loads all the real "system" classes (the bootstrap classloader
+   * is the parent of the returned system classloader).
+   *
+   * <p>A security check will be performed for
+   * <code>RuntimePermission("getClassLoader")</code> if the calling class
+   * is not a parent of the system class loader.
+   *
+   * @return the system class loader
+   * @throws SecurityException if the security check fails
+   * @throws IllegalStateException if this is called recursively
+   * @throws Error if <code>java.system.class.loader</code> fails to load
+   * @since 1.2
+   */
+  public static ClassLoader getSystemClassLoader()
+  {
+    // Check if we may return the system classloader
+    SecurityManager sm = System.getSecurityManager();
+    if (sm != null)
+      {
+	Class c = VMSecurityManager.getClassContext(ClassLoader.class)[0];
+	ClassLoader cl = c.getClassLoader();
+	if (cl != null && cl != systemClassLoader)
+	  sm.checkPermission(new RuntimePermission("getClassLoader"));
+      }
+
+    return systemClassLoader;
+  }
+
+  /**
+   * Defines a new package and creates a Package object. The package should
+   * be defined before any class in the package is defined with
+   * <code>defineClass()</code>. The package should not yet be defined
+   * before in this classloader or in one of its parents (which means that
+   * <code>getPackage()</code> should return <code>null</code>). All
+   * parameters except the <code>name</code> of the package may be
+   * <code>null</code>.
+   *
+   * <p>Subclasses should call this method from their <code>findClass()</code>
+   * implementation before calling <code>defineClass()</code> on a Class
+   * in a not yet defined Package (which can be checked by calling
+   * <code>getPackage()</code>).
+   *
+   * @param name the name of the Package
+   * @param specTitle the name of the specification
+   * @param specVendor the name of the specification designer
+   * @param specVersion the version of this specification
+   * @param implTitle the name of the implementation
+   * @param implVendor the vendor that wrote this implementation
+   * @param implVersion the version of this implementation
+   * @param sealed if sealed the origin of the package classes
+   * @return the Package object for the specified package
+   * @throws IllegalArgumentException if the package name is null or it
+   *         was already defined by this classloader or one of its parents
+   * @see Package
+   * @since 1.2
+   */
+  protected Package definePackage(String name, String specTitle,
+                                  String specVendor, String specVersion,
+                                  String implTitle, String implVendor,
+                                  String implVersion, URL sealed)
+  {
+    if (getPackage(name) != null)
+      throw new IllegalArgumentException("Package " + name
+                                         + " already defined");
+    Package p = new Package(name, specTitle, specVendor, specVersion,
+                            implTitle, implVendor, implVersion, sealed);
+    synchronized (definedPackages)
+      {
+        definedPackages.put(name, p);
+      }
+    return p;
+  }
+
+  /**
+   * Returns the Package object for the requested package name. It returns
+   * null when the package is not defined by this classloader or one of its
+   * parents.
+   *
+   * @param name the package name to find
+   * @return the package, if defined
+   * @since 1.2
+   */
+  protected Package getPackage(String name)
+  {
+    Package p;
+    if (parent == null)
+      p = VMClassLoader.getPackage(name);
+    else
+      p = parent.getPackage(name);
+
+    if (p == null)
+      {
+	synchronized (definedPackages)
+	  {
+	    p = (Package) definedPackages.get(name);
+	  }
+      }
+    return p;
+  }
+
+  /**
+   * Returns all Package objects defined by this classloader and its parents.
+   *
+   * @return an array of all defined packages
+   * @since 1.2
+   */
+  protected Package[] getPackages()
+  {
+    // Get all our packages.
+    Package[] packages;
+    synchronized(definedPackages)
+      {
+        packages = new Package[definedPackages.size()];
+        definedPackages.values().toArray(packages);
+      }
+
+    // If we have a parent get all packages defined by our parents.
+    Package[] parentPackages;
+    if (parent == null)
+      parentPackages = VMClassLoader.getPackages();
+    else
+      parentPackages = parent.getPackages();
+
+    Package[] allPackages = new Package[parentPackages.length
+					+ packages.length];
+    System.arraycopy(parentPackages, 0, allPackages, 0,
+                     parentPackages.length);
+    System.arraycopy(packages, 0, allPackages, parentPackages.length,
+                     packages.length);
+    return allPackages;
+  }
+
+  /**
+   * Called by <code>Runtime.loadLibrary()</code> to get an absolute path
+   * to a (system specific) library that was requested by a class loaded
+   * by this classloader. The default implementation returns
+   * <code>null</code>. It should be implemented by subclasses when they
+   * have a way to find the absolute path to a library. If this method
+   * returns null the library is searched for in the default locations
+   * (the directories listed in the <code>java.library.path</code> system
+   * property).
+   *
+   * @param name the (system specific) name of the requested library
+   * @return the full pathname to the requested library, or null
+   * @see Runtime#loadLibrary()
+   * @since 1.2
+   */
+  protected String findLibrary(String name)
+  {
+    return null;
+  }
+
+  /**
+   * Set the default assertion status for classes loaded by this classloader,
+   * used unless overridden by a package or class request.
+   *
+   * @param enabled true to set the default to enabled
+   * @see #setClassAssertionStatus(String, boolean)
+   * @see #setPackageAssertionStatus(String, boolean)
+   * @see #clearAssertionStatus()
+   * @since 1.4
+   */
+  public void setDefaultAssertionStatus(boolean enabled)
+  {
+    defaultAssertionStatus = enabled;
+  }
+  
+  /**
+   * Set the default assertion status for packages, used unless overridden
+   * by a class request. This default also covers subpackages, unless they
+   * are also specified. The unnamed package should use null for the name.
+   *
+   * @param name the package (and subpackages) to affect
+   * @param enabled true to set the default to enabled
+   * @see #setDefaultAssertionStatus(String, boolean)
+   * @see #setClassAssertionStatus(String, boolean)
+   * @see #clearAssertionStatus()
+   * @since 1.4
+   */
+  public synchronized void setPackageAssertionStatus(String name,
+                                                     boolean enabled)
+  {
+    if (packageAssertionStatus == null)
+      packageAssertionStatus
+        = new HashMap(systemPackageAssertionStatus);
+    packageAssertionStatus.put(name, Boolean.valueOf(enabled));
+  }
+  
+  /**
+   * Set the default assertion status for a class. This only affects the
+   * status of top-level classes, any other string is harmless.
+   *
+   * @param name the class to affect
+   * @param enabled true to set the default to enabled
+   * @throws NullPointerException if name is null
+   * @see #setDefaultAssertionStatus(String, boolean)
+   * @see #setPackageAssertionStatus(String, boolean)
+   * @see #clearAssertionStatus()
+   * @since 1.4
+   */
+  public synchronized void setClassAssertionStatus(String name,
+                                                   boolean enabled)
+  {
+    if (classAssertionStatus == null)
+      classAssertionStatus = new HashMap(systemClassAssertionStatus);
+    // The toString() hack catches null, as required.
+    classAssertionStatus.put(name.toString(), Boolean.valueOf(enabled));
+  }
+  
+  /**
+   * Resets the default assertion status of this classloader, its packages
+   * and classes, all to false. This allows overriding defaults inherited
+   * from the command line.
+   *
+   * @see #setDefaultAssertionStatus(boolean)
+   * @see #setClassAssertionStatus(String, boolean)
+   * @see #setPackageAssertionStatus(String, boolean)
+   * @since 1.4
+   */
+  public synchronized void clearAssertionStatus()
+  {
+    defaultAssertionStatus = false;
+    packageAssertionStatus = new HashMap();
+    classAssertionStatus = new HashMap();
+  }
+
+  /**
+   * Return true if this loader is either the specified class loader
+   * or an ancestor thereof.
+   * @param loader the class loader to check
+   */
+  final boolean isAncestorOf(ClassLoader loader)
+  {
+    while (loader != null)
+      {
+	if (this == loader)
+	  return true;
+	loader = loader.parent;
+      }
+    return false;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/java/lang/EcosProcess.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/EcosProcess.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/EcosProcess.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/EcosProcess.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,63 @@
+// EcosProcess.java - Subclass of Process for eCos systems.
+
+/* Copyright (C) 1998, 1999  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package java.lang;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.IOException;
+
+/**
+ * @author Tom Tromey <tromey at cygnus.com>
+ * @date May 11, 1999
+ */
+
+// This is entirely internal to our implementation.
+
+// This file is copied to `ConcreteProcess.java' before compilation.
+// Hence the class name apparently does not match the file name.
+final class ConcreteProcess extends Process
+{
+  // See natEcosProcess.cc to understand why this is native.
+  public native void destroy ();
+
+  public int exitValue ()
+  {
+    return 0;
+  }
+  public InputStream getErrorStream ()
+  {
+    return null;
+  }
+
+  public InputStream getInputStream ()
+  {
+    return null;
+  }
+
+  public OutputStream getOutputStream ()
+  {
+    return null;
+  }
+
+  public int waitFor () throws InterruptedException
+  {
+    return 0;
+  }
+
+  public ConcreteProcess (String[] progarray,
+                          String[] envp,
+                          File dir)
+    throws IOException
+  {
+    throw new IOException ("eCos processes unimplemented");
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/java/lang/Math.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/Math.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/Math.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/Math.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,973 @@
+/* java.lang.Math -- common mathematical functions, native allowed
+   Copyright (C) 1998, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+import gnu.classpath.Configuration;
+
+import java.util.Random;
+
+/**
+ * Helper class containing useful mathematical functions and constants.
+ * <P>
+ *
+ * Note that angles are specified in radians.  Conversion functions are
+ * provided for your convenience.
+ *
+ * @author Paul Fisher
+ * @author John Keiser
+ * @author Eric Blake (ebb9 at email.byu.edu)
+ * @since 1.0
+ */
+public final class Math
+{
+  /**
+   * Math is non-instantiable
+   */
+  private Math()
+  {
+  }
+
+  static
+  {
+    if (Configuration.INIT_LOAD_LIBRARY)
+      {
+	System.loadLibrary("javalang");
+      }
+  }
+
+  /**
+   * A random number generator, initialized on first use.
+   */
+  private static Random rand;
+
+  /**
+   * The most accurate approximation to the mathematical constant <em>e</em>:
+   * <code>2.718281828459045</code>. Used in natural log and exp.
+   *
+   * @see #log(double)
+   * @see #exp(double)
+   */
+  public static final double E = 2.718281828459045;
+
+  /**
+   * The most accurate approximation to the mathematical constant <em>pi</em>:
+   * <code>3.141592653589793</code>. This is the ratio of a circle's diameter
+   * to its circumference.
+   */
+  public static final double PI = 3.141592653589793;
+
+  /**
+   * Take the absolute value of the argument.
+   * (Absolute value means make it positive.)
+   * <P>
+   *
+   * Note that the the largest negative value (Integer.MIN_VALUE) cannot
+   * be made positive.  In this case, because of the rules of negation in
+   * a computer, MIN_VALUE is what will be returned.
+   * This is a <em>negative</em> value.  You have been warned.
+   *
+   * @param i the number to take the absolute value of
+   * @return the absolute value
+   * @see Integer#MIN_VALUE
+   */
+  public static int abs(int i)
+  {
+    return (i < 0) ? -i : i;
+  }
+
+  /**
+   * Take the absolute value of the argument.
+   * (Absolute value means make it positive.)
+   * <P>
+   *
+   * Note that the the largest negative value (Long.MIN_VALUE) cannot
+   * be made positive.  In this case, because of the rules of negation in
+   * a computer, MIN_VALUE is what will be returned.
+   * This is a <em>negative</em> value.  You have been warned.
+   *
+   * @param l the number to take the absolute value of
+   * @return the absolute value
+   * @see Long#MIN_VALUE
+   */
+  public static long abs(long l)
+  {
+    return (l < 0) ? -l : l;
+  }
+
+  /**
+   * Take the absolute value of the argument.
+   * (Absolute value means make it positive.)
+   * <P>
+   *
+   * This is equivalent, but faster than, calling
+   * <code>Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))</code>.
+   *
+   * @param f the number to take the absolute value of
+   * @return the absolute value
+   */
+  public static float abs(float f)
+  {
+    return (f <= 0) ? 0 - f : f;
+  }
+
+  /**
+   * Take the absolute value of the argument.
+   * (Absolute value means make it positive.)
+   *
+   * This is equivalent, but faster than, calling
+   * <code>Double.longBitsToDouble(Double.doubleToLongBits(a)
+   *       << 1) >>> 1);</code>.
+   *
+   * @param d the number to take the absolute value of
+   * @return the absolute value
+   */
+  public static double abs(double d)
+  {
+    return (d <= 0) ? 0 - d : d;
+  }
+
+  /**
+   * Return whichever argument is smaller.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the smaller of the two numbers
+   */
+  public static int min(int a, int b)
+  {
+    return (a < b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is smaller.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the smaller of the two numbers
+   */
+  public static long min(long a, long b)
+  {
+    return (a < b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is smaller. If either argument is NaN, the
+   * result is NaN, and when comparing 0 and -0, -0 is always smaller.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the smaller of the two numbers
+   */
+  public static float min(float a, float b)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return a;
+    // no need to check if b is NaN; < will work correctly
+    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
+    if (a == 0 && b == 0)
+      return -(-a - b);
+    return (a < b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is smaller. If either argument is NaN, the
+   * result is NaN, and when comparing 0 and -0, -0 is always smaller.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the smaller of the two numbers
+   */
+  public static double min(double a, double b)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return a;
+    // no need to check if b is NaN; < will work correctly
+    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
+    if (a == 0 && b == 0)
+      return -(-a - b);
+    return (a < b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is larger.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the larger of the two numbers
+   */
+  public static int max(int a, int b)
+  {
+    return (a > b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is larger.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the larger of the two numbers
+   */
+  public static long max(long a, long b)
+  {
+    return (a > b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is larger. If either argument is NaN, the
+   * result is NaN, and when comparing 0 and -0, 0 is always larger.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the larger of the two numbers
+   */
+  public static float max(float a, float b)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return a;
+    // no need to check if b is NaN; > will work correctly
+    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
+    if (a == 0 && b == 0)
+      return a - -b;
+    return (a > b) ? a : b;
+  }
+
+  /**
+   * Return whichever argument is larger. If either argument is NaN, the
+   * result is NaN, and when comparing 0 and -0, 0 is always larger.
+   *
+   * @param a the first number
+   * @param b a second number
+   * @return the larger of the two numbers
+   */
+  public static double max(double a, double b)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return a;
+    // no need to check if b is NaN; > will work correctly
+    // recall that -0.0 == 0.0, but [+-]0.0 - [+-]0.0 behaves special
+    if (a == 0 && b == 0)
+      return a - -b;
+    return (a > b) ? a : b;
+  }
+
+  /**
+   * The trigonometric function <em>sin</em>. The sine of NaN or infinity is
+   * NaN, and the sine of 0 retains its sign. This is accurate within 1 ulp,
+   * and is semi-monotonic.
+   *
+   * @param a the angle (in radians)
+   * @return sin(a)
+   */
+  public static native double sin(double a);
+
+  /**
+   * The trigonometric function <em>cos</em>. The cosine of NaN or infinity is
+   * NaN. This is accurate within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the angle (in radians)
+   * @return cos(a)
+   */
+  public static native double cos(double a);
+
+  /**
+   * The trigonometric function <em>tan</em>. The tangent of NaN or infinity
+   * is NaN, and the tangent of 0 retains its sign. This is accurate within 1
+   * ulp, and is semi-monotonic.
+   *
+   * @param a the angle (in radians)
+   * @return tan(a)
+   */
+  public static native double tan(double a);
+
+  /**
+   * The trigonometric function <em>arcsin</em>. The range of angles returned
+   * is -pi/2 to pi/2 radians (-90 to 90 degrees). If the argument is NaN or
+   * its absolute value is beyond 1, the result is NaN; and the arcsine of
+   * 0 retains its sign. This is accurate within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the sin to turn back into an angle
+   * @return arcsin(a)
+   */
+  public static native double asin(double a);
+
+  /**
+   * The trigonometric function <em>arccos</em>. The range of angles returned
+   * is 0 to pi radians (0 to 180 degrees). If the argument is NaN or
+   * its absolute value is beyond 1, the result is NaN. This is accurate
+   * within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the cos to turn back into an angle
+   * @return arccos(a)
+   */
+  public static native double acos(double a);
+
+  /**
+   * The trigonometric function <em>arcsin</em>. The range of angles returned
+   * is -pi/2 to pi/2 radians (-90 to 90 degrees). If the argument is NaN, the
+   * result is NaN; and the arctangent of 0 retains its sign. This is accurate
+   * within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the tan to turn back into an angle
+   * @return arcsin(a)
+   * @see #atan2(double, double)
+   */
+  public static native double atan(double a);
+
+  /**
+   * A special version of the trigonometric function <em>arctan</em>, for
+   * converting rectangular coordinates <em>(x, y)</em> to polar
+   * <em>(r, theta)</em>. This computes the arctangent of x/y in the range
+   * of -pi to pi radians (-180 to 180 degrees). Special cases:<ul>
+   * <li>If either argument is NaN, the result is NaN.</li>
+   * <li>If the first argument is positive zero and the second argument is
+   * positive, or the first argument is positive and finite and the second
+   * argument is positive infinity, then the result is positive zero.</li>
+   * <li>If the first argument is negative zero and the second argument is
+   * positive, or the first argument is negative and finite and the second
+   * argument is positive infinity, then the result is negative zero.</li>
+   * <li>If the first argument is positive zero and the second argument is
+   * negative, or the first argument is positive and finite and the second
+   * argument is negative infinity, then the result is the double value
+   * closest to pi.</li>
+   * <li>If the first argument is negative zero and the second argument is
+   * negative, or the first argument is negative and finite and the second
+   * argument is negative infinity, then the result is the double value
+   * closest to -pi.</li>
+   * <li>If the first argument is positive and the second argument is
+   * positive zero or negative zero, or the first argument is positive
+   * infinity and the second argument is finite, then the result is the
+   * double value closest to pi/2.</li>
+   * <li>If the first argument is negative and the second argument is
+   * positive zero or negative zero, or the first argument is negative
+   * infinity and the second argument is finite, then the result is the
+   * double value closest to -pi/2.</li>
+   * <li>If both arguments are positive infinity, then the result is the
+   * double value closest to pi/4.</li>
+   * <li>If the first argument is positive infinity and the second argument
+   * is negative infinity, then the result is the double value closest to
+   * 3*pi/4.</li>
+   * <li>If the first argument is negative infinity and the second argument
+   * is positive infinity, then the result is the double value closest to
+   * -pi/4.</li>
+   * <li>If both arguments are negative infinity, then the result is the
+   * double value closest to -3*pi/4.</li>
+   *
+   * </ul><p>This is accurate within 2 ulps, and is semi-monotonic. To get r,
+   * use sqrt(x*x+y*y).
+   *
+   * @param y the y position
+   * @param x the x position
+   * @return <em>theta</em> in the conversion of (x, y) to (r, theta)
+   * @see #atan(double)
+   */
+  public static native double atan2(double y, double x);
+
+  /**
+   * Take <em>e</em><sup>a</sup>.  The opposite of <code>log()</code>. If the
+   * argument is NaN, the result is NaN; if the argument is positive infinity,
+   * the result is positive infinity; and if the argument is negative
+   * infinity, the result is positive zero. This is accurate within 1 ulp,
+   * and is semi-monotonic.
+   *
+   * @param a the number to raise to the power
+   * @return the number raised to the power of <em>e</em>
+   * @see #log(double)
+   * @see #pow(double, double)
+   */
+  public static native double exp(double a);
+
+  /**
+   * Take ln(a) (the natural log).  The opposite of <code>exp()</code>. If the
+   * argument is NaN or negative, the result is NaN; if the argument is
+   * positive infinity, the result is positive infinity; and if the argument
+   * is either zero, the result is negative infinity. This is accurate within
+   * 1 ulp, and is semi-monotonic.
+   *
+   * <p>Note that the way to get log<sub>b</sub>(a) is to do this:
+   * <code>ln(a) / ln(b)</code>.
+   *
+   * @param a the number to take the natural log of
+   * @return the natural log of <code>a</code>
+   * @see #exp(double)
+   */
+  public static native double log(double a);
+
+  /**
+   * Take a square root. If the argument is NaN or negative, the result is
+   * NaN; if the argument is positive infinity, the result is positive
+   * infinity; and if the result is either zero, the result is the same.
+   * This is accurate within the limits of doubles.
+   *
+   * <p>For other roots, use pow(a, 1 / rootNumber).
+   *
+   * @param a the numeric argument
+   * @return the square root of the argument
+   * @see #pow(double, double)
+   */
+  public static native double sqrt(double a);
+
+  /**
+   * Raise a number to a power. Special cases:<ul>
+   * <li>If the second argument is positive or negative zero, then the result
+   * is 1.0.</li>
+   * <li>If the second argument is 1.0, then the result is the same as the
+   * first argument.</li>
+   * <li>If the second argument is NaN, then the result is NaN.</li>
+   * <li>If the first argument is NaN and the second argument is nonzero,
+   * then the result is NaN.</li>
+   * <li>If the absolute value of the first argument is greater than 1 and
+   * the second argument is positive infinity, or the absolute value of the
+   * first argument is less than 1 and the second argument is negative
+   * infinity, then the result is positive infinity.</li>
+   * <li>If the absolute value of the first argument is greater than 1 and
+   * the second argument is negative infinity, or the absolute value of the
+   * first argument is less than 1 and the second argument is positive
+   * infinity, then the result is positive zero.</li>
+   * <li>If the absolute value of the first argument equals 1 and the second
+   * argument is infinite, then the result is NaN.</li>
+   * <li>If the first argument is positive zero and the second argument is
+   * greater than zero, or the first argument is positive infinity and the
+   * second argument is less than zero, then the result is positive zero.</li>
+   * <li>If the first argument is positive zero and the second argument is
+   * less than zero, or the first argument is positive infinity and the
+   * second argument is greater than zero, then the result is positive
+   * infinity.</li>
+   * <li>If the first argument is negative zero and the second argument is
+   * greater than zero but not a finite odd integer, or the first argument is
+   * negative infinity and the second argument is less than zero but not a
+   * finite odd integer, then the result is positive zero.</li>
+   * <li>If the first argument is negative zero and the second argument is a
+   * positive finite odd integer, or the first argument is negative infinity
+   * and the second argument is a negative finite odd integer, then the result
+   * is negative zero.</li>
+   * <li>If the first argument is negative zero and the second argument is
+   * less than zero but not a finite odd integer, or the first argument is
+   * negative infinity and the second argument is greater than zero but not a
+   * finite odd integer, then the result is positive infinity.</li>
+   * <li>If the first argument is negative zero and the second argument is a
+   * negative finite odd integer, or the first argument is negative infinity
+   * and the second argument is a positive finite odd integer, then the result
+   * is negative infinity.</li>
+   * <li>If the first argument is less than zero and the second argument is a
+   * finite even integer, then the result is equal to the result of raising
+   * the absolute value of the first argument to the power of the second
+   * argument.</li>
+   * <li>If the first argument is less than zero and the second argument is a
+   * finite odd integer, then the result is equal to the negative of the
+   * result of raising the absolute value of the first argument to the power
+   * of the second argument.</li>
+   * <li>If the first argument is finite and less than zero and the second
+   * argument is finite and not an integer, then the result is NaN.</li>
+   * <li>If both arguments are integers, then the result is exactly equal to
+   * the mathematical result of raising the first argument to the power of
+   * the second argument if that result can in fact be represented exactly as
+   * a double value.</li>
+   *
+   * </ul><p>(In the foregoing descriptions, a floating-point value is
+   * considered to be an integer if and only if it is a fixed point of the
+   * method {@link #ceil(double)} or, equivalently, a fixed point of the
+   * method {@link #floor(double)}. A value is a fixed point of a one-argument
+   * method if and only if the result of applying the method to the value is
+   * equal to the value.) This is accurate within 1 ulp, and is semi-monotonic.
+   *
+   * @param a the number to raise
+   * @param b the power to raise it to
+   * @return a<sup>b</sup>
+   */
+  public static native double pow(double a, double b);
+
+  /**
+   * Get the IEEE 754 floating point remainder on two numbers. This is the
+   * value of <code>x - y * <em>n</em></code>, where <em>n</em> is the closest
+   * double to <code>x / y</code> (ties go to the even n); for a zero
+   * remainder, the sign is that of <code>x</code>. If either argument is NaN,
+   * the first argument is infinite, or the second argument is zero, the result
+   * is NaN; if x is finite but y is infinite, the result is x. This is
+   * accurate within the limits of doubles.
+   *
+   * @param x the dividend (the top half)
+   * @param y the divisor (the bottom half)
+   * @return the IEEE 754-defined floating point remainder of x/y
+   * @see #rint(double)
+   */
+  public static native double IEEEremainder(double x, double y);
+
+  /**
+   * Take the nearest integer that is that is greater than or equal to the
+   * argument. If the argument is NaN, infinite, or zero, the result is the
+   * same; if the argument is between -1 and 0, the result is negative zero.
+   * Note that <code>Math.ceil(x) == -Math.floor(-x)</code>.
+   *
+   * @param a the value to act upon
+   * @return the nearest integer >= <code>a</code>
+   */
+  public static native double ceil(double a);
+
+  /**
+   * Take the nearest integer that is that is less than or equal to the
+   * argument. If the argument is NaN, infinite, or zero, the result is the
+   * same. Note that <code>Math.ceil(x) == -Math.floor(-x)</code>.
+   *
+   * @param a the value to act upon
+   * @return the nearest integer <= <code>a</code>
+   */
+  public static native double floor(double a);
+
+  /**
+   * Take the nearest integer to the argument.  If it is exactly between
+   * two integers, the even integer is taken. If the argument is NaN,
+   * infinite, or zero, the result is the same.
+   *
+   * @param a the value to act upon
+   * @return the nearest integer to <code>a</code>
+   */
+  public static native double rint(double a);
+
+  /**
+   * Take the nearest integer to the argument.  This is equivalent to
+   * <code>(int) Math.floor(a + 0.5f)</code>. If the argument is NaN, the result
+   * is 0; otherwise if the argument is outside the range of int, the result
+   * will be Integer.MIN_VALUE or Integer.MAX_VALUE, as appropriate.
+   *
+   * @param a the argument to round
+   * @return the nearest integer to the argument
+   * @see Integer#MIN_VALUE
+   * @see Integer#MAX_VALUE
+   */
+  public static int round(float a)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return 0;
+    return (int) floor(a + 0.5f);
+  }
+
+  /**
+   * Take the nearest long to the argument.  This is equivalent to
+   * <code>(long) Math.floor(a + 0.5)</code>. If the argument is NaN, the
+   * result is 0; otherwise if the argument is outside the range of long, the
+   * result will be Long.MIN_VALUE or Long.MAX_VALUE, as appropriate.
+   *
+   * @param a the argument to round
+   * @return the nearest long to the argument
+   * @see Long#MIN_VALUE
+   * @see Long#MAX_VALUE
+   */
+  public static long round(double a)
+  {
+    // this check for NaN, from JLS 15.21.1, saves a method call
+    if (a != a)
+      return 0;
+    return (long) floor(a + 0.5d);
+  }
+
+  /**
+   * Get a random number.  This behaves like Random.nextDouble(), seeded by
+   * System.currentTimeMillis() when first called. In other words, the number
+   * is from a pseudorandom sequence, and lies in the range [+0.0, 1.0).
+   * This random sequence is only used by this method, and is threadsafe,
+   * although you may want your own random number generator if it is shared
+   * among threads.
+   *
+   * @return a random number
+   * @see Random#nextDouble()
+   * @see System#currentTimeMillis()
+   */
+  public static synchronized double random()
+  {
+    if (rand == null)
+      rand = new Random();
+    return rand.nextDouble();
+  }
+
+  /**
+   * Convert from degrees to radians. The formula for this is
+   * radians = degrees * (pi/180); however it is not always exact given the
+   * limitations of floating point numbers.
+   *
+   * @param degrees an angle in degrees
+   * @return the angle in radians
+   * @since 1.2
+   */
+  public static double toRadians(double degrees)
+  {
+    return (degrees * PI) / 180;
+  }
+
+  /**
+   * Convert from radians to degrees. The formula for this is
+   * degrees = radians * (180/pi); however it is not always exact given the
+   * limitations of floating point numbers.
+   *
+   * @param rads an angle in radians
+   * @return the angle in degrees
+   * @since 1.2
+   */
+  public static double toDegrees(double rads)
+  {
+    return (rads * 180) / PI;
+  }
+
+  /**
+   * <p>
+   * Take a cube root. If the argument is <code>NaN</code>, an infinity or
+   * zero, then the original value is returned.  The returned result is
+   * within 1 ulp of the exact result.  For a finite value, <code>x</code>,
+   * the cube root of <code>-x</code> is equal to the negation of the cube root
+   * of <code>x</code>. 
+   * </p>
+   * <p>
+   * For a square root, use <code>sqrt</code>.  For other roots, use
+   * <code>pow(a, 1 / rootNumber)</code>.
+   * </p>
+   *
+   * @param a the numeric argument
+   * @return the cube root of the argument
+   * @see #sqrt(double)
+   * @see #pow(double, double)
+   * @since 1.5
+   */
+  public static native double cbrt(double a);
+
+  /**
+   * <p>
+   * Returns the hyperbolic cosine of the given value.  For a value,
+   * <code>x</code>, the hyperbolic cosine is <code>(e<sup>x</sup> + 
+   * e<sup>-x</sup>)/2</code>
+   * with <code>e</code> being <a href="#E">Euler's number</a>.  The returned
+   * result is within 2.5 ulps of the exact result.
+   * </p>
+   * <p>
+   * If the supplied value is <code>NaN</code>, then the original value is
+   * returned.  For either infinity, positive infinity is returned.
+   * The hyperbolic cosine of zero is 1.0.
+   * </p>
+   * 
+   * @param a the numeric argument
+   * @return the hyperbolic cosine of <code>a</code>.
+   * @since 1.5
+   */
+  public static native double cosh(double a);
+
+  /**
+   * <p>
+   * Returns <code>e<sup>a</sup> - 1.  For values close to 0, the
+   * result of <code>expm1(a) + 1</code> tend to be much closer to the
+   * exact result than simply <code>exp(x)</code>.  The result is within
+   * 1 ulp of the exact result, and results are semi-monotonic.  For finite
+   * inputs, the returned value is greater than or equal to -1.0.  Once
+   * a result enters within half a ulp of this limit, the limit is returned.
+   * </p>   
+   * <p>
+   * For <code>NaN</code>, positive infinity and zero, the original value
+   * is returned.  Negative infinity returns a result of -1.0 (the limit).
+   * </p>
+   * 
+   * @param a the numeric argument
+   * @return <code>e<sup>a</sup> - 1</code>
+   * @since 1.5
+   */
+  public static native double expm1(double a);
+
+  /**
+   * <p>
+   * Returns the hypotenuse, <code>a<sup>2</sup> + b<sup>2</sup></code>,
+   * without intermediate overflow or underflow.  The returned result is
+   * within 1 ulp of the exact result.  If one parameter is held constant,
+   * then the result in the other parameter is semi-monotonic.
+   * </p>
+   * <p>
+   * If either of the arguments is an infinity, then the returned result
+   * is positive infinity.  Otherwise, if either argument is <code>NaN</code>,
+   * then <code>NaN</code> is returned.
+   * </p>
+   * 
+   * @param a the first parameter.
+   * @param b the second parameter.
+   * @return the hypotenuse matching the supplied parameters.
+   * @since 1.5
+   */
+  public static native double hypot(double a, double b);
+
+  /**
+   * <p>
+   * Returns the base 10 logarithm of the supplied value.  The returned
+   * result is within 1 ulp of the exact result, and the results are
+   * semi-monotonic.
+   * </p>
+   * <p>
+   * Arguments of either <code>NaN</code> or less than zero return
+   * <code>NaN</code>.  An argument of positive infinity returns positive
+   * infinity.  Negative infinity is returned if either positive or negative
+   * zero is supplied.  Where the argument is the result of
+   * <code>10<sup>n</sup</code>, then <code>n</code> is returned.
+   * </p>
+   *
+   * @param a the numeric argument.
+   * @return the base 10 logarithm of <code>a</code>.
+   * @since 1.5
+   */
+  public static native double log10(double a);
+
+  /**
+   * <p>
+   * Returns the natural logarithm resulting from the sum of the argument,
+   * <code>a</code> and 1.  For values close to 0, the
+   * result of <code>log1p(a)</code> tend to be much closer to the
+   * exact result than simply <code>log(1.0+a)</code>.  The returned
+   * result is within 1 ulp of the exact result, and the results are
+   * semi-monotonic.
+   * </p>
+   * <p>
+   * Arguments of either <code>NaN</code> or less than -1 return
+   * <code>NaN</code>.  An argument of positive infinity or zero
+   * returns the original argument.  Negative infinity is returned from an
+   * argument of -1.
+   * </p>
+   *
+   * @param a the numeric argument.
+   * @return the natural logarithm of <code>a</code> + 1.
+   * @since 1.5
+   */
+  public static native double log1p(double a);
+
+  /**
+   * <p>
+   * Returns the sign of the argument as follows:
+   * </p>
+   * <ul>
+   * <li>If <code>a</code> is greater than zero, the result is 1.0.</li>
+   * <li>If <code>a</code> is less than zero, the result is -1.0.</li>
+   * <li>If <code>a</code> is <code>NaN</code>, the result is <code>NaN</code>.
+   * <li>If <code>a</code> is positive or negative zero, the result is the
+   * same.</li>
+   * </ul>
+   *
+   * @param a the numeric argument.
+   * @return the sign of the argument.
+   * @since 1.5.
+   */
+  public static double signum(double a)
+  {
+    if (Double.isNaN(a))
+      return Double.NaN;
+    if (a > 0)
+      return 1.0;
+    if (a < 0)
+      return -1.0;
+    return a;
+  }
+
+  /**
+   * <p>
+   * Returns the sign of the argument as follows:
+   * </p>
+   * <ul>
+   * <li>If <code>a</code> is greater than zero, the result is 1.0f.</li>
+   * <li>If <code>a</code> is less than zero, the result is -1.0f.</li>
+   * <li>If <code>a</code> is <code>NaN</code>, the result is <code>NaN</code>.
+   * <li>If <code>a</code> is positive or negative zero, the result is the
+   * same.</li>
+   * </ul>
+   *
+   * @param a the numeric argument.
+   * @return the sign of the argument.
+   * @since 1.5.
+   */
+  public static float signum(float a)
+  {
+    if (Float.isNaN(a))
+      return Float.NaN;
+    if (a > 0)
+      return 1.0f;
+    if (a < 0)
+      return -1.0f;
+    return a;
+  }
+
+  /**
+   * <p>
+   * Returns the hyperbolic sine of the given value.  For a value,
+   * <code>x</code>, the hyperbolic sine is <code>(e<sup>x</sup> - 
+   * e<sup>-x</sup>)/2</code>
+   * with <code>e</code> being <a href="#E">Euler's number</a>.  The returned
+   * result is within 2.5 ulps of the exact result.
+   * </p>
+   * <p>
+   * If the supplied value is <code>NaN</code>, an infinity or a zero, then the
+   * original value is returned.
+   * </p>
+   * 
+   * @param a the numeric argument
+   * @return the hyperbolic sine of <code>a</code>.
+   * @since 1.5
+   */
+  public static native double sinh(double a);
+
+  /**
+   * <p>
+   * Returns the hyperbolic tangent of the given value.  For a value,
+   * <code>x</code>, the hyperbolic tangent is <code>(e<sup>x</sup> - 
+   * e<sup>-x</sup>)/(e<sup>x</sup> + e<sup>-x</sup>)</code>
+   * (i.e. <code>sinh(a)/cosh(a)</code>)
+   * with <code>e</code> being <a href="#E">Euler's number</a>.  The returned
+   * result is within 2.5 ulps of the exact result.  The absolute value
+   * of the exact result is always less than 1.  Computed results are thus
+   * less than or equal to 1 for finite arguments, with results within
+   * half a ulp of either positive or negative 1 returning the appropriate
+   * limit value (i.e. as if the argument was an infinity).
+   * </p>
+   * <p>
+   * If the supplied value is <code>NaN</code> or zero, then the original
+   * value is returned.  Positive infinity returns +1.0 and negative infinity
+   * returns -1.0.
+   * </p>
+   * 
+   * @param a the numeric argument
+   * @return the hyperbolic tangent of <code>a</code>.
+   * @since 1.5
+   */
+  public static native double tanh(double a);
+
+  /**
+   * Return the ulp for the given double argument.  The ulp is the
+   * difference between the argument and the next larger double.  Note
+   * that the sign of the double argument is ignored, that is,
+   * ulp(x) == ulp(-x).  If the argument is a NaN, then NaN is returned.
+   * If the argument is an infinity, then +Inf is returned.  If the
+   * argument is zero (either positive or negative), then
+   * {@link Double#MIN_VALUE} is returned.
+   * @param d the double whose ulp should be returned
+   * @return the difference between the argument and the next larger double
+   * @since 1.5
+   */
+  public static double ulp(double d)
+  {
+    if (Double.isNaN(d))
+      return d;
+    if (Double.isInfinite(d))
+      return Double.POSITIVE_INFINITY;
+    // This handles both +0.0 and -0.0.
+    if (d == 0.0)
+      return Double.MIN_VALUE;
+    long bits = Double.doubleToLongBits(d);
+    final int mantissaBits = 52;
+    final int exponentBits = 11;
+    final long mantMask = (1L << mantissaBits) - 1;
+    long mantissa = bits & mantMask;
+    final long expMask = (1L << exponentBits) - 1;
+    long exponent = (bits >>> mantissaBits) & expMask;
+
+    // Denormal number, so the answer is easy.
+    if (exponent == 0)
+      {
+        long result = (exponent << mantissaBits) | 1L;
+        return Double.longBitsToDouble(result);
+      }
+
+    // Conceptually we want to have '1' as the mantissa.  Then we would
+    // shift the mantissa over to make a normal number.  If this underflows
+    // the exponent, we will make a denormal result.
+    long newExponent = exponent - mantissaBits;
+    long newMantissa;
+    if (newExponent > 0)
+      newMantissa = 0;
+    else
+      {
+        newMantissa = 1L << -(newExponent - 1);
+        newExponent = 0;
+      }
+    return Double.longBitsToDouble((newExponent << mantissaBits) | newMantissa);
+  }
+
+  /**
+   * Return the ulp for the given float argument.  The ulp is the
+   * difference between the argument and the next larger float.  Note
+   * that the sign of the float argument is ignored, that is,
+   * ulp(x) == ulp(-x).  If the argument is a NaN, then NaN is returned.
+   * If the argument is an infinity, then +Inf is returned.  If the
+   * argument is zero (either positive or negative), then
+   * {@link Float#MIN_VALUE} is returned.
+   * @param f the float whose ulp should be returned
+   * @return the difference between the argument and the next larger float
+   * @since 1.5
+   */
+  public static float ulp(float f)
+  {
+    if (Float.isNaN(f))
+      return f;
+    if (Float.isInfinite(f))
+      return Float.POSITIVE_INFINITY;
+    // This handles both +0.0 and -0.0.
+    if (f == 0.0)
+      return Float.MIN_VALUE;
+    int bits = Float.floatToIntBits(f);
+    final int mantissaBits = 23;
+    final int exponentBits = 8;
+    final int mantMask = (1 << mantissaBits) - 1;
+    int mantissa = bits & mantMask;
+    final int expMask = (1 << exponentBits) - 1;
+    int exponent = (bits >>> mantissaBits) & expMask;
+
+    // Denormal number, so the answer is easy.
+    if (exponent == 0)
+      {
+        int result = (exponent << mantissaBits) | 1;
+        return Float.intBitsToFloat(result);
+      }
+
+    // Conceptually we want to have '1' as the mantissa.  Then we would
+    // shift the mantissa over to make a normal number.  If this underflows
+    // the exponent, we will make a denormal result.
+    int newExponent = exponent - mantissaBits;
+    int newMantissa;
+    if (newExponent > 0)
+      newMantissa = 0;
+    else
+      {
+        newMantissa = 1 << -(newExponent - 1);
+        newExponent = 0;
+      }
+    return Float.intBitsToFloat((newExponent << mantissaBits) | newMantissa);
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/java/lang/Object.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/Object.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/Object.h (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/Object.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,91 @@
+// Object.h - Header file for java.lang.Object.  -*- c++ -*-
+
+/* Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JAVA_LANG_OBJECT_H__
+#define __JAVA_LANG_OBJECT_H__
+
+#pragma interface
+
+#include <gcj/javaprims.h>
+
+extern "Java"
+{
+// This class is mainly here as a kludge to get G++ to allocate two
+// extra entries in each vtable.
+struct _JvObjectPrefix
+{
+protected:
+  // New ABI Compatibility Dummy, #1 and 2.
+  virtual void nacd_1 (void) {}; // This slot really contains the Class pointer.
+  // For IA64, the GC descriptor goes into the second word of the nacd1 descr.
+# ifndef __ia64__
+    virtual void nacd_2 (void) {}; // Actually the GC bitmap marking descriptor.
+# endif
+};
+}
+
+// Forward declarations for friends of java::lang::Object
+void _Jv_MonitorEnter (jobject obj);
+void _Jv_MonitorExit (jobject obj);
+void _Jv_InitializeSyncMutex (void);
+void _Jv_FinalizeObject (jobject obj);
+bool _Jv_ObjectCheckMonitor (jobject obj);
+
+class java::lang::Object : public _JvObjectPrefix
+{
+protected:
+  virtual void finalize (void);
+public:
+  // Order must match order in Object.java.
+  jclass getClass (void);
+  virtual jint hashCode (void);
+  void notify (void);
+  void notifyAll (void);
+  void wait (jlong timeout, jint nanos);
+  virtual jboolean equals (jobject obj);
+  Object (void);
+  virtual jstring toString (void);
+  void wait (void);
+  void wait (jlong timeout);
+
+  friend void ::_Jv_MonitorEnter (jobject obj);
+  friend void ::_Jv_MonitorExit (jobject obj);
+  friend void ::_Jv_InitializeSyncMutex (void);
+  friend void ::_Jv_FinalizeObject (jobject obj);
+  friend bool ::_Jv_ObjectCheckMonitor (jobject obj);
+
+#ifdef JV_MARKOBJ_DECL
+  friend JV_MARKOBJ_DECL;
+#endif
+#ifdef JV_MARKARRAY_DECL
+  friend JV_MARKARRAY_DECL;
+#endif
+
+  static java::lang::Class class$;
+
+protected:
+  virtual jobject clone (void);
+
+private:
+  // This does not actually refer to a Java object.  Instead it is a
+  // placeholder for a piece of internal data (the synchronization
+  // information).
+# ifndef JV_HASH_SYNCHRONIZATION
+    jobject sync_info;
+# endif
+
+    // Initialize the sync_info field.  Not called with JV_HASH_SYNCHRONIZATION.
+    void sync_init (void);
+
+public:
+  virtual void throwNoSuchMethodError (void);
+};
+
+#endif /* __JAVA_LANG_OBJECT_H__ */

Added: llvm-gcc-4.2/trunk/libjava/java/lang/Object.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/Object.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/Object.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/Object.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,519 @@
+/* java.lang.Object - The universal superclass in Java
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
+   Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
+ * "The Java Language Specification", ISBN 0-201-63451-1
+ * plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
+ * plus gcj compiler sources (to determine object layout)
+ * Status:  Complete to version 1.1
+ */
+
+/**
+ * Object is the ultimate superclass of every class
+ * (excepting interfaces).  When you define a class that
+ * does not extend any other class, it implicitly extends
+ * java.lang.Object.  Also, an anonymous class based on
+ * an interface will extend Object.
+ *
+ * <p>It provides general-purpose methods that every single
+ * Object, regardless of race, sex or creed, implements.
+ * All of the public methods may be invoked on arrays or
+ * interfaces.  The protected methods <code>clone</code>
+ * and <code>finalize</code> are not accessible on arrays
+ * or interfaces, but all array types have a public version
+ * of <code>clone</code> which is accessible.
+ *
+ * @author John Keiser
+ * @author Eric Blake (ebb9 at email.byu.edu)
+ * @author Tom Tromey (tromey at cygnus.com)
+ */
+public class Object
+{
+  /**
+   * Called on an object by the Virtual Machine at most once,
+   * at some point after the Object is determined unreachable
+   * but before it is destroyed. You would think that this
+   * means it eventually is called on every Object, but this is
+   * not necessarily the case.  If execution terminates
+   * abnormally, garbage collection does not always happen.
+   * Thus you cannot rely on this method to always work.
+   * For finer control over garbage collection, use references
+   * from the {@link java.lang.ref} package.
+   *
+   * <p>Virtual Machines are free to not call this method if
+   * they can determine that it does nothing important; for
+   * example, if your class extends Object and overrides
+   * finalize to do simply <code>super.finalize()</code>.
+   *
+   * <p>finalize() will be called by a {@link Thread} that has no
+   * locks on any Objects, and may be called concurrently.
+   * There are no guarantees on the order in which multiple
+   * objects are finalized.  This means that finalize() is
+   * usually unsuited for performing actions that must be
+   * thread-safe, and that your implementation must be
+   * use defensive programming if it is to always work.
+   *
+   * <p>If an Exception is thrown from finalize() during garbage
+   * collection, it will be patently ignored and the Object will
+   * still be destroyed.
+   *
+   * <p>It is allowed, although not typical, for user code to call
+   * finalize() directly.  User invocation does not affect whether
+   * automatic invocation will occur.  It is also permitted,
+   * although not recommended, for a finalize() method to "revive"
+   * an object by making it reachable from normal code again.
+   *
+   * <p>Unlike constructors, finalize() does not get called
+   * for an object's superclass unless the implementation
+   * specifically calls <code>super.finalize()</code>.
+   *
+   * <p>The default implementation does nothing.
+   *
+   * @throws Throwable permits a subclass to throw anything in an
+   *         overridden version; but the default throws nothing
+   * @see System#gc()
+   * @see System#runFinalizersOnExit(boolean)
+   * @see java.lang.ref
+   */
+  // This must come first.  See _JvObjectPrefix in Object.h.
+  protected void finalize () throws Throwable
+  {
+  }
+
+  /**
+   * Returns the runtime {@link Class} of this Object.
+   *
+   * <p>The class object can also be obtained without a runtime
+   * instance by using the class literal, as in:
+   * <code>Foo.class</code>.  Notice that the class literal
+   * also works on primitive types, making it useful for
+   * reflection purposes.
+   *
+   * @return the class of this Object
+   */
+  public final native Class getClass();
+
+  /**
+   * Get a value that represents this Object, as uniquely as
+   * possible within the confines of an int.
+   *
+   * <p>There are some requirements on this method which
+   * subclasses must follow:<br>
+   *
+   * <ul>
+   * <li>Semantic equality implies identical hashcodes.  In other
+   *     words, if <code>a.equals(b)</code> is true, then
+   *     <code>a.hashCode() == b.hashCode()</code> must be as well.
+   *     However, the reverse is not necessarily true, and two
+   *     objects may have the same hashcode without being equal.</li>
+   * <li>It must be consistent.  Whichever value o.hashCode()
+   *     returns on the first invocation must be the value
+   *     returned on all later invocations as long as the object
+   *     exists.  Notice, however, that the result of hashCode may
+   *     change between separate executions of a Virtual Machine,
+   *     because it is not invoked on the same object.</li>
+   * </ul>
+   *
+   * <p>Notice that since <code>hashCode</code> is used in
+   * {@link java.util.Hashtable} and other hashing classes,
+   * a poor implementation will degrade the performance of hashing
+   * (so don't blindly implement it as returning a constant!). Also,
+   * if calculating the hash is time-consuming, a class may consider
+   * caching the results.
+   *
+   * <p>The default implementation returns
+   * <code>System.identityHashCode(this)</code>
+   *
+   * @return the hash code for this Object
+   * @see #equals(Object)
+   * @see System#identityHashCode(Object)
+   */
+  public native int hashCode();
+
+  /**
+   * Wakes up one of the {@link Thread}s that has called
+   * <code>wait</code> on this Object.  Only the owner
+   * of a lock on this Object may call this method.  This lock
+   * is obtained by a <code>synchronized</code> method or statement.
+   *
+   * <p>The Thread to wake up is chosen arbitrarily.  The
+   * awakened thread is not guaranteed to be the next thread
+   * to actually obtain the lock on this object.
+   *
+   * <p>This thread still holds a lock on the object, so it is
+   * typical to release the lock by exiting the synchronized
+   * code, calling wait(), or calling {@link Thread#sleep()}, so
+   * that the newly awakened thread can actually resume.  The
+   * awakened thread will most likely be awakened with an
+   * {@link InterruptedException}, but that is not guaranteed.
+   *
+   * @throws IllegalMonitorStateException if this Thread
+   *         does not own the lock on the Object
+   * @see #notifyAll()
+   * @see #wait()
+   * @see #wait(long)
+   * @see #wait(long, int)
+   * @see Thread
+   */
+  public final native void notify();
+  
+  /**
+   * Wakes up all of the {@link Thread}s that have called
+   * <code>wait</code> on this Object.  Only the owner
+   * of a lock on this Object may call this method.  This lock
+   * is obtained by a <code>synchronized</code> method or statement.
+   *
+   * <p>There are no guarantees as to which thread will next
+   * obtain the lock on the object.
+   *
+   * <p>This thread still holds a lock on the object, so it is
+   * typical to release the lock by exiting the synchronized
+   * code, calling wait(), or calling {@link Thread#sleep()}, so
+   * that one of the newly awakened threads can actually resume.
+   * The resuming thread will most likely be awakened with an
+   * {@link InterruptedException}, but that is not guaranteed.
+   *
+   * @throws IllegalMonitorStateException if this Thread
+   *         does not own the lock on the Object
+   * @see #notify()
+   * @see #wait()
+   * @see #wait(long)
+   * @see #wait(long, int)
+   * @see Thread
+   */
+  public final native void notifyAll();
+
+  /**
+   * Waits a specified amount of time (or indefinitely if
+   * the time specified is 0) for someone to call notify()
+   * or notifyAll() on this Object, waking up this Thread.
+   *
+   * <p>The Thread that calls wait must have a lock on this Object,
+   * obtained by a <code>synchronized</code> method or statement.
+   * After calling wait, the thread loses the lock on this
+   * object until the method completes (abruptly or normally),
+   * at which time it regains the lock.  All locks held on
+   * other objects remain in force, even though the thread is
+   * inactive. Therefore, caution must be used to avoid deadlock.
+   *
+   * <p>Usually, this call will complete normally if the time
+   * expires, or abruptly with {@link InterruptedException}
+   * if another thread called notify, but neither result
+   * is guaranteed.
+   *
+   * <p>The waiting period is nowhere near as precise as
+   * nanoseconds; considering that even wait(int) is inaccurate,
+   * how much can you expect?  But on supporting
+   * implementations, this offers somewhat more granularity
+   * than milliseconds.
+   *
+   * @param ms the number of milliseconds to wait (1,000
+   *        milliseconds = 1 second)
+   * @param ns the number of nanoseconds to wait over and
+   *        above ms (1,000,000 nanoseconds = 1 millisecond)
+   * @throws IllegalArgumentException if ms < 0 or ns is not
+   *         in the range 0 to 999,999
+   * @throws IllegalMonitorStateException if this Thread
+   *         does not own a lock on this Object
+   * @throws InterruptedException if some other Thread
+   *         interrupts this Thread
+   * @see #notify()
+   * @see #notifyAll()
+   * @see #wait()
+   * @see #wait(long)
+   * @see Thread
+   */
+  public final native void wait(long timeout, int nanos)
+    throws InterruptedException;
+
+  /**
+   * Determine whether this Object is semantically equal
+   * to another Object.
+   *
+   * <p>There are some fairly strict requirements on this
+   * method which subclasses must follow:<br>
+   * <ul>
+   * <li>It must be transitive.  If <code>a.equals(b)</code> and
+   *     <code>b.equals(c)</code>, then <code>a.equals(c)</code>
+   *     must be true as well.</li>
+   * <li>It must be symmetric.  <code>a.equals(b)</code> and
+   *     <code>b.equals(a)</code> must have the same value.</li>
+   * <li>It must be reflexive.  <code>a.equals(a)</code> must
+   *     always be true.</li>
+   * <li>It must be consistent.  Whichever value a.equals(b)
+   *     returns on the first invocation must be the value
+   *     returned on all later invocations.</li>
+   * <li><code>a.equals(null)</code> must be false.</li>
+   * <li>It must be consistent with hashCode().  That is,
+   *     <code>a.equals(b)</code> must imply
+   *     <code>a.hashCode() == b.hashCode()</code>.
+   *     The reverse is not true; two objects that are not
+   *     equal may have the same hashcode, but that has
+   *     the potential to harm hashing performance.</li>
+   * </ul>
+   *
+   * <p>This is typically overridden to throw a {@link ClassCastException}
+   * if the argument is not comparable to the class performing
+   * the comparison, but that is not a requirement.  It is legal
+   * for <code>a.equals(b)</code> to be true even though
+   * <code>a.getClass() != b.getClass()</code>.  Also, it
+   * is typical to never cause a {@link NullPointerException}.
+   *
+   * <p>In general, the Collections API ({@link java.util}) use the
+   * <code>equals</code> method rather than the <code>==</code>
+   * operator to compare objects.  However, {@link java.util.IdentityHashMap}
+   * is an exception to this rule, for its own good reasons.
+   *
+   * <p>The default implementation returns <code>this == o</code>.
+   *
+   * @param obj the Object to compare to
+   * @return whether this Object is semantically equal to another
+   * @see #hashCode()
+   */
+  public boolean equals(Object obj)
+  {
+    return this == obj;
+  }
+
+  /**
+   * The basic constructor.  Object is special, because it has no
+   * superclass, so there is no call to super().
+   *
+   * @throws OutOfMemoryError Technically, this constructor never
+   *         throws an OutOfMemoryError, because the memory has
+   *         already been allocated by this point.  But as all
+   *         instance creation expressions eventually trace back
+   *         to this constructor, and creating an object allocates
+   *         memory, we list that possibility here.
+   */
+  public Object()
+  {
+  }
+
+  /**
+   * Convert this Object to a human-readable String.
+   * There are no limits placed on how long this String
+   * should be or what it should contain.  We suggest you
+   * make it as intuitive as possible to be able to place
+   * it into {@link java.io.PrintStream#println() System.out.println()}
+   * and such.
+   *
+   * <p>It is typical, but not required, to ensure that this method
+   * never completes abruptly with a {@link RuntimeException}.
+   *
+   * <p>This method will be called when performing string
+   * concatenation with this object.  If the result is
+   * <code>null</code>, string concatenation will instead
+   * use <code>"null"</code>.
+   *
+   * <p>The default implementation returns
+   * <code>getClass().getName() + "@" +
+   *      Integer.toHexString(hashCode())</code>.
+   *
+   * @return the String representing this Object, which may be null
+   * @throws OutOfMemoryError The default implementation creates a new
+   *         String object, therefore it must allocate memory
+   * @see #getClass()
+   * @see #hashCode()
+   * @see Class#getName()
+   * @see Integer#toHexString(int)
+   */
+  public String toString()
+  {
+    return getClass().getName() + '@' + Integer.toHexString(hashCode());
+  }
+
+  /**
+   * Waits indefinitely for notify() or notifyAll() to be
+   * called on the Object in question.  Implementation is
+   * identical to wait(0).
+   *
+   * <p>The Thread that calls wait must have a lock on this Object,
+   * obtained by a <code>synchronized</code> method or statement.
+   * After calling wait, the thread loses the lock on this
+   * object until the method completes (abruptly or normally),
+   * at which time it regains the lock.  All locks held on
+   * other objects remain in force, even though the thread is
+   * inactive. Therefore, caution must be used to avoid deadlock.
+   *
+   * <p>While it is typical that this method will complete abruptly
+   * with an {@link InterruptedException}, it is not guaranteed.  So,
+   * it is typical to call wait inside an infinite loop:<br>
+   *
+   * <pre>
+   * try
+   *   {
+   *     while (true)
+   *       lock.wait();
+   *   }
+   * catch (InterruptedException e)
+   *   {
+   *   }
+   * </pre>
+   *
+   * @throws IllegalMonitorStateException if this Thread
+   *         does not own a lock on this Object
+   * @throws InterruptedException if some other Thread
+   *         interrupts this Thread
+   * @see #notify()
+   * @see #notifyAll()
+   * @see #wait(long)
+   * @see #wait(long, int)
+   * @see Thread
+   */
+  public final void wait() throws InterruptedException
+  {
+    wait(0, 0);
+  }
+
+  /**
+   * Waits a specified amount of time (or indefinitely if
+   * the time specified is 0) for someone to call notify()
+   * or notifyAll() on this Object, waking up this Thread.
+   *
+   * <p>The Thread that calls wait must have a lock on this Object,
+   * obtained by a <code>synchronized</code> method or statement.
+   * After calling wait, the thread loses the lock on this
+   * object until the method completes (abruptly or normally),
+   * at which time it regains the lock.  All locks held on
+   * other objects remain in force, even though the thread is
+   * inactive. Therefore, caution must be used to avoid deadlock.
+   *
+   * <p>Usually, this call will complete normally if the time
+   * expires, or abruptly with {@link InterruptedException}
+   * if another thread called notify, but neither result
+   * is guaranteed.
+   *
+   * <p>The waiting period is only *roughly* the amount of time
+   * you requested.  It cannot be exact because of the overhead
+   * of the call itself.  Most Virtual Machiness treat the
+   * argument as a lower limit on the time spent waiting, but
+   * even that is not guaranteed.  Besides, some other thread
+   * may hold the lock on the object when the time expires, so
+   * the current thread may still have to wait to reobtain the
+   * lock.
+   *
+   * @param timeout the minimum number of milliseconds to wait (1000
+   *        milliseconds = 1 second), or 0 for an indefinite wait
+   * @throws IllegalArgumentException if ms < 0
+   * @throws IllegalMonitorStateException if this Thread
+   *         does not own a lock on this Object
+   * @throws InterruptedException if some other Thread
+   *         interrupts this Thread
+   * @see #notify()
+   * @see #notifyAll()
+   * @see #wait()
+   * @see #wait(long, int)
+   * @see Thread
+   */
+  public final void wait(long timeout) throws InterruptedException
+  {
+    wait(timeout, 0);
+  }
+
+  /**
+   * This method may be called to create a new copy of the
+   * Object.  The typical behavior is as follows:<br>
+   * <ul>
+   *  <li><code>o == o.clone()</code> is false</li>
+   *  <li><code>o.getClass() == o.clone().getClass()</code>
+   *      is true</li>
+   *  <li><code>o.equals(o)</code> is true</li>
+   * </ul>
+   *
+   * <p>However, these are not strict requirements, and may
+   * be violated if necessary.  Of the three requirements, the
+   * last is the most commonly violated, particularly if the
+   * subclass does not override {@link #equals(Object)}.
+   *
+   * <p>If the Object you call clone() on does not implement
+   * {@link Cloneable} (which is a placeholder interface), then
+   * a CloneNotSupportedException is thrown.  Notice that
+   * Object does not implement Cloneable; this method exists
+   * as a convenience for subclasses that do.
+   *
+   * <p>Object's implementation of clone allocates space for the
+   * new Object using the correct class, without calling any
+   * constructors, and then fills in all of the new field values
+   * with the old field values.  Thus, it is a shallow copy.
+   * However, subclasses are permitted to make a deep copy.
+   *
+   * <p>All array types implement Cloneable, and override
+   * this method as follows (it should never fail):<br>
+   * <pre>
+   * public Object clone()
+   * {
+   *   try
+   *     {
+   *       super.clone();
+   *     }
+   *   catch (CloneNotSupportedException e)
+   *     {
+   *       throw new InternalError(e.getMessage());
+   *     }
+   * }
+   * </pre>
+   *
+   * @return a copy of the Object
+   * @throws CloneNotSupportedException If this Object does not
+   *         implement Cloneable
+   * @throws OutOfMemoryError Since cloning involves memory allocation,
+   *         even though it may bypass constructors, you might run
+   *         out of memory
+   * @see Cloneable
+   */
+  protected native Object clone() throws CloneNotSupportedException;
+
+  // This initializes the sync_info member.  It is here for
+  // completeness (some day we'll be able to auto-generate Object.h).
+  private final native void sync_init();
+
+  // If we fail to find a method at class loading time we put the
+  // vtable index of this method in its place: any attempt to call
+  // that method will result in an error.
+  void throwNoSuchMethodError()
+  {
+    throw new NoSuchMethodError("in " + getClass());
+  }
+
+  // Note that we don't mention the sync_info field here.  If we do,
+  // jc1 will not work correctly.
+}

Added: llvm-gcc-4.2/trunk/libjava/java/lang/Package.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/Package.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/Package.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/Package.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,317 @@
+/* Package.java -- information about a package
+   Copyright (C) 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang;
+
+import java.net.URL;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+
+
+/**
+ * Everything you ever wanted to know about a package. This class makes it
+ * possible to attach specification and implementation information to a
+ * package as explained in the
+ * <a href="http://java.sun.com/products/jdk/1.3/docs/guide/versioning/spec/VersioningSpecification.html#PackageVersionSpecification">Package Versioning Specification</a>
+ * section of the
+ * <a href="http://java.sun.com/products/jdk/1.3/docs/guide/versioning/spec/VersioningSpecification.html">Product Versioning Specification</a>.
+ * It also allows packages to be sealed with respect to the originating URL.
+ *
+ * <p>The most useful method is the <code>isCompatibleWith()</code> method that
+ * compares a desired version of a specification with the version of the
+ * specification as implemented by a package. A package is considered
+ * compatible with another version if the version of the specification is
+ * equal or higher then the requested version. Version numbers are represented
+ * as strings of positive numbers separated by dots (e.g. "1.2.0").
+ * The first number is called the major number, the second the minor,
+ * the third the micro, etc. A version is considered higher then another
+ * version if it has a bigger major number then the another version or when
+ * the major numbers of the versions are equal if it has a bigger minor number
+ * then the other version, etc. (If a version has no minor, micro, etc numbers
+ * then they are considered the be 0.)
+ *
+ * @author Mark Wielaard (mark at klomp.org)
+ * @see ClassLoader#definePackage(String, String, String, String, String,
+ *      String, String, URL)
+ * @since 1.2
+ * @status updated to 1.4
+ */
+public class Package
+{
+  /** The name of the Package */
+  private final String name;
+
+  /** The name if the implementation */
+  private final String implTitle;
+
+  /** The vendor that wrote this implementation */
+  private final String implVendor;
+
+  /** The version of this implementation */
+  private final String implVersion;
+
+  /** The name of the specification */
+  private final String specTitle;
+
+  /** The name of the specification designer */
+  private final String specVendor;
+
+  /** The version of this specification */
+  private final String specVersion;
+
+  /** If sealed the origin of the package classes, otherwise null */
+  private final URL sealed;
+
+  /**
+   * A package local constructor for the Package class. All parameters except
+   * the <code>name</code> of the package may be <code>null</code>.
+   * There are no public constructors defined for Package; this is a package
+   * local constructor that is used by java.lang.Classloader.definePackage().
+   * 
+   * @param name The name of the Package
+   * @param specTitle The name of the specification
+   * @param specVendor The name of the specification designer
+   * @param specVersion The version of this specification
+   * @param implTitle The name of the implementation
+   * @param implVendor The vendor that wrote this implementation
+   * @param implVersion The version of this implementation
+   * @param sealed If sealed the origin of the package classes
+   */
+  Package(String name,
+	  String specTitle, String specVendor, String specVersion,
+	  String implTitle, String implVendor, String implVersion, URL sealed)
+  {
+    if (name == null)
+      throw new IllegalArgumentException("null Package name");
+
+    this.name = name;
+    this.implTitle = implTitle;
+    this.implVendor = implVendor;
+    this.implVersion = implVersion;
+    this.specTitle = specTitle;
+    this.specVendor = specVendor;
+    this.specVersion = specVersion;
+    this.sealed = sealed;
+  }
+
+  /**
+   * Returns the Package name in dot-notation.
+   *
+   * @return the non-null package name
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * Returns the name of the specification, or null if unknown.
+   *
+   * @return the specification title
+   */
+  public String getSpecificationTitle()
+  {
+    return specTitle;
+  }
+
+  /**
+   * Returns the version of the specification, or null if unknown.
+   *
+   * @return the specification version
+   */
+  public String getSpecificationVersion()
+  {
+    return specVersion;
+  }
+
+  /**
+   * Returns the name of the specification designer, or null if unknown.
+   *
+   * @return the specification vendor
+   */
+  public String getSpecificationVendor()
+  {
+    return specVendor;
+  }
+
+  /**
+   * Returns the name of the implementation, or null if unknown.
+   *
+   * @return the implementation title
+   */
+  public String getImplementationTitle()
+  {
+    return implTitle;
+  }
+
+  /**
+   * Returns the version of this implementation, or null if unknown.
+   *
+   * @return the implementation version
+   */
+  public String getImplementationVersion()
+  {
+    return implVersion;
+  }
+
+  /**
+   * Returns the vendor that wrote this implementation, or null if unknown.
+   *
+   * @return the implementation vendor
+   */
+  public String getImplementationVendor()
+  {
+    return implVendor;
+  }
+
+  /**
+   * Returns true if this Package is sealed.
+   *
+   * @return true if the package is sealed
+   */
+  public boolean isSealed()
+  {
+    return sealed != null;
+  }
+
+  /**
+   * Returns true if this Package is sealed and the origin of the classes is
+   * the given URL.
+   *
+   * @param url the URL to test
+   * @return true if the package is sealed by this URL
+   * @throws NullPointerException if url is null
+   */
+  public boolean isSealed(URL url)
+  {
+    return url.equals(sealed);
+  }
+
+  /**
+   * Checks if the version of the specification is higher or at least as high
+   * as the desired version. Comparison is done by sequentially comparing
+   * dotted decimal numbers from the parameter and from
+   * <code>getSpecificationVersion</code>.
+   *
+   * @param version the (minimal) desired version of the specification
+   *
+   * @return true if the version is compatible, false otherwise
+   *
+   * @Throws NumberFormatException if either version string is invalid
+   * @throws NullPointerException if either version string is null
+   */
+  public boolean isCompatibleWith(String version)
+  {
+    StringTokenizer versionTokens = new StringTokenizer(version, ".");
+    StringTokenizer specTokens = new StringTokenizer(specVersion, ".");
+    try
+      {
+        while (versionTokens.hasMoreElements())
+          {
+            int vers = Integer.parseInt(versionTokens.nextToken());
+            int spec = Integer.parseInt(specTokens.nextToken());
+            if (spec < vers)
+              return false;
+            else if (spec > vers)
+              return true;
+            // They must be equal, next Token please!
+          }
+      }
+    catch (NoSuchElementException e)
+      {
+        // This must have been thrown by spec.nextToken() so return false.
+        return false;
+      }
+    // They must have been exactly the same version.
+    // Or the specVersion has more subversions. That is also good.
+    return true;
+  }
+
+  /**
+   * Returns the named package if it is known by the callers class loader.
+   * It may return null if the package is unknown, when there is no
+   * information on that particular package available or when the callers
+   * classloader is null.
+   *
+   * @param name the name of the desired package
+   * @return the package by that name in the current ClassLoader
+   */
+  public static Package getPackage(String name)
+  {
+    // Get the caller's classloader
+    ClassLoader cl = VMSecurityManager.currentClassLoader(Package.class);
+    return cl != null ? cl.getPackage(name) : VMClassLoader.getPackage(name);
+  }
+
+  /**
+   * Returns all the packages that are known to the callers class loader.
+   * It may return an empty array if the classloader of the caller is null.
+   *
+   * @return an array of all known packages
+   */
+  public static Package[] getPackages()
+  {
+    // Get the caller's classloader
+    Class c = VMSecurityManager.getClassContext(Package.class)[1];
+    ClassLoader cl = c.getClassLoader();
+    return cl != null ? cl.getPackages() : VMClassLoader.getPackages();
+  }
+
+  /**
+   * Returns the hashCode of the name of this package.
+   *
+   * @return the hash code
+   */
+  public int hashCode()
+  {
+    return name.hashCode();
+  }
+
+  /**
+   * Returns a string representation of this package. It is specified to
+   * be <code>"package " + getName() + (getSpecificationTitle() == null
+   * ? "" : ", " + getSpecificationTitle()) + (getSpecificationVersion()
+   * == null ? "" : ", version " + getSpecificationVersion())</code>.
+   *
+   * @return the string representation of the package
+   */
+  public String toString()
+  {
+    return ("package " + name + (specTitle == null ? "" : ", " + specTitle)
+	    + (specVersion == null ? "" : ", version " + specVersion));
+  }
+} // class Package

Added: llvm-gcc-4.2/trunk/libjava/java/lang/PosixProcess.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/PosixProcess.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/PosixProcess.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/PosixProcess.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,475 @@
+// PosixProcess.java - Subclass of Process for POSIX systems.
+/* Copyright (C) 1998, 1999, 2004  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package java.lang;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @author Tom Tromey <tromey at cygnus.com>
+ * @date May 3, 1999
+ * @author David Daney <ddaney at avtrex.com> Rewrote using
+ * ProcessManager
+ */
+
+// This is entirely internal to our implementation.
+// This file is copied to `ConcreteProcess.java' before compilation.
+// Hence the class name apparently does not match the file name.
+final class ConcreteProcess extends Process
+{
+  static class ProcessManager extends Thread
+  {
+    /**
+     * A list of {@link ConcreteProcess ConcreteProcesses} to be
+     * started.  The queueLock object is used as the lock Object
+     * for all process related operations. To avoid dead lock
+     * ensure queueLock is obtained before ConcreteProcess.
+     */
+    List queue = new LinkedList();
+    private Map pidToProcess = new HashMap();
+    private boolean ready = false;
+    private long reaperPID;
+
+    ProcessManager()
+    {
+      super("ProcessManager");
+      // Don't keep the (main) process from exiting on our account.
+      this.setDaemon(true);
+    }
+
+    /**
+     * Get the ConcreteProcess object with the given pid and
+     * remove it from the map.  This method is called from the
+     * native code for {@link #reap()).  The mapping is removed so
+     * the ConcreteProcesses can be GCed after they terminate.
+     *
+     * @param p The pid of the process.
+     */
+    private ConcreteProcess removeProcessFromMap(long p)
+    {
+      return (ConcreteProcess) pidToProcess.remove(new Long(p));
+    }
+
+    /**
+     * Put the given ConcreteProcess in the map using the Long
+     * value of its pid as the key.
+     *
+     * @param p The ConcreteProcess.
+     */
+    void addProcessToMap(ConcreteProcess p)
+    {
+      pidToProcess.put(new Long(p.pid), p);
+    }
+
+    /**
+     * Queue up the ConcreteProcess and awake the ProcessManager.
+     * The ProcessManager will start the ConcreteProcess from its
+     * thread so it can be reaped when it terminates.
+     *
+     * @param p The ConcreteProcess.
+     */
+    void startExecuting(ConcreteProcess p)
+    {
+      synchronized (queueLock)
+        {
+	  queue.add(p);
+	  signalReaper(); // If blocked in waitForSignal().
+	  queueLock.notifyAll(); // If blocked in wait();
+        }
+    }
+
+    /**
+     * Block until the ProcessManager thread is ready to accept
+     * commands.
+     */
+    void waitUntilReady()
+    {
+      synchronized (this)
+        {
+	  try
+	    {
+	      while (! ready)
+		wait();
+	    }
+	  catch (InterruptedException ie)
+	    {
+	      // Ignore.
+	    }
+        }
+    }
+
+    /**
+     * Main Process starting/reaping loop.
+     */
+    public void run()
+    {
+      init();
+      // Now ready to accept requests.
+      synchronized (this)
+        {
+	  ready = true;
+	  this.notifyAll();
+        }
+
+      for (;;)
+        {
+	  try
+	    {
+	      synchronized (queueLock)
+	        {
+		  boolean haveMoreChildren = reap();
+		  if (! haveMoreChildren && queue.size() == 0)
+		    {
+		      // This reaper thread could exit, but we
+		      // keep it alive for a while in case
+		      // someone wants to start more Processes.
+		      try
+		        {
+			  queueLock.wait(1000L);
+			  if (queue.size() == 0)
+			    {
+			      processManager = null;
+			      return; // Timed out.
+			    }
+		        }
+		      catch (InterruptedException ie)
+		        {
+			  // Ignore and exit the thread.
+			  return;
+		        }
+		    }
+		  while (queue.size() > 0)
+		    {
+		      ConcreteProcess p = (ConcreteProcess) queue.remove(0);
+		      p.spawn(this);
+		    }
+	        }
+
+	      // Wait for a SIGCHLD from either an exiting
+	      // process or the startExecuting() method.  This
+	      // is done outside of the synchronized block to
+	      // allow other threads to enter and submit more
+	      // jobs.
+	      waitForSignal();
+	    }
+	  catch (Exception ex)
+	    {
+	      ex.printStackTrace(System.err);
+	    }
+        }
+    }
+
+    /**
+     * Setup native signal handlers and other housekeeping things.
+     *
+     */
+    private native void init();
+
+    /**
+     * Block waiting for SIGCHLD.
+     *
+     */
+    private native void waitForSignal();
+
+    /**
+     * Try to reap as many children as possible without blocking.
+     *
+     * @return true if more live children exist.
+     *
+     */
+    private native boolean reap();
+
+    /**
+     * Send SIGCHLD to the reaper thread.
+     */
+    private native void signalReaper();
+  }
+
+  public void destroy()
+  {
+    // Synchronized on the queueLock.  This ensures that the reaper
+    // thread cannot be doing a wait() on the child.
+    // Otherwise there would be a race where the OS could
+    // create a process with the same pid between the wait()
+    // and the update of the state which would cause a kill to
+    // the wrong process.
+    synchronized (queueLock)
+      {
+	synchronized (this)
+	  {
+	    // If there is no ProcessManager we cannot kill.
+	    if (state != STATE_TERMINATED)
+	      {
+		if (processManager == null)
+		  throw new InternalError();
+		nativeDestroy();
+	      }
+	  }
+      }
+  }
+
+  private native void nativeDestroy();
+
+  public int exitValue()
+  {
+    synchronized (this)
+      {
+	if (state != STATE_TERMINATED)
+	  throw new IllegalThreadStateException("Process has not exited");
+      }
+    return status;
+  }
+
+  /**
+   * Called by native code when process exits.
+   *
+   * Already synchronized (this).  Close any streams that we can to
+   * conserve file descriptors.
+   *
+   * The outputStream can be closed as any future writes will
+   * generate an IOException due to EPIPE.
+   *
+   * The inputStream and errorStream can only be closed if the user
+   * has not obtained a reference to them AND they have no bytes
+   * available.  Since the process has terminated they will never have
+   * any more data available and can safely be replaced by
+   * EOFInputStreams.
+   */
+  void processTerminationCleanup()
+  {
+    try
+      {
+        outputStream.close();
+      }
+    catch (IOException ioe)
+      {
+        // Ignore.
+      }
+    try
+      {
+        if (returnedErrorStream == null && errorStream.available() == 0)
+          {
+            errorStream.close();
+            errorStream = null;
+          }
+      }
+    catch (IOException ioe)
+      {
+        // Ignore.
+      }
+    try
+      {
+        if (returnedInputStream == null && inputStream.available() == 0)
+          {
+            inputStream.close();
+            inputStream = null;
+          }
+      }
+    catch (IOException ioe)
+      {
+        // Ignore.
+      }
+  }
+
+  public synchronized InputStream getErrorStream()
+  {
+    if (returnedErrorStream != null)
+      return returnedErrorStream;
+
+    if (errorStream == null)
+      returnedErrorStream = EOFInputStream.instance;
+    else
+      returnedErrorStream = errorStream;
+            
+    return returnedErrorStream;
+  }
+
+  public synchronized InputStream getInputStream()
+  {
+    if (returnedInputStream != null)
+      return returnedInputStream;
+
+    if (inputStream == null)
+      returnedInputStream = EOFInputStream.instance;
+    else
+      returnedInputStream = inputStream;
+            
+    return returnedInputStream;
+  }
+
+  public OutputStream getOutputStream()
+  {
+    return outputStream;
+  }
+
+  public int waitFor() throws InterruptedException
+  {
+    synchronized (this)
+      {
+	while (state != STATE_TERMINATED)
+	  wait();
+      }
+    return status;
+  }
+
+  /**
+   * Start this process running.  This should only be called by the
+   * ProcessManager.
+   *
+   * @param pm The ProcessManager that made the call.
+   */
+  void spawn(ProcessManager pm)
+  {
+    synchronized (this)
+      {
+	// Do the fork/exec magic.
+	nativeSpawn();
+	// There is no race with reap() in the pidToProcess map
+	// because this is always called from the same thread
+	// doing the reaping.
+	pm.addProcessToMap(this);
+	state = STATE_RUNNING;
+	// Notify anybody waiting on state change.
+	this.notifyAll();
+      }
+  }
+
+  /**
+   * Do the fork and exec.
+   */
+  private native void nativeSpawn();
+
+  // This file is copied to `ConcreteProcess.java' before
+  // compilation.  Hence the constructor name apparently does not
+  // match the file name.
+  ConcreteProcess(String[] progarray, String[] envp, File dir)
+           throws IOException
+  {
+    // Check to ensure there is something to run, and avoid
+    // dereferencing null pointers in native code.
+    if (progarray[0] == null)
+      throw new NullPointerException();
+
+    this.progarray = progarray;
+    this.envp = envp;
+    this.dir = dir;
+
+    // Start a ProcessManager if there is not one already running.
+    synchronized (queueLock)
+      {
+	if (processManager == null)
+	  {
+	    processManager = new ProcessManager();
+	    processManager.start();
+	    processManager.waitUntilReady();
+	  }
+
+	// Queue this ConcreteProcess for starting by the ProcessManager.
+	processManager.startExecuting(this);
+      }
+
+    // Wait until ProcessManager has started us.
+    synchronized (this)
+      {
+	while (state == STATE_WAITING_TO_START)
+	  {
+	    try
+	      {
+		wait();
+	      }
+	    catch (InterruptedException ie)
+	      {
+		// FIXME: What to do when interrupted while blocking in a constructor?
+		// Ignore.
+	      }
+	  }
+      }
+
+    // If there was a problem, re-throw it.
+    if (exception != null)
+      {
+	if (exception instanceof IOException)
+	  {
+	    IOException ioe = new IOException(exception.toString());
+	    ioe.initCause(exception);
+	    throw ioe;
+	  }
+
+	// Not an IOException.  Something bad happened.
+	InternalError ie = new InternalError(exception.toString());
+	ie.initCause(exception);
+	throw ie;
+      }
+
+    // If we get here, all is well, the Process has started.
+  }
+
+  private String[] progarray;
+  private String[] envp;
+  private File dir;
+
+  /** Set by the ProcessManager on problems starting. */
+  private Throwable exception;
+
+  /** The process id.  This is cast to a pid_t on the native side. */
+  private long pid;
+
+  // FIXME: Why doesn't the friend declaration in ConcreteProcess.h
+  // allow ConcreteProcess$ProcessManager native code access these
+  // when they are private?
+
+  /** Before the process is forked. */
+  static final int STATE_WAITING_TO_START = 0;
+
+  /** After the fork. */
+  static final int STATE_RUNNING = 1;
+
+  /** After exit code has been collected. */
+  static final int STATE_TERMINATED = 2;
+
+  /** One of STATE_WAITING_TO_START, STATE_RUNNING, STATE_TERMINATED. */
+  int state;
+
+  /** The exit status, if the child has exited. */
+  int status;
+
+  /** The streams. */
+  private InputStream errorStream;
+  private InputStream inputStream;
+  private OutputStream outputStream;
+
+  /** InputStreams obtained by the user.  Not null indicates that the
+   *  user has obtained the stream.
+   */
+  private InputStream returnedErrorStream;
+  private InputStream returnedInputStream;
+
+  /**
+   * Lock Object for all processManager related locking.
+   */
+  private static Object queueLock = new Object();
+  private static ProcessManager processManager;
+
+  static class EOFInputStream extends InputStream
+  {
+    static EOFInputStream instance = new EOFInputStream();
+    public int read()
+    {
+      return -1;
+    }
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/java/lang/Runtime.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/java/lang/Runtime.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/java/lang/Runtime.java (added)
+++ llvm-gcc-4.2/trunk/libjava/java/lang/Runtime.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,747 @@
+/* Runtime.java -- access to the VM process
+   Copyright (C) 1998, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+import gnu.classpath.SystemProperties;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+/**
+ * Runtime represents the Virtual Machine.
+ *
+ * @author John Keiser
+ * @author Eric Blake (ebb9 at email.byu.edu)
+ * @author Jeroen Frijters
+ */
+// No idea why this class isn't final, since you can't build a subclass!
+public class Runtime
+{
+  /**
+   * The library path, to search when loading libraries. We can also safely use
+   * this as a lock for synchronization.
+   */
+  private final String[] libpath;
+
+  static
+  {
+    init();
+  }
+
+  /**
+   * The thread that started the exit sequence. Access to this field must
+   * be thread-safe; lock on libpath to avoid deadlock with user code.
+   * <code>runFinalization()</code> may want to look at this to see if ALL
+   * finalizers should be run, because the virtual machine is about to halt.
+   */
+  private Thread exitSequence;
+
+  /**
+   * All shutdown hooks. This is initialized lazily, and set to null once all
+   * shutdown hooks have run. Access to this field must be thread-safe; lock
+   * on libpath to avoid deadlock with user code.
+   */
+  private Set shutdownHooks;
+
+  /** True if we should finalize on exit.  */
+  private boolean finalizeOnExit;
+
+  /**
+   * The one and only runtime instance.
+   */
+  private static final Runtime current = new Runtime();
+
+  /**
+   * Not instantiable by a user, this should only create one instance.
+   */
+  private Runtime()
+  {
+    if (current != null)
+      throw new InternalError("Attempt to recreate Runtime");
+    
+    // We don't use libpath in the libgcj implementation.  We still
+    // set it to something to allow the various synchronizations to
+    // work.
+    libpath = new String[0];
+  }
+
+  /**
+   * Get the current Runtime object for this JVM. This is necessary to access
+   * the many instance methods of this class.
+   *
+   * @return the current Runtime object
+   */
+  public static Runtime getRuntime()
+  {
+    return current;
+  }
+
+  /**
+   * Exit the Java runtime. This method will either throw a SecurityException
+   * or it will never return. The status code is returned to the system; often
+   * a non-zero status code indicates an abnormal exit. Of course, there is a
+   * security check, <code>checkExit(status)</code>.
+   *
+   * <p>First, all shutdown hooks are run, in unspecified order, and
+   * concurrently. Next, if finalization on exit has been enabled, all pending
+   * finalizers are run. Finally, the system calls <code>halt</code>.</p>
+   *
+   * <p>If this is run a second time after shutdown has already started, there
+   * are two actions. If shutdown hooks are still executing, it blocks
+   * indefinitely. Otherwise, if the status is nonzero it halts immediately;
+   * if it is zero, it blocks indefinitely. This is typically called by
+   * <code>System.exit</code>.</p>
+   *
+   * @param status the status to exit with
+   * @throws SecurityException if permission is denied
+   * @see #addShutdownHook(Thread)
+   * @see #runFinalizersOnExit(boolean)
+   * @see #runFinalization()
+   * @see #halt(int)
+   */
+  public void exit(int status)
+  {
+    SecurityManager sm = SecurityManager.current; // Be thread-safe!
+    if (sm != null)
+      sm.checkExit(status);
+    exitNoChecks(status);
+  }
+
+  // Accessor to avoid adding a vtable slot.
+  static void exitNoChecksAccessor(int status)
+  {
+    current.exitNoChecks(status);
+  }
+
+  // Private since we can't add a vtable slot in 4.1.x.
+  private void exitNoChecks(int status)
+  {
+    if (runShutdownHooks())
+      exitInternal(status);
+
+    // Someone else already called runShutdownHooks().
+    // Make sure we are not/no longer in the shutdownHooks set.
+    // And wait till the thread that is calling runShutdownHooks() finishes.
+    synchronized (libpath)
+      {
+        if (shutdownHooks != null)
+          {
+            shutdownHooks.remove(Thread.currentThread());
+            // Interrupt the exit sequence thread, in case it was waiting
+            // inside a join on our thread.
+            exitSequence.interrupt();
+            // Shutdown hooks are still running, so we clear status to
+	    // make sure we don't halt.
+	    status = 0;
+          }
+      }
+
+    // If exit() is called again after the shutdown hooks have run, but
+    // while finalization for exit is going on and the status is non-zero
+    // we halt immediately.
+    if (status != 0)
+      exitInternal(status);
+
+    while (true)
+      try
+        {
+          exitSequence.join();
+        }
+      catch (InterruptedException e)
+        {
+          // Ignore, we've suspended indefinitely to let all shutdown
+          // hooks complete, and to let any non-zero exits through, because
+          // this is a duplicate call to exit(0).
+        }
+  }
+
+  /**
+   * On first invocation, run all the shutdown hooks and return true.
+   * Any subsequent invocations will simply return false.
+   * Note that it is package accessible so that VMRuntime can call it
+   * when VM exit is not triggered by a call to Runtime.exit().
+   * 
+   * @return was the current thread the first one to call this method?
+   */
+  boolean runShutdownHooks()
+  {
+    boolean first = false;
+    synchronized (libpath) // Synch on libpath, not this, to avoid deadlock.
+      {
+        if (exitSequence == null)
+          {
+            first = true;
+            exitSequence = Thread.currentThread();
+            if (shutdownHooks != null)
+              {
+                Iterator i = shutdownHooks.iterator();
+                while (i.hasNext()) // Start all shutdown hooks.
+                  try
+                    {
+                      ((Thread) i.next()).start();
+                    }
+                  catch (IllegalThreadStateException e)
+                    {
+                      i.remove();
+                    }
+              }
+          }
+      }
+    if (first)
+      {
+        if (shutdownHooks != null)
+          {
+            // Check progress of all shutdown hooks. As a hook completes,
+            // remove it from the set. If a hook calls exit, it removes
+            // itself from the set, then waits indefinitely on the
+            // exitSequence thread. Once the set is empty, set it to null to
+            // signal all finalizer threads that halt may be called.
+            while (true)
+              {
+                Thread[] hooks;
+                synchronized (libpath)
+                  {
+                    hooks = new Thread[shutdownHooks.size()];
+                    shutdownHooks.toArray(hooks);
+                  }
+                if (hooks.length == 0)
+                  break;
+                for (int i = 0; i < hooks.length; i++)
+                  {
+                    try
+                      {
+                        synchronized (libpath)
+                          {
+                            if (!shutdownHooks.contains(hooks[i]))
+                              continue;
+                          }
+                        hooks[i].join();
+                        synchronized (libpath)
+                          {
+                            shutdownHooks.remove(hooks[i]);
+                          }
+                      }
+                    catch (InterruptedException x)
+                      {
+                        // continue waiting on the next thread
+                      }
+                  }
+              }
+            synchronized (libpath)
+              {
+                shutdownHooks = null;
+              }
+          }
+	// Run finalization on all finalizable objects (even if they are
+	// still reachable).
+        runFinalizationForExit();
+      }
+    return first;
+  }
+
+  /**
+   * Register a new shutdown hook. This is invoked when the program exits
+   * normally (because all non-daemon threads ended, or because
+   * <code>System.exit</code> was invoked), or when the user terminates
+   * the virtual machine (such as by typing ^C, or logging off). There is
+   * a security check to add hooks,
+   * <code>RuntimePermission("shutdownHooks")</code>.
+   *
+   * <p>The hook must be an initialized, but unstarted Thread. The threads
+   * are run concurrently, and started in an arbitrary order; and user
+   * threads or daemons may still be running. Once shutdown hooks have
+   * started, they must all complete, or else you must use <code>halt</code>,
+   * to actually finish the shutdown sequence. Attempts to modify hooks
+   * after shutdown has started result in IllegalStateExceptions.</p>
+   *
+   * <p>It is imperative that you code shutdown hooks defensively, as you
+   * do not want to deadlock, and have no idea what other hooks will be
+   * running concurrently. It is also a good idea to finish quickly, as the
+   * virtual machine really wants to shut down!</p>
+   *
+   * <p>There are no guarantees that such hooks will run, as there are ways
+   * to forcibly kill a process. But in such a drastic case, shutdown hooks
+   * would do little for you in the first place.</p>
+   *
+   * @param hook an initialized, unstarted Thread
+   * @throws IllegalArgumentException if the hook is already registered or run
+   * @throws IllegalStateException if the virtual machine is already in
+   *         the shutdown sequence
+   * @throws SecurityException if permission is denied
+   * @since 1.3
+   * @see #removeShutdownHook(Thread)
+   * @see #exit(int)
+   * @see #halt(int)
+   */
+  public void addShutdownHook(Thread hook)
+  {
+    SecurityManager sm = SecurityManager.current; // Be thread-safe!
+    if (sm != null)
+      sm.checkPermission(new RuntimePermission("shutdownHooks"));
+    if (hook.isAlive() || hook.getThreadGroup() == null)
+      throw new IllegalArgumentException("The hook thread " + hook + " must not have been already run or started");
+    synchronized (libpath)
+      {
+        if (exitSequence != null)
+          throw new IllegalStateException("The Virtual Machine is exiting. It is not possible anymore to add any hooks");
+        if (shutdownHooks == null)
+          shutdownHooks = new HashSet(); // Lazy initialization.
+        if (! shutdownHooks.add(hook))
+          throw new IllegalArgumentException(hook.toString() + " had already been inserted");
+      }
+  }
+
+  /**
+   * De-register a shutdown hook. As when you registered it, there is a
+   * security check to remove hooks,
+   * <code>RuntimePermission("shutdownHooks")</code>.
+   *
+   * @param hook the hook to remove
+   * @return true if the hook was successfully removed, false if it was not
+   *         registered in the first place
+   * @throws IllegalStateException if the virtual machine is already in
+   *         the shutdown sequence
+   * @throws SecurityException if permission is denied
+   * @since 1.3
+   * @see #addShutdownHook(Thread)
+   * @see #exit(int)
+   * @see #halt(int)
+   */
+  public boolean removeShutdownHook(Thread hook)
+  {
+    SecurityManager sm = SecurityManager.current; // Be thread-safe!
+    if (sm != null)
+      sm.checkPermission(new RuntimePermission("shutdownHooks"));
+    synchronized (libpath)
+      {
+        if (exitSequence != null)
+          throw new IllegalStateException();
+        if (shutdownHooks != null)
+          return shutdownHooks.remove(hook);
+      }
+    return false;
+  }
+
+  /**
+   * Forcibly terminate the virtual machine. This call never returns. It is
+   * much more severe than <code>exit</code>, as it bypasses all shutdown
+   * hooks and initializers. Use caution in calling this! Of course, there is
+   * a security check, <code>checkExit(status)</code>.
+   *
+   * @param status the status to exit with
+   * @throws SecurityException if permission is denied
+   * @since 1.3
+   * @see #exit(int)
+   * @see #addShutdownHook(Thread)
+   */
+  public void halt(int status)
+  {
+    SecurityManager sm = SecurityManager.current; // Be thread-safe!
+    if (sm != null)
+      sm.checkExit(status);
+    exitInternal(status);
+  }
+
+  /**
+   * Tell the VM to run the finalize() method on every single Object before
+   * it exits.  Note that the JVM may still exit abnormally and not perform
+   * this, so you still don't have a guarantee. And besides that, this is
+   * inherently unsafe in multi-threaded code, as it may result in deadlock
+   * as multiple threads compete to manipulate objects. This value defaults to
+   * <code>false</code>. There is a security check, <code>checkExit(0)</code>.
+   *
+   * @param finalizeOnExit whether to finalize all Objects on exit
+   * @throws SecurityException if permission is denied
+   * @see #exit(int)
+   * @see #gc()
+   * @since 1.1
+   * @deprecated never rely on finalizers to do a clean, thread-safe,
+   *             mop-up from your code
+   */
+  public static void runFinalizersOnExit(boolean finalizeOnExit)
+  {
+    SecurityManager sm = SecurityManager.current; // Be thread-safe!
+    if (sm != null)
+      sm.checkExit(0);
+    current.finalizeOnExit = finalizeOnExit;
+  }
+
+  /**
+   * Create a new subprocess with the specified command line. Calls
+   * <code>exec(cmdline, null, null)</code>. A security check is performed,
+   * <code>checkExec</code>.
+   *
+   * @param cmdline the command to call
+   * @return the Process object
+   * @throws SecurityException if permission is denied
+   * @throws IOException if an I/O error occurs
+   * @throws NullPointerException if cmdline is null
+   * @throws IndexOutOfBoundsException if cmdline is ""
+   */
+  public Process exec(String cmdline) throws IOException
+  {
+    return exec(cmdline, null, null);
+  }
+
+  /**
+   * Create a new subprocess with the specified command line and environment.
+   * If the environment is null, the process inherits the environment of
+   * this process. Calls <code>exec(cmdline, env, null)</code>. A security
+   * check is performed, <code>checkExec</code>.
+   *
+   * @param cmdline the command to call
+   * @param env the environment to use, in the format name=value
+   * @return the Process object
+   * @throws SecurityException if permission is denied
+   * @throws IOException if an I/O error occurs
+   * @throws NullPointerException if cmdline is null, or env has null entries
+   * @throws IndexOutOfBoundsException if cmdline is ""
+   */
+  public Process exec(String cmdline, String[] env) throws IOException
+  {
+    return exec(cmdline, env, null);
+  }
+
+  /**
+   * Create a new subprocess with the specified command line, environment, and
+   * working directory. If the environment is null, the process inherits the
+   * environment of this process. If the directory is null, the process uses
+   * the current working directory. This splits cmdline into an array, using
+   * the default StringTokenizer, then calls
+   * <code>exec(cmdArray, env, dir)</code>. A security check is performed,
+   * <code>checkExec</code>.
+   *
+   * @param cmdline the command to call
+   * @param env the environment to use, in the format name=value
+   * @param dir the working directory to use
+   * @return the Process object
+   * @throws SecurityException if permission is denied
+   * @throws IOException if an I/O error occurs
+   * @throws NullPointerException if cmdline is null, or env has null entries
+   * @throws IndexOutOfBoundsException if cmdline is ""
+   * @since 1.3
+   */
+  public Process exec(String cmdline, String[] env, File dir)
+    throws IOException
+  {
+    StringTokenizer t = new StringTokenizer(cmdline);
+    String[] cmd = new String[t.countTokens()];
+    for (int i = 0; i < cmd.length; i++)
+      cmd[i] = t.nextToken();
+    return exec(cmd, env, dir);
+  }
+
+  /**
+   * Create a new subprocess with the specified command line, already
+   * tokenized. Calls <code>exec(cmd, null, null)</code>. A security check
+   * is performed, <code>checkExec</code>.
+   *
+   * @param cmd the command to call
+   * @return the Process object
+   * @throws SecurityException if permission is denied
+   * @throws IOException if an I/O error occurs
+   * @throws NullPointerException if cmd is null, or has null entries
+   * @throws IndexOutOfBoundsException if cmd is length 0
+   */
+  public Process exec(String[] cmd) throws IOException
+  {
+    return exec(cmd, null, null);
+  }
+
+  /**
+   * Create a new subprocess with the specified command line, already
+   * tokenized, and specified environment. If the environment is null, the
+   * process inherits the environment of this process. Calls
+   * <code>exec(cmd, env, null)</code>. A security check is performed,
+   * <code>checkExec</code>.
+   *
+   * @param cmd the command to call
+   * @param env the environment to use, in the format name=value
+   * @return the Process object
+   * @throws SecurityException if permission is denied
+   * @throws IOException if an I/O error occurs
+   * @throws NullPointerException if cmd is null, or cmd or env has null
+   *         entries
+   * @throws IndexOutOfBoundsException if cmd is length 0
+   */
+  public Process exec(String[] cmd, String[] env) throws IOException
+  {
+    return exec(cmd, env, null);
+  }
+
+  /**
+   * Create a new subprocess with the specified command line, already
+   * tokenized, and the specified environment and working directory. If the
+   * environment is null, the process inherits the environment of this
+   * process. If the directory is null, the process uses the current working
+   * directory. A security check is performed, <code>checkExec</code>.
+   *
+   * @param cmd the command to call
+   * @param env the environment to use, in the format name=value
+   * @param dir the working directory to use
+   * @return the Process object
+   * @throws SecurityException if permission is denied
+   * @throws IOException if an I/O error occurs
+   * @throws NullPointerException if cmd is null, or cmd or env has null
+   *         entries
+   * @throws IndexOutOfBoundsException if cmd is length 0
+   * @since 1.3
+   */
+  public Process exec(String[] cmd, String[] env, File dir)
+    throws IOException
+  {
+    SecurityManager sm = SecurityManager.current; // Be thread-safe!
+    if (sm != null)
+      sm.checkExec(cmd[0]);
+    return execInternal(cmd, env, dir);
+  }
+
+  /**
+   * Returns the number of available processors currently available to the
+   * virtual machine. This number may change over time; so a multi-processor
+   * program want to poll this to determine maximal resource usage.
+   *
+   * @return the number of processors available, at least 1
+   */
+  public native int availableProcessors();
+
+  /**
+   * Find out how much memory is still free for allocating Objects on the heap.
+   *
+   * @return the number of bytes of free memory for more Objects
+   */
+  public native long freeMemory();
+
+  /**
+   * Find out how much memory total is available on the heap for allocating
+   * Objects.
+   *
+   * @return the total number of bytes of memory for Objects
+   */
+  public native long totalMemory();
+
+  /**
+   * Returns the maximum amount of memory the virtual machine can attempt to
+   * use. This may be <code>Long.MAX_VALUE</code> if there is no inherent
+   * limit (or if you really do have a 8 exabyte memory!).
+   *
+   * @return the maximum number of bytes the virtual machine will attempt
+   *         to allocate
+   */
+  public native long maxMemory();
+
+  /**
+   * Run the garbage collector. This method is more of a suggestion than
+   * anything. All this method guarantees is that the garbage collector will
+   * have "done its best" by the time it returns. Notice that garbage
+   * collection takes place even without calling this method.
+   */
+  public native void gc();
+
+  /**
+   * Run finalization on all Objects that are waiting to be finalized. Again,
+   * a suggestion, though a stronger one than {@link #gc()}. This calls the
+   * <code>finalize</code> method of all objects waiting to be collected.
+   *
+   * @see #finalize()
+   */
+  public native void runFinalization();
+
+  /**
+   * Tell the VM to trace every bytecode instruction that executes (print out
+   * a trace of it).  No guarantees are made as to where it will be printed,
+   * and the VM is allowed to ignore this request.
+   *
+   * @param on whether to turn instruction tracing on
+   */
+  public native void traceInstructions(boolean on);
+
+  /**
+   * Tell the VM to trace every method call that executes (print out a trace
+   * of it).  No guarantees are made as to where it will be printed, and the
+   * VM is allowed to ignore this request.
+   *
+   * @param on whether to turn method tracing on
+   */
+  public native void traceMethodCalls(boolean on);
+
+  /**
+   * Load a native library using the system-dependent filename. This is similar
+   * to loadLibrary, except the only name mangling done is inserting "_g"
+   * before the final ".so" if the VM was invoked by the name "java_g". There
+   * may be a security check, of <code>checkLink</code>.
+   *
+   * @param filename the file to load
+   * @throws SecurityException if permission is denied
+   * @throws UnsatisfiedLinkError if the library is not found
+   */
+  public void load(String filename)
+  {
+    SecurityManager sm = SecurityManager.current; // Be thread-safe!
+    if (sm != null)
+      sm.checkLink(filename);
+    _load(filename, false);
+  }
+
+  /**
+   * Load a native library using a system-independent "short name" for the
+   * library.  It will be transformed to a correct filename in a
+   * system-dependent manner (for example, in Windows, "mylib" will be turned
+   * into "mylib.dll").  This is done as follows: if the context that called
+   * load has a ClassLoader cl, then <code>cl.findLibrary(libpath)</code> is
+   * used to convert the name. If that result was null, or there was no class
+   * loader, this searches each directory of the system property
+   * <code>java.library.path</code> for a file named
+   * <code>System.mapLibraryName(libname)</code>. There may be a security
+   * check, of <code>checkLink</code>.
+   *
+   * @param libname the library to load
+   *
+   * @throws SecurityException if permission is denied
+   * @throws UnsatisfiedLinkError if the library is not found
+   *
+   * @see System#mapLibraryName(String)
+   * @see ClassLoader#findLibrary(String)
+   */
+  public void loadLibrary(String libname)
+  {
+    // This is different from the Classpath implementation, but I
+    // believe it is more correct.
+    SecurityManager sm = SecurityManager.current; // Be thread-safe!
+    if (sm != null)
+      sm.checkLink(libname);
+    _load(libname, true);
+  }
+
+  /**
+   * Return a localized version of this InputStream, meaning all characters
+   * are localized before they come out the other end.
+   *
+   * @param in the stream to localize
+   * @return the localized stream
+   * @deprecated <code>InputStreamReader</code> is the preferred way to read
+   *             local encodings
+   */
+  public InputStream getLocalizedInputStream(InputStream in)
+  {
+    return in;
+  }
+
+  /**
+   * Return a localized version of this OutputStream, meaning all characters
+   * are localized before they are sent to the other end.
+   *
+   * @param out the stream to localize
+   * @return the localized stream
+   * @deprecated <code>OutputStreamWriter</code> is the preferred way to write
+   *             local encodings
+   */
+  public OutputStream getLocalizedOutputStream(OutputStream out)
+  {
+    return out;
+  }
+
+  /**
+   * Native method that actually shuts down the virtual machine.
+   *
+   * @param status the status to end the process with
+   */
+  native void exitInternal(int status);
+
+  /**
+   * Load a file. If it has already been loaded, do nothing. The name has
+   * already been mapped to a true filename.
+   *
+   * @param filename the file to load
+   * @param do_search True if we should search the load path for the file
+   */
+  native void _load(String filename, boolean do_search);
+
+  /**
+   *This is a helper function for the ClassLoader which can load
+   * compiled libraries.  Returns true if library (which is just the
+   * base name -- path searching is done by this function) was loaded,
+   * false otherwise.
+   */
+  native boolean loadLibraryInternal(String libname);
+
+  /**
+   * A helper for Runtime static initializer which does some internal native
+   * initialization.
+   */
+  private static native void init ();
+
+  /**
+   * Run finalizers when exiting.
+   */
+  private native void runFinalizationForExit();
+
+  /**
+   * Map a system-independent "short name" to the full file name, and append
+   * it to the path.
+   * XXX This method is being replaced by System.mapLibraryName.
+   *
+   * @param pathname the path
+   * @param libname the short version of the library name
+   * @return the full filename
+   */
+  static native String nativeGetLibname(String pathname, String libname);
+
+  /**
+   * Execute a process. The command line has already been tokenized, and
+   * the environment should contain name=value mappings. If directory is null,
+   * use the current working directory; otherwise start the process in that
+   * directory.
+   *
+   * @param cmd the non-null command tokens
+   * @param env the non-null environment setup
+   * @param dir the directory to use, may be null
+   * @return the newly created process
+   * @throws NullPointerException if cmd or env have null elements
+   * @throws IOException if the exec fails
+   */
+  native Process execInternal(String[] cmd, String[] env, File dir)
+    throws IOException;
+} // class Runtime





More information about the llvm-commits mailing list